Commit 3c63c51b authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Merge branch 'Plasma/5.18'

parents 4d5c1c5b 92ecad19
......@@ -24,7 +24,6 @@
#include <QTextDocument>
#include <QTextCursor>
#include <QMimeData>
using namespace Milou;
......@@ -32,11 +31,7 @@ PreviewPlugin::PreviewPlugin(QObject* parent)
: QObject(parent)
, m_context(nullptr)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
qmlRegisterAnonymousType<QMimeData>("org.kde.milou", 1);
#else
qmlRegisterType<QMimeData>();
#endif
}
PreviewPlugin::~PreviewPlugin()
......
......@@ -29,6 +29,7 @@
#include "mousehelper.h"
#include <QQmlEngine>
#include <QMimeData>
void QmlPlugins::initializeEngine(QQmlEngine *, const char *)
{
......@@ -44,5 +45,10 @@ void QmlPlugins::registerTypes(const char *uri)
[](QQmlEngine*, QJSEngine*) -> QObject* {
return new Milou::MouseHelper();
});
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
qmlRegisterAnonymousType<QMimeData>(uri, 0);
#else
qmlRegisterType<QMimeData>();
#endif
}
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