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

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

parent 72121356
......@@ -15,6 +15,7 @@
#include <QQmlContext>
#include <QQuickItem>
#include <kdeclarative_version.h>
#include <kquickiconprovider.h>
BuiltStack::BuiltStack(AssetPanel *parent)
: QQuickWidget(parent)
......@@ -22,7 +23,11 @@ BuiltStack::BuiltStack(AssetPanel *parent)
{
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(engine());
#if KDECLARATIVE_VERSION < QT_VERSION_CHECK(5, 98, 0)
kdeclarative.setupEngine(engine());
#else
engine()->addImageProvider(QStringLiteral("icon"), new KQuickIconProvider);
#endif
engine()->rootContext()->setContextObject(new KLocalizedContext(this));
// qmlRegisterType<ColorWheelItem>("Kdenlive.Controls", 1, 0, "ColorWheelItem");
......
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