From fb7852e8febff410d3ae7959a60963602cf3076c Mon Sep 17 00:00:00 2001 From: iaom Date: Tue, 15 Mar 2022 14:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=84=9A=E8=A0=A2=E7=9A=84=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libsearch/pluginmanage/plugin-manager.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libsearch/pluginmanage/plugin-manager.cpp b/libsearch/pluginmanage/plugin-manager.cpp index 8f127c0..37f3411 100644 --- a/libsearch/pluginmanage/plugin-manager.cpp +++ b/libsearch/pluginmanage/plugin-manager.cpp @@ -30,15 +30,10 @@ PluginManager::PluginManager(QObject *parent) : QObject(parent) Q_FOREACH(QString fileName, pluginsDir.entryList(QDir::Files)) { QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName)); - if(pluginLoader.isLoaded()) { - // version check - QString version = pluginLoader.metaData().value("MetaData").toObject().value("version").toString(); - if (version != VERSION) { - qWarning() << "Plugin version check failed:" << fileName << "version," << "iface version : " << VERSION; - continue; - } - } else { - qWarning() << "Fail to load fileName"; + // version check + QString version = pluginLoader.metaData().value("MetaData").toObject().value("version").toString(); + if (version != VERSION) { + qWarning() << "Plugin version check failed:" << fileName << "version," << "iface version : " << VERSION; continue; }