aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/CommandLineOptions/PlayListOption
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-07-21 15:26:02 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-07-21 15:26:02 +0000
commitab49308ad778ddc4822cda48e218fbc06f7b8e34 (patch)
tree6a315cbb2b9dff0d5590d5d28ec4c3d6c9868b0d /src/plugins/CommandLineOptions/PlayListOption
parent0006966c0f307ec7dff51130ce26bbe3c7061418 (diff)
downloadqmmp-ab49308ad778ddc4822cda48e218fbc06f7b8e34.tar.gz
qmmp-ab49308ad778ddc4822cda48e218fbc06f7b8e34.tar.bz2
qmmp-ab49308ad778ddc4822cda48e218fbc06f7b8e34.zip
fixed command line translation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8197 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/CommandLineOptions/PlayListOption')
-rw-r--r--src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp28
-rw-r--r--src/plugins/CommandLineOptions/PlayListOption/playlistoption.h3
2 files changed, 10 insertions, 21 deletions
diff --git a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
index ccf774942..17156c4c8 100644
--- a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
+++ b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
@@ -28,6 +28,15 @@
#include <qmmpui/commandlinemanager.h>
#include "playlistoption.h"
+const CommandLineProperties PlayListOption::properties() const
+{
+ CommandLineProperties properties;
+ properties.shortName = "PlayListOption";
+ properties.translation = QLatin1String(":/playlist_plugin_");
+ properties.helpString << QString("--pl-help") + "||" + tr("Show playlist manipulation commands");
+ return properties;
+}
+
bool PlayListOption::identify(const QString & str) const
{
return str == QString("--pl-help") ||
@@ -40,12 +49,6 @@ bool PlayListOption::identify(const QString & str) const
str == QString("--pl-state");
}
-const QStringList PlayListOption::helpString() const
-{
- return QStringList()
- << QString("--pl-help") + "||" + tr("Show playlist manipulation commands");
-}
-
QString PlayListOption::executeCommand(const QString& opt_str, const QStringList &args)
{
Q_UNUSED(args);
@@ -143,19 +146,6 @@ QString PlayListOption::executeCommand(const QString& opt_str, const QStringList
return out;
}
-const QString PlayListOption::name() const
-{
- return "PlayListOption";
-}
-
-/*QTranslator *PlayListOption::createTranslator(QObject *parent)
-{
- QTranslator *translator = new QTranslator(parent);
- QString locale = Qmmp::systemLanguageID();
- translator->load(QString(":/playlist_plugin_") + locale);
- return translator;
-}*/
-
QString PlayListOption::boolToText(bool enabled)
{
return QString(enabled ? "[+]" : "[-]");
diff --git a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h
index 308a1ff77..bb0e13570 100644
--- a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h
+++ b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h
@@ -36,9 +36,8 @@ Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineOptionInterface.1.0")
Q_INTERFACES(CommandLineOption)
public:
+ virtual const CommandLineProperties properties() const;
virtual bool identify(const QString& opt_str) const;
- virtual const QString name() const;
- virtual const QStringList helpString() const;
virtual QString executeCommand(const QString& opt_str, const QStringList &args);
private: