- 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

@ -387,7 +387,7 @@ void FinishedTorrents::forceRecheck(){
}
}
void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
void FinishedTorrents::displayFinishedListMenu(const QPoint&){
QMenu myFinishedListMenu(this);
// Enable/disable pause/start action given the DL state
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
@ -431,8 +431,7 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
myFinishedListMenu.addAction(actionBuy_it);
// Call menu
// XXX: why mapToGlobal() is not enough?
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(12,35));
myFinishedListMenu.exec(QCursor::pos());
}