[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/extragear/graphics/digikam/0.11/digikam
From: Andi Clemens <andi.clemens () gmx ! net>
Date: 2009-02-22 9:37:07
Message-ID: 1235295427.872971.433.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 929813 by aclemens:
Use (nearly) the same function signature as QMenu::exec() does. Don't
assume that the position of the click action is always QCursor::pos().
M +1 -1 albumfolderview.cpp
M +1 -1 albumiconview.cpp
M +2 -2 contextmenuhelper.cpp
M +2 -1 contextmenuhelper.h
M +1 -1 imagepreviewview.cpp
M +1 -1 tagfolderview.cpp
--- branches/extragear/graphics/digikam/0.11/digikam/albumfolderview.cpp #929812:929813
@@ -593,7 +593,7 @@
// special action handling --------------------------------
int actionId = 0;
- QAction* choice = cmhelper.exec(actionId);
+ QAction* choice = cmhelper.exec(QCursor::pos(), actionId);
switch (actionId)
{
case ContextMenuHelper::Unknown:
--- branches/extragear/graphics/digikam/0.11/digikam/albumiconview.cpp #929812:929813
@@ -605,7 +605,7 @@
// special action handling --------------------------------
int actionId = 0;
- QAction* choice = cmhelper.exec(actionId);
+ QAction* choice = cmhelper.exec(QCursor::pos(), actionId);
switch (actionId)
{
case ContextMenuHelper::GotoAlbum: emit signalGotoAlbumAndItem(iconItem); break;
--- branches/extragear/graphics/digikam/0.11/digikam/contextmenuhelper.cpp #929812:929813
@@ -364,9 +364,9 @@
addAction(trashAction);
}
-QAction* ContextMenuHelper::exec(int &id)
+QAction* ContextMenuHelper::exec(const QPoint& pos, int& id, QAction* at)
{
- QAction* choice = d->menu->exec(QCursor::pos());
+ QAction* choice = d->menu->exec(pos, at);
id = Unknown;
QMapIterator<int, QAction*> it(d->actions);
--- branches/extragear/graphics/digikam/0.11/digikam/contextmenuhelper.h #929812:929813
@@ -35,6 +35,7 @@
class QAction;
class QMenu;
+class QPoint;
class QString;
class KActionCollection;
@@ -120,7 +121,7 @@
virtual void addAlbumActions();
// execute the registered menu
- virtual QAction* exec(int &id);
+ virtual QAction* exec(const QPoint& pos, int& id, QAction* at = 0);
private:
--- branches/extragear/graphics/digikam/0.11/digikam/imagepreviewview.cpp #929812:929813
@@ -377,7 +377,7 @@
// special action handling --------------------------------
int actionId = 0;
- QAction* choice = cmhelper.exec(actionId);
+ QAction* choice = cmhelper.exec(QCursor::pos(), actionId);
switch (actionId)
{
case ContextMenuHelper::Unknown:
--- branches/extragear/graphics/digikam/0.11/digikam/tagfolderview.cpp #929812:929813
@@ -571,7 +571,7 @@
cmhelper.addAction("tag_edit");
int actionId = 0;
- QAction* choice = cmhelper.exec(actionId);
+ QAction* choice = cmhelper.exec(QCursor::pos(), actionId);
switch (actionId)
{
case ContextMenuHelper::Unknown:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic