Commit 011a6e27 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Remove KDeclarative dependency

I18n bindings are provided by KI18n directly nowadays.
parent a01c92b7
......@@ -11,7 +11,7 @@ project(khangman VERSION ${RELEASE_SERVICE_VERSION})
include(FeatureSummary)
find_package(Qt5 REQUIRED COMPONENTS Core Qml Quick QuickWidgets Svg)
find_package(ECM 1.7.0 NO_MODULE REQUIRED)
find_package(ECM 5.15.0 NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
......@@ -22,14 +22,13 @@ include(GenerateExportHeader)
include(ECMAddAppIcon)
include(ECMSetupVersion)
find_package(KF5 5.15.0 REQUIRED COMPONENTS
find_package(KF5 5.17.0 REQUIRED COMPONENTS
I18n
Crash
Completion
Config
CoreAddons
ConfigWidgets
Declarative
DocTools
NewStuff
Notifications
......
......@@ -18,7 +18,6 @@ target_link_libraries(khangman
KF5::Crash
KF5::I18n
KF5::NewStuff
KF5::Declarative
LibKEduVocDocumentImport__KEduVocDocument
)
......
......@@ -22,15 +22,15 @@
#include "khangman.h"
#include <QApplication>
#include <QDir>
#include <QStandardPaths>
#include <QQuickWidget>
#include <QQmlContext>
#include <QQmlEngine>
#include <QPointer>
#include <KDeclarative/KDeclarative>
#include <KLocalizedContext>
#include <KLocalizedString>
#include <KMessageBox>
#include <KRandomSequence>
......@@ -62,9 +62,9 @@ KHangMan::KHangMan()
m_view = new QQuickWidget(this);
m_view->rootContext()->setContextProperty(QStringLiteral("khangman"), this);
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(m_view->engine());
kdeclarative.setupContext();
// prepare i18n
auto context = new KLocalizedContext(this);
m_view->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