- Cleanly fixed popup menus position in lists (no more workarounds)

This commit is contained in:
Christophe Dumez
2009-07-12 06:07:20 +00:00
parent e67d3243e8
commit 9b29302d42
5 changed files with 9 additions and 12 deletions

View File

@@ -355,7 +355,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();
@@ -399,8 +399,7 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
myFinishedListMenu.addAction(actionBuy_it);
// Call menu
// XXX: why mapToGlobal() is not enough?
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,58));
myFinishedListMenu.exec(QCursor::pos());
}