Commit 4b523fb3 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Remove KDeclarative::setupEngine method call

We do not need the KIconProvider or any of the magic import paths on different runtime platforms in this project.
parent 701600b6
Pipeline #228535 passed with stage
in 1 minute and 40 seconds
......@@ -10,4 +10,3 @@ Dependencies:
'frameworks/kcompletion': '@stable'
'frameworks/kio': '@stable'
'frameworks/kwidgetsaddons': '@stable'
'frameworks/kdeclarative': '@stable'
......@@ -29,7 +29,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
I18n
KIO
WidgetsAddons
Declarative
)
find_package(PackageKitQt${QT_MAJOR_VERSION})
......
......@@ -7,7 +7,6 @@ target_link_libraries(SambaAcl
KF5::I18n
KF5::KIOWidgets
KF5::KIOCore
KF5::Declarative
Qt::Qml
Qt::QuickWidgets
)
......
......@@ -10,7 +10,6 @@
#include <QQuickWidget>
#include <QVBoxLayout>
#include <KDeclarative/KDeclarative>
#include <KIO/SpecialJob>
#include <KLocalizedContext>
#include <KLocalizedString>
......@@ -152,7 +151,6 @@ SambaACL::SambaACL(QObject *parent, const QList<QVariant> &args)
m_page->setAttribute(Qt::WA_TranslucentBackground);
auto widget = new QQuickWidget(engine, m_page.get());
KDeclarative::KDeclarative::setupEngine(widget->engine());
auto i18nContext = new KLocalizedContext(widget->engine());
i18nContext->setTranslationDomain(QStringLiteral(TRANSLATION_DOMAIN));
widget->engine()->rootContext()->setContextObject(i18nContext);
......
......@@ -25,7 +25,6 @@ target_link_libraries(sambausershareplugin
Qt::Qml
Qt::QuickWidgets
KF5::AuthCore
KF5::Declarative
)
if(SAMBA_INSTALL)
......
......@@ -22,7 +22,6 @@
#include <QDBusInterface>
#include <QDBusConnection>
#include <KDeclarative/KDeclarative>
#include <KLocalizedContext>
#include <KMessageBox>
#include <KPluginFactory>
......@@ -80,8 +79,7 @@ SambaUserSharePlugin::SambaUserSharePlugin(QObject *parent, const QList<QVariant
m_page.reset(new QWidget(qobject_cast<KPropertiesDialog *>(parent)));
m_page->setAttribute(Qt::WA_TranslucentBackground);
auto widget = new QQuickWidget(m_page.get());
// Load kdeclarative and set translation domain before setting the source so strings gets translated.
KDeclarative::KDeclarative::setupEngine(widget->engine());
// Set translation domain before setting the source so strings gets translated.
auto i18nContext = new KLocalizedContext(widget->engine());
i18nContext->setTranslationDomain(QStringLiteral(TRANSLATION_DOMAIN));
widget->engine()->rootContext()->setContextObject(i18nContext);
......
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