Commit 45b43c39 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

Port away from deprecated KDeclarative::setupEngine() Pt.3

parent f2083aee
......@@ -16,7 +16,7 @@
#include <QStandardPaths>
#include <kdeclarative_version.h>
#if KDECLARATIVE_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include <kquickiconprovider.h>
#include <KQuickIconProvider>
#endif
AssetListWidget::AssetListWidget(QWidget *parent)
......
......@@ -16,7 +16,7 @@
#include <QQuickItem>
#include <kdeclarative_version.h>
#if KDECLARATIVE_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include <kquickiconprovider.h>
#include <KQuickIconProvider>
#endif
BuiltStack::BuiltStack(AssetPanel *parent)
......
......@@ -13,17 +13,20 @@
*/
#include <KDeclarative/KDeclarative>
#include <kdeclarative_version.h>
#if KDECLARATIVE_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include <KQuickIconProvider>
#endif
#include <KLocalizedContext>
#include <KLocalizedString>
#include <KMessageBox>
#include <QApplication>
#include <QFontDatabase>
#include <QOpenGLContext>
#include <QOpenGLFunctions_3_2_Core>
#include <QPainter>
#include <QQmlContext>
#include <QQuickItem>
#include <QOpenGLContext>
#include <kdeclarative_version.h>
#include <klocalizedstring.h>
#include <memory>
#include "core.h"
......@@ -103,9 +106,13 @@ GLWidget::GLWidget(int id, QWidget *parent)
, m_ClientWaitSync(nullptr)
{
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(engine());
#if KDECLARATIVE_VERSION < QT_VERSION_CHECK(5, 98, 0)
kdeclarative.setupEngine(engine());
auto *localizedContextObject = new KLocalizedContext(engine());
engine()->rootContext()->setContextObject(localizedContextObject);
#else
engine()->addImageProvider(QStringLiteral("icon"), new KQuickIconProvider);
#endif
engine()->rootContext()->setContextObject(new KLocalizedContext(this));
m_texture[0] = m_texture[1] = m_texture[2] = 0;
qRegisterMetaType<Mlt::Frame>("Mlt::Frame");
......
......@@ -37,7 +37,7 @@
#include <QUuid>
#include <kdeclarative_version.h>
#if KDECLARATIVE_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include <kquickiconprovider.h>
#include <KQuickIconProvider>
#endif
const int TimelineWidget::comboScale[] = {1, 2, 4, 8, 15, 30, 50, 75, 100, 150, 200, 300, 500, 800, 1000, 1500, 2000, 3000, 6000, 15000, 30000};
......
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