aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/gme/decodergmefactory.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-11-24 18:17:51 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-11-24 18:17:51 +0000
commitaa3f57c0236c77f2fd90415fc1f3062a93b25b93 (patch)
treed9ab905b952cf9289239b95db99f39321a54e65b /src/plugins/Input/gme/decodergmefactory.cpp
parent5c2f5798c6222d35e08fa0853812e2390181e735 (diff)
downloadqmmp-aa3f57c0236c77f2fd90415fc1f3062a93b25b93.tar.gz
qmmp-aa3f57c0236c77f2fd90415fc1f3062a93b25b93.tar.bz2
qmmp-aa3f57c0236c77f2fd90415fc1f3062a93b25b93.zip
some api changes, partial mpris 2.0 implementation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1991 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/gme/decodergmefactory.cpp')
-rw-r--r--src/plugins/Input/gme/decodergmefactory.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/plugins/Input/gme/decodergmefactory.cpp b/src/plugins/Input/gme/decodergmefactory.cpp
index 120a3cf61..e9a9a37ca 100644
--- a/src/plugins/Input/gme/decodergmefactory.cpp
+++ b/src/plugins/Input/gme/decodergmefactory.cpp
@@ -19,6 +19,7 @@
***************************************************************************/
#include <QtGui>
+#include <QRegExp>
#include <gme/Gme_File.h>
#include "gmehelper.h"
#include "decoder_gme.h"
@@ -28,13 +29,12 @@
bool DecoderGmeFactory::supports(const QString &source) const
{
- QString lExt = source.section(".",-1).toLower();
- lExt.prepend(".");
- QStringList lExtList;
- lExtList << ".ay" << ".gms" << ".gym" << ".hes" << ".kss" << ".nsf" << ".nsfe" << ".sap" << ".spc"
- << ".vgm" << ".vgz";
- if (lExtList.contains(lExt))
- return true;
+ foreach(QString filter, properties().filters)
+ {
+ QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard);
+ if (regexp.exactMatch(source))
+ return true;
+ }
return false;
}
@@ -47,14 +47,15 @@ const DecoderProperties DecoderGmeFactory::properties() const
{
DecoderProperties properties;
properties.name = tr("GME Plugin");
- properties.filter = QString("*.ay *.gms *.gym *.hes *.kss *.nsf *.nsfe *.sap *.spc *.vgm *.vgz");
+ properties.filters << "*.ay" << "*.gms" << "*.gym" << "*.hes" << "*.kss" << "*.nsf" << "*.nsfe";
+ properties.filters << "*.sap" << "*.spc" << "*.vgm" << "*.vgz";
properties.description = tr("Game Music Files");
//properties.contentType = ;
properties.shortName = "gme";
properties.hasAbout = true;
properties.hasSettings = false;
properties.noInput = true;
- properties.protocols = "gme";
+ properties.protocols << "gme";
return properties;
}