diff --git a/frame/item/appitem.cpp b/frame/item/appitem.cpp index e460e97df..b4a99cc56 100644 --- a/frame/item/appitem.cpp +++ b/frame/item/appitem.cpp @@ -10,14 +10,13 @@ int AppItem::IconBaseSize; QPoint AppItem::MousePressPos; -DBusClientManager *AppItem::ClientInter = nullptr; AppItem::AppItem(const QDBusObjectPath &entry, QWidget *parent) : DockItem(App, parent), m_itemEntry(new DBusDockEntry(entry.path(), this)), m_draging(false) { - initClientManager(); + setAcceptDrops(true); m_id = m_itemEntry->id(); m_active = m_itemEntry->active(); @@ -184,6 +183,11 @@ void AppItem::resizeEvent(QResizeEvent *e) updateIcon(); } +void AppItem::dragEnterEvent(QDragEnterEvent *e) +{ + qDebug() << e; +} + void AppItem::invokedMenuItem(const QString &itemId, const bool checked) { Q_UNUSED(checked); @@ -222,14 +226,6 @@ void AppItem::startDrag() update(); } -void AppItem::initClientManager() -{ - if (ClientInter) - return; - - ClientInter = new DBusClientManager(this); -} - void AppItem::updateTitle() { m_titles = m_itemEntry->titles(); diff --git a/frame/item/appitem.h b/frame/item/appitem.h index 60b084455..a836861c7 100644 --- a/frame/item/appitem.h +++ b/frame/item/appitem.h @@ -24,6 +24,7 @@ private: void mousePressEvent(QMouseEvent *e); void mouseMoveEvent(QMouseEvent *e); void resizeEvent(QResizeEvent *e); + void dragEnterEvent(QDragEnterEvent *e); void invokedMenuItem(const QString &itemId, const bool checked); const QString contextMenu() const; @@ -49,7 +50,6 @@ private: static int IconBaseSize; static QPoint MousePressPos; - static DBusClientManager *ClientInter; }; #endif // APPITEM_H diff --git a/frame/panel/mainpanel.cpp b/frame/panel/mainpanel.cpp index 81da08a26..b07598733 100644 --- a/frame/panel/mainpanel.cpp +++ b/frame/panel/mainpanel.cpp @@ -109,7 +109,6 @@ void MainPanel::dragLeaveEvent(QDragLeaveEvent *e) void MainPanel::dropEvent(QDropEvent *e) { Q_UNUSED(e) -// qDebug() << e; } void MainPanel::initItemConnection(DockItem *item)