Commit 27710b95 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Remove unneeded check for comic Dataengine being valid

BUG: 452596

We do not really care, if the metadata of the plugin is valid, as long as we can
properly create the dataengine from it.

Test Plan:
With plasma-frameworks master, and this on Plasma/5.24 based revision, the dataengine can properly be loaded.

When intenitionally exporting a defunct plugin:
```cpp
class Dummy : public QObject
{
    Q_OBJECT

public:
    Dummy(QObject *parent, const QVariantList &args) {
    }
};
K_PLUGIN_CLASS_WITH_JSON(Dummy, "plasma-dataengine-comic.json")
```
The applet does not crash.
parent 5a0af75d
Pipeline #165092 passed with stage
in 2 minutes and 34 seconds
......@@ -465,7 +465,7 @@ void ComicApplet::updateComic(const QString &identifierSuffix)
const QString id = mCurrent.id();
setConfigurationRequired(id.isEmpty());
if (!id.isEmpty() && mEngine && mEngine->isValid()) {
if (!id.isEmpty() && mEngine) {
setBusy(true);
const QString identifier = id + QLatin1Char(':') + identifierSuffix;
......@@ -485,7 +485,7 @@ void ComicApplet::updateComic(const QString &identifierSuffix)
slotScaleToContent();
} else {
qWarning() << "Either no identifier was specified or the engine could not be created:"
<< "id" << id << "engine valid:" << (mEngine && mEngine->isValid());
<< "id" << id << "engine valid:" << mEngine;
setConfigurationRequired(true);
}
updateContextMenu();
......
......@@ -80,7 +80,7 @@ bool ComicArchiveJob::isValid() const
break;
}
return mEngine->isValid() && mZip && mZip->isOpen();
return mZip && mZip->isOpen();
}
void ComicArchiveJob::setToIdentifier(const QString &toIdentifier)
......
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