diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-03-27 20:55:59 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-03-27 20:55:59 +0000 |
| commit | 245ac73a450e765d1756f07d71c9cdcc711e9559 (patch) | |
| tree | 64b19987ad57f929e62514e6ffc1631cb185870e /src/qmmpui/commandlinemanager.cpp | |
| parent | 3c32ca73d3524e7037b8704bff230c96a0a47670 (diff) | |
| download | qmmp-245ac73a450e765d1756f07d71c9cdcc711e9559.tar.gz qmmp-245ac73a450e765d1756f07d71c9cdcc711e9559.tar.bz2 qmmp-245ac73a450e765d1756f07d71c9cdcc711e9559.zip | |
fixed command line regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@882 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/commandlinemanager.cpp')
| -rw-r--r-- | src/qmmpui/commandlinemanager.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/qmmpui/commandlinemanager.cpp b/src/qmmpui/commandlinemanager.cpp index 4a8ae40af..e6b23ac4c 100644 --- a/src/qmmpui/commandlinemanager.cpp +++ b/src/qmmpui/commandlinemanager.cpp @@ -30,24 +30,24 @@ using namespace std; -static QList<CommandLineOption *> *options = 0; -static QStringList files; +QList<CommandLineOption *> *CommandLineManager::m_options = 0; +QStringList CommandLineManager::m_files; -static void checkOptions() +void CommandLineManager::checkOptions() { - if (! options) + if (!m_options) { - files.clear(); - options = new QList<CommandLineOption *>; + m_files.clear(); + m_options = new QList<CommandLineOption *>; QDir pluginsDir (Qmmp::pluginsPath()); - pluginsDir.cd("CommadLineOptions"); + pluginsDir.cd("CommandLineOptions"); foreach (QString fileName, pluginsDir.entryList(QDir::Files)) { QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); QObject *plugin = loader.instance(); if (loader.isLoaded()) - ;//qDebug("CommandLineManager: plugin loaded - %s", qPrintable(fileName)); + /*qDebug("CommandLineManager: plugin loaded - %s", qPrintable(fileName))*/; else qWarning("CommandLineManager: %s", qPrintable(loader.errorString ())); @@ -57,8 +57,8 @@ static void checkOptions() if (option) { - options->append(option); - files << pluginsDir.absoluteFilePath(fileName); + m_options->append(option); + m_files << pluginsDir.absoluteFilePath(fileName); qApp->installTranslator(option->createTranslator(qApp)); } } @@ -82,7 +82,7 @@ CommandLineManager::~CommandLineManager() void CommandLineManager::executeCommand(const QString& opt_str) { checkOptions(); - foreach(CommandLineOption *opt, *options) + foreach(CommandLineOption *opt, *m_options) { if (opt->identify(opt_str)) { @@ -95,7 +95,7 @@ void CommandLineManager::executeCommand(const QString& opt_str) bool CommandLineManager::hasOption(const QString &opt_str) { checkOptions(); - foreach(CommandLineOption *opt, *options) + foreach(CommandLineOption *opt, *m_options) { if (opt->identify(opt_str)) return TRUE; @@ -106,6 +106,6 @@ bool CommandLineManager::hasOption(const QString &opt_str) void CommandLineManager::printUsage() { checkOptions(); - foreach(CommandLineOption *opt, *options) + foreach(CommandLineOption *opt, *m_options) cout << qPrintable(opt->helpString()); } |
