Show a warning if a plugin requires a newer version

Summary: Currently it just fails silently.

Test Plan: Loaded a plasmoid with an incompatible plugin, warning is shown.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel, plasma-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19394
This commit is contained in:
Fabian Vogt 2019-02-27 18:51:07 +01:00
parent 0359e25396
commit 02ec1b77c2

View File

@ -904,11 +904,9 @@ bool PluginLoader::isPluginVersionCompatible(KPluginLoader &loader)
const quint32 maxVersion = PLASMA_MAKE_VERSION(PLASMA_VERSION_MAJOR, PLASMA_VERSION_MINOR, 60);
if (version < minVersion || version > maxVersion) {
#ifndef NDEBUG
qCDebug(LOG_PLASMA) << loader.fileName() << ": this plugin is compiled against incompatible Plasma version" << version
qCWarning(LOG_PLASMA) << loader.fileName() << ": this plugin is compiled against incompatible Plasma version" << version
<< "This build is compatible with" << PLASMA_VERSION_MAJOR << ".0.0 (" << minVersion
<< ") to" << PLASMA_VERSION_STRING << "(" << maxVersion << ")";
#endif
return false;
}