fixed(dock): fixed the bug 8232 for dde-trash can reside in app area

This commit is contained in:
wangxuwen 2019-09-09 13:26:27 +08:00
parent abc6a9dda3
commit 0a4ef381d1

View File

@ -28,6 +28,8 @@
#include <QDrag>
#include <QTimer>
#include <QStandardPaths>
#include <QString>
DWIDGET_USE_NAMESPACE
@ -343,6 +345,12 @@ void MainPanelControl::dragEnterEvent(QDragEnterEvent *e)
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)))
return;