mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
- Drag'n drop to labels cleanup
This commit is contained in:
parent
18bd3b855c
commit
5d60295db3
2 changed files with 2 additions and 23 deletions
24
src/GUI.cpp
24
src/GUI.cpp
|
@ -598,28 +598,8 @@ void GUI::dragEnterEvent(QDragEnterEvent *event) {
|
||||||
foreach(const QString &mime, event->mimeData()->formats()){
|
foreach(const QString &mime, event->mimeData()->formats()){
|
||||||
qDebug("mimeData: %s", mime.toLocal8Bit().data());
|
qDebug("mimeData: %s", mime.toLocal8Bit().data());
|
||||||
}
|
}
|
||||||
if (event->mimeData()->hasFormat("application/x-qstandarditemmodeldatalist")) {
|
if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) {
|
||||||
if(childAt(event->pos()) == transferListFilters) {
|
event->acceptProposedAction();
|
||||||
qDebug("DragEnterEvent: torrent to filter list, accepting...");
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) {
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GUI::dragMoveEvent(QDragMoveEvent *event) {
|
|
||||||
if (event->mimeData()->hasFormat("application/x-qstandarditemmodeldatalist")) {
|
|
||||||
if(childAt(event->pos()) == transferListFilters) {
|
|
||||||
qDebug("DragMoveEvent: torrent to filter list, accepting...");
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) {
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||||
// GUI related slots
|
// GUI related slots
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event);
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event);
|
||||||
void dragMoveEvent(QDragMoveEvent *event);
|
|
||||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||||
void on_actionAbout_triggered();
|
void on_actionAbout_triggered();
|
||||||
void on_actionCreate_torrent_triggered();
|
void on_actionCreate_torrent_triggered();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue