Commit c90e49cc authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Fix check for argument length in DataEngine loader

BUG: 452596

After i wrote the initial patch, we decided that the plasma-frameworks internal code which dumped
the entire KPluginMetaData object as a variant map in the args could be removed.
However, this change was not applied to the sanity check in the latest revision of the MR.
parent a44335c8
Pipeline #164972 passed with stage
in 2 minutes and 3 seconds
......@@ -56,7 +56,7 @@ DataEngine::DataEngine(QObject *parent, const QVariantList &args)
: QObject(parent)
{
KPluginMetaData data;
if (args.size() > 1 && args.first().canConvert<KPluginMetaData>()) {
if (!args.isEmpty() && args.first().canConvert<KPluginMetaData>()) {
data = args.first().value<KPluginMetaData>();
}
d = new DataEnginePrivate(this, data, args);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment