Implement Qml drag and drop

This commit is contained in:
Nicolas Werner 2020-11-25 17:02:23 +01:00
parent 0eb8d4126b
commit c74077a41f
9 changed files with 104 additions and 5 deletions

View file

@ -1,6 +1,7 @@
#include "TimelineViewManager.h"
#include <QDesktopServices>
#include <QDropEvent>
#include <QMetaType>
#include <QPalette>
#include <QQmlContext>
@ -20,6 +21,7 @@
#include "dialogs/ImageOverlay.h"
#include "emoji/EmojiModel.h"
#include "emoji/Provider.h"
#include "ui/NhekoDropArea.h"
#include <iostream> //only for debugging
@ -115,6 +117,7 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par
qmlRegisterType<DelegateChoice>("im.nheko", 1, 0, "DelegateChoice");
qmlRegisterType<DelegateChooser>("im.nheko", 1, 0, "DelegateChooser");
qmlRegisterType<NhekoDropArea>("im.nheko", 1, 0, "NhekoDropArea");
qmlRegisterUncreatableType<DeviceVerificationFlow>(
"im.nheko", 1, 0, "DeviceVerificationFlow", "Can't create verification flow from QML!");
qmlRegisterUncreatableType<UserProfile>(