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;
DragHelper::DragHelper(QObject* parent) : QObject(parent)
, m_dragIconSize(32)
{
qmlRegisterType<QMimeData>("org.kde.milou", 1, 0, "MimeData");
}
DragHelper::~DragHelper()
......
......@@ -24,6 +24,7 @@
#include <QTextDocument>
#include <QTextCursor>
#include <QMimeData>
using namespace Milou;
......@@ -31,6 +32,11 @@ 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()
......
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