Commit 12d14c36 authored by Volker Krause's avatar Volker Krause Committed by Alexander Lohnau
Browse files

Port away from deprecated KDeclarative API

parent 2a2303fc
Pipeline #179323 passed with stage
in 53 seconds
......@@ -15,7 +15,6 @@ target_link_libraries(cuttlefish
Qt::Widgets # for QDirModel
KF5::Plasma
KF5::KIOWidgets
KF5::Declarative
KF5::ConfigWidgets
KF5::I18n
KF5::IconThemes
......
......@@ -15,7 +15,6 @@
// Frameworks
#include <KConfigGroup>
#include <KDeclarative/KDeclarative>
#include <KLocalizedString>
#include <KPackage/PackageLoader>
#include <Plasma/Theme>
......@@ -90,11 +89,9 @@ int main(int argc, char **argv)
QQmlApplicationEngine engine;
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(&engine);
kdeclarative.setTranslationDomain(QStringLiteral("cuttlefish"));
kdeclarative.setupContext();
kdeclarative.setupEngine(&engine);
auto l10nContext = new KLocalizedContext(&engine);
l10nContext->setTranslationDomain(QStringLiteral("cuttlefish"));
engine.rootContext()->setContextObject(l10nContext);
auto package = KPackage::PackageLoader::self()->loadPackage("Plasma/Generic");
package.setPath("org.kde.plasma.cuttlefish");
......
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