- Cleanly fixed popup menu positions in lists (no more workarounds)

This commit is contained in:
Christophe Dumez
2009-07-12 06:00:27 +00:00
parent 0308825c11
commit 106f7cdd32
4 changed files with 8 additions and 12 deletions

View File

@@ -236,7 +236,7 @@ void DownloadingTorrents::forceRecheck() {
}
}
void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
void DownloadingTorrents::displayDLListMenu(const QPoint&) {
QMenu myDLLlistMenu(this);
// Enable/disable pause/start action given the DL state
QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes();
@@ -285,8 +285,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
myDLLlistMenu.addSeparator();
myDLLlistMenu.addAction(actionBuy_it);
// Call menu
// XXX: why mapToGlobal() is not enough?
myDLLlistMenu.exec(mapToGlobal(pos)+QPoint(10,35));
myDLLlistMenu.exec(QCursor::pos());
}