mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fixed(dock): fixed the bug 8232 for dde-trash can reside in app area
This commit is contained in:
parent
abc6a9dda3
commit
0a4ef381d1
@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
#include <QDrag>
|
#include <QDrag>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
|
||||||
@ -343,6 +345,12 @@ void MainPanelControl::dragEnterEvent(QDragEnterEvent *e)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//如果当前从桌面拖拽的的app是trash,则不能放入app任务栏中
|
||||||
|
QString str = "file://";
|
||||||
|
str.append(QStandardPaths::locate(QStandardPaths::DesktopLocation, "dde-trash.desktop"));
|
||||||
|
if (str == e->mimeData()->data(m_draggingMimeKey))
|
||||||
|
return;
|
||||||
|
|
||||||
if (m_delegate && m_delegate->appIsOnDock(e->mimeData()->data(m_draggingMimeKey)))
|
if (m_delegate && m_delegate->appIsOnDock(e->mimeData()->data(m_draggingMimeKey)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user