Commit 18f5de5b authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr

Remove KDeclarative dependency

I18n bindings are provided by KI18n directly nowadays.
parent 21b1e8fc
......@@ -23,7 +23,7 @@ else()
add_definitions(-DHAVE_SPEECH)
endif()
find_package(ECM 1.7.0 NO_MODULE REQUIRED)
find_package(ECM 5.17.0 NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(ECMAddAppIcon)
......@@ -40,7 +40,6 @@ find_package(KF5 REQUIRED COMPONENTS
Config
ConfigWidgets
CoreAddons
Declarative
DocTools
KIO
NewStuff
......
......@@ -42,7 +42,6 @@ target_link_libraries(kanagram
KF5::I18n
KF5::NewStuff
KF5::SonnetCore
KF5::Declarative
KF5::Crash
LibKEduVocDocumentImport__KEduVocDocument
)
......
......@@ -30,8 +30,8 @@
#include <QQmlContext>
#include <QQmlEngine>
#include <KDeclarative/KDeclarative>
#include <KHelpMenu>
#include <KLocalizedContext>
#include <KLocalizedString>
#include <KSharedConfig>
......@@ -48,13 +48,9 @@ MainWindow::MainWindow()
rootContext()->setContextProperty(QStringLiteral("application"), qApp);
rootContext()->setContextProperty(QStringLiteral("mainwindow"), this);
qCDebug(KANAGRAM) << "Set all context properties";
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(engine());
kdeclarative.setupContext();
qCDebug(KANAGRAM) << "Setup declarative engine";
// prepare i18n
auto context = new KLocalizedContext(this);
engine()->rootContext()->setContextObject(context);
KConfigGroup windowConfig = config(QStringLiteral("Window"));
if (windowConfig.hasKey("geometry")) {
......
Markdown is supported
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