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
Config
ConfigWidgets
CoreAddons
Declarative
DocTools
I18n
ItemViews
......
......@@ -135,7 +135,6 @@ target_link_libraries(ktouch
Qt5::XmlPatterns
KF5::Completion
KF5::ConfigWidgets
KF5::Declarative
KF5::ItemViews
KF5::XmlGui
KF5::I18n
......
......@@ -25,9 +25,9 @@
#include <QQuickStyle>
#include <QStandardPaths>
#include <KLocalizedContext>
#include <Kdelibs4ConfigMigrator>
#include <Kdelibs4Migration>
#include <KDeclarative/KDeclarative>
#include "bindings/utils.h"
#include "bindings/stringformatter.h"
......@@ -85,10 +85,9 @@ QPointer<ResourceEditor>& Application::resourceEditorRef()
void Application::setupDeclarativeBindings(QQmlEngine* qmlEngine)
{
KDeclarative::KDeclarative kDeclarative;
kDeclarative.setDeclarativeEngine(qmlEngine);
kDeclarative.setupContext();
kDeclarative.setupEngine(qmlEngine);
// prepare i18n
auto context = new KLocalizedContext(qmlEngine);
qmlEngine->rootContext()->setContextObject(context);
Application* app = static_cast<Application*>(Application::instance());
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