Commit 0308839d authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Remove KDeclarative dependency

KI18n QML bindings are provided by KI18n directly nowadays.
parent 25b92240
...@@ -51,7 +51,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS ...@@ -51,7 +51,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Config Config
ConfigWidgets ConfigWidgets
CoreAddons CoreAddons
Declarative
DocTools DocTools
I18n I18n
ItemViews ItemViews
......
...@@ -135,7 +135,6 @@ target_link_libraries(ktouch ...@@ -135,7 +135,6 @@ target_link_libraries(ktouch
Qt5::XmlPatterns Qt5::XmlPatterns
KF5::Completion KF5::Completion
KF5::ConfigWidgets KF5::ConfigWidgets
KF5::Declarative
KF5::ItemViews KF5::ItemViews
KF5::XmlGui KF5::XmlGui
KF5::I18n KF5::I18n
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
#include <QQuickStyle> #include <QQuickStyle>
#include <QStandardPaths> #include <QStandardPaths>
#include <KLocalizedContext>
#include <Kdelibs4ConfigMigrator> #include <Kdelibs4ConfigMigrator>
#include <Kdelibs4Migration> #include <Kdelibs4Migration>
#include <KDeclarative/KDeclarative>
#include "bindings/utils.h" #include "bindings/utils.h"
#include "bindings/stringformatter.h" #include "bindings/stringformatter.h"
...@@ -85,10 +85,9 @@ QPointer<ResourceEditor>& Application::resourceEditorRef() ...@@ -85,10 +85,9 @@ QPointer<ResourceEditor>& Application::resourceEditorRef()
void Application::setupDeclarativeBindings(QQmlEngine* qmlEngine) void Application::setupDeclarativeBindings(QQmlEngine* qmlEngine)
{ {
KDeclarative::KDeclarative kDeclarative; // prepare i18n
kDeclarative.setDeclarativeEngine(qmlEngine); auto context = new KLocalizedContext(qmlEngine);
kDeclarative.setupContext(); qmlEngine->rootContext()->setContextObject(context);
kDeclarative.setupEngine(qmlEngine);
Application* app = static_cast<Application*>(Application::instance()); Application* app = static_cast<Application*>(Application::instance());
foreach (const QString& path, app->m_qmlImportPaths) foreach (const QString& path, app->m_qmlImportPaths)
......
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