From 2d7eebdbf07d374c23e40a01efec3d486f46a693 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 26 Jun 2018 05:52:50 +0000 Subject: improved plugin search git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8058 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistparser.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/qmmpui/playlistparser.cpp') diff --git a/src/qmmpui/playlistparser.cpp b/src/qmmpui/playlistparser.cpp index cb2f144ae..2d8f67f06 100644 --- a/src/qmmpui/playlistparser.cpp +++ b/src/qmmpui/playlistparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2017 by Ilya Kotov * + * Copyright (C) 2008-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -163,16 +163,12 @@ void PlayListParser::loadFormats() return; m_formats = new QList(); - QDir pluginsDir (Qmmp::pluginsPath()); - pluginsDir.cd("PlayListFormats"); - QStringList filters; - filters << "*.dll" << "*.so"; - foreach (QString fileName, pluginsDir.entryList(filters, QDir::Files)) + foreach (QString filePath, Qmmp::findPlugins("PlayListFormats")) { - QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); + QPluginLoader loader(filePath); QObject *plugin = loader.instance(); if (loader.isLoaded()) - qDebug("PlayListParser: loaded plugin %s", qPrintable(fileName)); + qDebug("PlayListParser: loaded plugin %s", qPrintable(QFileInfo(filePath).filePath())); else qWarning("PlayListParser: %s", qPrintable(loader.errorString ())); -- cgit v1.2.3-13-gbd6f