修复了一个愚蠢的错误。

This commit is contained in:
iaom 2022-03-15 14:41:37 +08:00
parent 4e3a9d93c6
commit fb7852e8fe
1 changed files with 4 additions and 9 deletions

View File

@ -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;
}