diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-10-25 21:24:43 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-10-25 21:24:43 +0000 |
| commit | ff83ab580c847f8f8e684f3b1d7bc100ff2f1510 (patch) | |
| tree | a5578067bb808e2a252c173664ee34afdc87bbfd /src/plugins/Engines/mplayer/mplayerenginefactory.cpp | |
| parent | 95c8717ceeb61baccdcc5929fecf1faa3e2e98cf (diff) | |
| download | qmmp-ff83ab580c847f8f8e684f3b1d7bc100ff2f1510.tar.gz qmmp-ff83ab580c847f8f8e684f3b1d7bc100ff2f1510.tar.bz2 qmmp-ff83ab580c847f8f8e684f3b1d7bc100ff2f1510.zip | |
ported some code to QRegularExpression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9529 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Engines/mplayer/mplayerenginefactory.cpp')
| -rw-r--r-- | src/plugins/Engines/mplayer/mplayerenginefactory.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/plugins/Engines/mplayer/mplayerenginefactory.cpp b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp index dfc13cf27..491dc7cb0 100644 --- a/src/plugins/Engines/mplayer/mplayerenginefactory.cpp +++ b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp @@ -43,14 +43,7 @@ EngineProperties MplayerEngineFactory::properties() const bool MplayerEngineFactory::supports(const QString &source) const { - const QStringList filters = MplayerInfo::filters(); - for(const QString &filter : qAsConst(filters)) - { - QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); - if (regexp.exactMatch(source)) - return true; - } - return false; + return MplayerInfo::supports(source); } AbstractEngine *MplayerEngineFactory::create(QObject *parent) @@ -61,9 +54,7 @@ AbstractEngine *MplayerEngineFactory::create(QObject *parent) QList<TrackInfo *> MplayerEngineFactory::createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *) { Q_UNUSED(parts); - QList<TrackInfo *> info; - info << MplayerInfo::createTrackInfo(path); - return info; + return { MplayerInfo::createTrackInfo(path) }; } MetaDataModel* MplayerEngineFactory::createMetaDataModel(const QString &path, bool readOnly) |
