mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
perf(contentdialog): Delete redundant conditions
This commit is contained in:
parent
2143e21e89
commit
904a1d4909
|
@ -518,7 +518,7 @@ void ContentDialog::dragEnterEvent(QDragEnterEvent *event)
|
||||||
auto iter = friendList.find(friendId);
|
auto iter = friendList.find(friendId);
|
||||||
|
|
||||||
// If friend is already in a dialog then you can't drop friend where it already is.
|
// If friend is already in a dialog then you can't drop friend where it already is.
|
||||||
if (iter == friendList.end() || (iter != friendList.end() && std::get<0>(iter.value()) != this))
|
if (iter == friendList.end() || std::get<0>(iter.value()) != this)
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
}
|
}
|
||||||
else if (event->mimeData()->hasFormat("group"))
|
else if (event->mimeData()->hasFormat("group"))
|
||||||
|
@ -526,7 +526,7 @@ void ContentDialog::dragEnterEvent(QDragEnterEvent *event)
|
||||||
int groupId = event->mimeData()->data("group").toInt();
|
int groupId = event->mimeData()->data("group").toInt();
|
||||||
auto iter = groupList.find(groupId);
|
auto iter = groupList.find(groupId);
|
||||||
|
|
||||||
if (iter == groupList.end() || (iter != groupList.end() && std::get<0>(iter.value()) != this))
|
if (iter == groupList.end() || std::get<0>(iter.value()) != this)
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user