diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-03-11 11:53:55 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-03-11 11:53:55 +0000 |
| commit | 38bfcb867f294573ea374aeab34ffe564a995ed0 (patch) | |
| tree | 0a8c3706569681b7f1c20a6fa2df89f298a0d2e0 /src/qmmpui | |
| parent | 1ee17de296f8e0c302be17842447b91ddbab7bc3 (diff) | |
| download | qmmp-38bfcb867f294573ea374aeab34ffe564a995ed0.tar.gz qmmp-38bfcb867f294573ea374aeab34ffe564a995ed0.tar.bz2 qmmp-38bfcb867f294573ea374aeab34ffe564a995ed0.zip | |
added filter for plugin file type
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4146 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/commandlinemanager.cpp | 6 | ||||
| -rw-r--r-- | src/qmmpui/filedialog.cpp | 6 | ||||
| -rw-r--r-- | src/qmmpui/general.cpp | 6 | ||||
| -rw-r--r-- | src/qmmpui/playlistparser.cpp | 6 | ||||
| -rw-r--r-- | src/qmmpui/uiloader.cpp | 6 |
5 files changed, 20 insertions, 10 deletions
diff --git a/src/qmmpui/commandlinemanager.cpp b/src/qmmpui/commandlinemanager.cpp index f5706dc2e..9bbace951 100644 --- a/src/qmmpui/commandlinemanager.cpp +++ b/src/qmmpui/commandlinemanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,9 @@ void CommandLineManager::checkOptions() QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("CommandLineOptions"); - foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + QStringList filters; + filters << "*.dll" << "*.so"; + foreach (QString fileName, pluginsDir.entryList(filters, QDir::Files)) { QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); QObject *plugin = loader.instance(); diff --git a/src/qmmpui/filedialog.cpp b/src/qmmpui/filedialog.cpp index 5219449ed..5c73cc861 100644 --- a/src/qmmpui/filedialog.cpp +++ b/src/qmmpui/filedialog.cpp @@ -1,5 +1,5 @@ /************************************************************************** -* Copyright (C) 2008-2013 by Ilya Kotov * +* Copyright (C) 2008-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -46,7 +46,9 @@ void FileDialog::loadPlugins() QSettings settings (Qmmp::configFile(), QSettings::IniFormat); QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("FileDialogs"); - foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + QStringList filters; + filters << "*.dll" << "*.so"; + foreach (QString fileName, pluginsDir.entryList(filters, QDir::Files)) { QmmpUiPluginCache *item = new QmmpUiPluginCache(pluginsDir.absoluteFilePath(fileName), &settings); if(item->hasError()) diff --git a/src/qmmpui/general.cpp b/src/qmmpui/general.cpp index 3b3c65a8b..8ee6b3358 100644 --- a/src/qmmpui/general.cpp +++ b/src/qmmpui/general.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2013 by Ilya Kotov * + * Copyright (C) 2008-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -39,7 +39,9 @@ void General::loadPlugins() QSettings settings (Qmmp::configFile(), QSettings::IniFormat); QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("General"); - foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + QStringList filters; + filters << "*.dll" << "*.so"; + foreach (QString fileName, pluginsDir.entryList(filters, QDir::Files)) { QmmpUiPluginCache *item = new QmmpUiPluginCache(pluginsDir.absoluteFilePath(fileName), &settings); if(item->hasError()) diff --git a/src/qmmpui/playlistparser.cpp b/src/qmmpui/playlistparser.cpp index e6198d16c..083cb35d4 100644 --- a/src/qmmpui/playlistparser.cpp +++ b/src/qmmpui/playlistparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2013 by Ilya Kotov * + * Copyright (C) 2008-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -140,7 +140,9 @@ void PlayListParser::checkFormats() m_formats = new QList<PlayListFormat*>(); QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("PlayListFormats"); - foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + QStringList filters; + filters << "*.dll" << "*.so"; + foreach (QString fileName, pluginsDir.entryList(filters, QDir::Files)) { QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); QObject *plugin = loader.instance(); diff --git a/src/qmmpui/uiloader.cpp b/src/qmmpui/uiloader.cpp index ac02674e8..f009927e7 100644 --- a/src/qmmpui/uiloader.cpp +++ b/src/qmmpui/uiloader.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2011-2013 by Ilya Kotov * + * Copyright (C) 2011-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -34,7 +34,9 @@ void UiLoader::loadPlugins() QSettings settings (Qmmp::configFile(), QSettings::IniFormat); QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("Ui"); - foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + QStringList filters; + filters << "*.dll" << "*.so"; + foreach (QString fileName, pluginsDir.entryList(filters, QDir::Files)) { QmmpUiPluginCache *item = new QmmpUiPluginCache(pluginsDir.absoluteFilePath(fileName), &settings); if(item->hasError()) |
