Commit 7a6b1a03 authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

Use qmlRegisterAnonymousType

Reviewers: broulik

Reviewed By: broulik

Subscribers: meven, broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26489
parent 33f31fb7
...@@ -29,7 +29,6 @@ using namespace Milou; ...@@ -29,7 +29,6 @@ using namespace Milou;
DragHelper::DragHelper(QObject* parent) : QObject(parent) DragHelper::DragHelper(QObject* parent) : QObject(parent)
, m_dragIconSize(32) , m_dragIconSize(32)
{ {
qmlRegisterType<QMimeData>("org.kde.milou", 1, 0, "MimeData");
} }
DragHelper::~DragHelper() DragHelper::~DragHelper()
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <QTextDocument> #include <QTextDocument>
#include <QTextCursor> #include <QTextCursor>
#include <QMimeData>
using namespace Milou; using namespace Milou;
...@@ -31,6 +32,11 @@ PreviewPlugin::PreviewPlugin(QObject* parent) ...@@ -31,6 +32,11 @@ PreviewPlugin::PreviewPlugin(QObject* parent)
: QObject(parent) : QObject(parent)
, m_context(nullptr) , m_context(nullptr)
{ {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
qmlRegisterAnonymousType<QMimeData>("org.kde.milou", 1);
#else
qmlRegisterType<QMimeData>();
#endif
} }
PreviewPlugin::~PreviewPlugin() PreviewPlugin::~PreviewPlugin()
......
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