Commit 2240a67b authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Instantiate comic dataengine class directly and not use plugin

parent 14f8d998
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.comic\")
add_subdirectory(engine)
set(comic_SRCS
comic.cpp
comicmodel.cpp
......@@ -28,7 +30,8 @@ target_link_libraries(org.kde.plasma.comic
KF5::KIOWidgets
KF5::NewStuff
KF5::Notifications
KF5::Archive)
KF5::Archive
plasma_engine_comic)
install(FILES comic.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR})
plasma_install_package(package org.kde.plasma.comic)
......
......@@ -35,6 +35,7 @@
#include "comicmodel.h"
#include "comicupdater.h"
#include "engine/comic.h"
Q_GLOBAL_STATIC(ComicUpdater, globalComicUpdater)
......@@ -69,7 +70,7 @@ void ComicApplet::init()
configChanged();
mEngine = dataEngine(QStringLiteral("comic"));
mEngine = new ComicEngine();
mModel = new ComicModel(mEngine, QStringLiteral("providers"), mTabIdentifier, this);
mProxy = new QSortFilterProxyModel(this);
mProxy->setSourceModel(mModel);
......@@ -465,7 +466,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;
......
......@@ -20,7 +20,7 @@ set(comic_engine_SRCS
${LOGGING_SRCS}
)
kcoreaddons_add_plugin(plasma_engine_comic SOURCES ${comic_engine_SRCS} INSTALL_NAMESPACE "plasma/dataengine")
add_library(plasma_engine_comic STATIC ${comic_engine_SRCS})
target_link_libraries(plasma_engine_comic plasmacomicprovidercore
Qt::Qml
......
......@@ -21,8 +21,8 @@
#include "comic_debug.h"
#include "comicproviderkross.h"
ComicEngine::ComicEngine(QObject *parent, const QVariantList &args)
: Plasma::DataEngine(parent, args)
ComicEngine::ComicEngine()
: Plasma::DataEngine(nullptr, QVariantList())
, mEmptySuffix(false)
{
setPollingInterval(0);
......@@ -315,6 +315,4 @@ QString ComicEngine::lastCachedIdentifier(const QString &identifier) const
return previousIdentifier;
}
K_PLUGIN_CLASS_WITH_JSON(ComicEngine, "plasma-dataengine-comic.json")
#include "comic.moc"
......@@ -31,7 +31,7 @@ class ComicEngine : public Plasma::DataEngine
Q_OBJECT
public:
ComicEngine(QObject *parent, const QVariantList &args);
ComicEngine();
~ComicEngine() override;
public Q_SLOTS:
......
add_subdirectory(comic)
add_subdirectory(konsoleprofiles)
{
"KPlugin": {
"Authors": [
{
"Email": "",
"Name": ""
}
],
"Category": "",
"Description": "Online comic strips",
"Description[ar]": "شرائط هزلية على الويب",
"Description[az]": "Onlayn komikslər",
"Description[ca@valencia]": "Tires còmiques en línia",
"Description[ca]": "Tires còmiques en línia",
"Description[cs]": "Online komiksové proužky",
"Description[de]": "Online-Comics",
"Description[en_GB]": "Online comic strips",
"Description[es]": "Tiras de cómics en línea",
"Description[eu]": "Lerroko komiki zerrendak",
"Description[fi]": "Verkkosarjakuvastripit",
"Description[fr]": "Bandes dessinées en ligne",
"Description[ia]": "Bandas de comic in linea",
"Description[it]": "Strisce di fumetti in rete",
"Description[ja]": "オンライン コミック・ストリップ",
"Description[ko]": "온라인 만화",
"Description[lt]": "Internetinės komiksų piešinių serijos",
"Description[nl]": "Online stripverhalen",
"Description[nn]": "Teikneseriar på nettet",
"Description[pl]": "Komiksy online",
"Description[pt]": "Bandas desenhadas 'online'",
"Description[pt_BR]": "Tirinhas online",
"Description[ro]": "Benzi desenate online",
"Description[ru]": "Стрипы комиксов из сети",
"Description[sk]": "Online komiksové pásy",
"Description[sl]": "Spletni komični stripi",
"Description[sv]": "Tecknade serier på nätet",
"Description[tr]": "Çevrimiçi çizgi roman şeritleri",
"Description[uk]": "Мережеві стрічки коміксів",
"Description[vi]": "Truyện tranh trực tuyến",
"Description[x-test]": "xxOnline comic stripsxx",
"Description[zh_CN]": "在线连环画",
"Icon": "face-smile-big",
"Id": "comic",
"Name": "Comic Strips",
"Name[ar]": "شرائط هزلية",
"Name[az]": "Komikslər",
"Name[ca@valencia]": "Tires còmiques",
"Name[ca]": "Tires còmiques",
"Name[cs]": "Komiksové proužky",
"Name[de]": "Comics",
"Name[en_GB]": "Comic Strips",
"Name[es]": "Tiras de cómics",
"Name[eu]": "Komiki zerrendak",
"Name[fi]": "Sarjakuvastripit",
"Name[fr]": "Bandes dessinées",
"Name[ia]": "Bandas de comic",
"Name[it]": "Strisce di fumetti",
"Name[ja]": "コミック・ストリップ",
"Name[ko]": "만화",
"Name[lt]": "Komiksų piešinių serijos",
"Name[nl]": "Stripverhalen",
"Name[nn]": "Teikne­seriar",
"Name[pl]": "Komiksy",
"Name[pt]": "Bandas Desenhadas",
"Name[pt_BR]": "Tirinhas",
"Name[ro]": "Benzi desenate",
"Name[ru]": "Комиксы",
"Name[sk]": "Komiksové pásy",
"Name[sl]": "Comic Strips",
"Name[sv]": "Tecknad serie",
"Name[tr]": "Çizgi Roman Şeritleri",
"Name[uk]": "Комічна стрічка",
"Name[vi]": "Truyện tranh",
"Name[x-test]": "xxComic Stripsxx",
"Name[zh_CN]": "连环画"
}
}
{
"KPlugin": {
"Description": "Plugin for Plasma Comic Engine",
"Description[ar]": "ملحق لمحرك Comic",
"Description[az]": "Plasma Comic mühərriki üçün qoşma",
"Description[ca@valencia]": "Connector per al motor de còmics del Plasma",
"Description[ca]": "Connector per al motor de còmics del Plasma",
"Description[cs]": "Modul pro Plasma komiksy",
"Description[de]": "Modul für den Plasma-Comic-Datentreiber",
"Description[en_GB]": "Plugin for Plasma Comic Engine",
"Description[es]": "Complemento para el motor de cómics de Plasma",
"Description[eu]": "Plasma komiki motorrarentzako plugina",
"Description[fi]": "Plasma-sarjakuvamoottoriliitännäinen",
"Description[fr]": "Module externe pour le moteur « Comic » de Plasma",
"Description[ia]": "Pligin per Plasma Comic Engine (Motor de Comic de Plasma)",
"Description[it]": "Estensione per il motore di fumetti di Plasma",
"Description[ja]": "Plasma 漫画エンジンのためのプラグインです",
"Description[ko]": "Plasma 만화 엔진 플러그인",
"Description[lt]": "Plasma komiksų modulio priedas",
"Description[nl]": "Plug-in voor Plasma-stripboek-gegevensengine",
"Description[nn]": "Programtillegg for teikneseriar",
"Description[pl]": "Wtyczka silnika danych komiksów",
"Description[pt]": "'Plugin' para o Motor de Bandas Desenhadas do Plasma",
"Description[pt_BR]": "Plugin para o mecanismo das tirinhas do Plasma",
"Description[ro]": "Extensie pentru Motorul de benzi desenate Plasma",
"Description[ru]": "Модуль для движка Plasma Comic",
"Description[sk]": "Zásuvný modul pre Plasma Comic Engine",
"Description[sl]": "Vtičnik za Plasma Comic Engine",
"Description[sv]": "Insticksprogram för Plasma seriegränssnitt",
"Description[tr]": "Plasma Çizgi Roman Motoru için eklenti",
"Description[uk]": "Додаток для джерела жартів Плазми",
"Description[vi]": "Phần cài cắm cho \"Dụng cụ truyện tranh Plasma\"",
"Description[x-test]": "xxPlugin for Plasma Comic Enginexx",
"Description[zh_CN]": "Plasma 连环画引擎插件"
}
}
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