aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp
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/IncDecVolumeOption/incdecvolumeoption.cpp
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/IncDecVolumeOption/incdecvolumeoption.cpp')
-rw-r--r--src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp40
1 files changed, 12 insertions, 28 deletions
diff --git a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp
index fb40781a3..8f594eddf 100644
--- a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp
+++ b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2017 by Ilya Kotov *
+ * Copyright (C) 2008-2018 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -22,29 +22,26 @@
#include <QLocale>
#include <QPair>
#include <qmmp/soundcore.h>
-
#include "incdecvolumeoption.h"
+const CommandLineProperties IncDecVolumeCommandLineOption::properties() const
+{
+ CommandLineProperties properties;
+ properties.shortName = "IncDecVolumeCommandLineOption";
+ properties.translation = QLatin1String(":/incdecvolume_plugin_");
+ properties.helpString << QString("--volume-inc") + "||" + tr("Increase volume by 5 steps")
+ << QString("--volume-dec") + "||" + tr("Decrease volume by 5 steps");
+ return properties;
+}
+
bool IncDecVolumeCommandLineOption::identify(const QString & str) const
{
- if (
- str == QString("--volume-inc") ||
- str == QString("--volume-dec")
- )
- {
+ if(str == QString("--volume-inc") || str == QString("--volume-dec"))
return true;
- }
return false;
}
-const QStringList IncDecVolumeCommandLineOption::helpString() const
-{
- return QStringList()
- << QString("--volume-inc") + "||" + tr("Increase volume by 5 steps")
- << QString("--volume-dec") + "||" + tr("Decrease volume by 5 steps");
-}
-
QString IncDecVolumeCommandLineOption::executeCommand(const QString& opt_str, const QStringList &args)
{
Q_UNUSED(args);
@@ -56,16 +53,3 @@ QString IncDecVolumeCommandLineOption::executeCommand(const QString& opt_str, co
return QString();
}
-
-const QString IncDecVolumeCommandLineOption::name() const
-{
- return "IncDecVolumeCommandLineOption";
-}
-
-/*QTranslator *IncDecVolumeCommandLineOption::createTranslator(QObject *parent)
-{
- QTranslator *translator = new QTranslator(parent);
- QString locale = Qmmp::systemLanguageID();
- translator->load(QString(":/incdecvolume_plugin_") + locale);
- return translator;
-}*/