aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/commandlinemanager.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-06-26 05:52:50 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-06-26 05:52:50 +0000
commit2d7eebdbf07d374c23e40a01efec3d486f46a693 (patch)
tree32583da06bc646af29edd16766bdf8506d6f1bbc /src/qmmpui/commandlinemanager.cpp
parent0efd31a0967572e7be12e71a3a3040215f464e7e (diff)
downloadqmmp-2d7eebdbf07d374c23e40a01efec3d486f46a693.tar.gz
qmmp-2d7eebdbf07d374c23e40a01efec3d486f46a693.tar.bz2
qmmp-2d7eebdbf07d374c23e40a01efec3d486f46a693.zip
improved plugin search
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8058 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/commandlinemanager.cpp')
-rw-r--r--src/qmmpui/commandlinemanager.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/qmmpui/commandlinemanager.cpp b/src/qmmpui/commandlinemanager.cpp
index e50baaa9b..8074d5b12 100644
--- a/src/qmmpui/commandlinemanager.cpp
+++ b/src/qmmpui/commandlinemanager.cpp
@@ -43,16 +43,12 @@ void CommandLineManager::checkOptions()
m_options = new QList<CommandLineOption *>;
m_files = new QHash<CommandLineOption*, QString>;
- QDir pluginsDir (Qmmp::pluginsPath());
- pluginsDir.cd("CommandLineOptions");
- QStringList filters;
- filters << "*.dll" << "*.so";
- foreach (QString fileName, pluginsDir.entryList(filters, QDir::Files))
+ foreach (QString filePath, Qmmp::findPlugins("CommandLineOptions"))
{
- QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
+ QPluginLoader loader(filePath);
QObject *plugin = loader.instance();
if (loader.isLoaded())
- /*qDebug("CommandLineManager: loaded plugin %s", qPrintable(fileName))*/;
+ /*qDebug("CommandLineManager: loaded plugin %s", qPrintable(QFileInfo(filePath).filePath()));*/;
else
qWarning("CommandLineManager: %s", qPrintable(loader.errorString ()));
@@ -63,7 +59,7 @@ void CommandLineManager::checkOptions()
if (option)
{
m_options->append(option);
- m_files->insert(option, pluginsDir.absoluteFilePath(fileName));
+ m_files->insert(option, filePath);
qApp->installTranslator(option->createTranslator(qApp));
}
}