diff options
authorJan Kundrát <>2015-08-25 21:52:51 (GMT)
committerAlbert Astals Cid <>2015-08-25 21:53:21 (GMT)
commitcf513f3dd61ceb01069bf8f0614ecb5401452a71 (patch)
parentb44d70a6f2d7ab1b508c203764be4170567a4d83 (diff)
Fix picking of different view modes
This was broken since commit 077689c4 when this got ported away from KAction. The code attempted to add a parent QMenu to the QAction instances nested below that parent. I'm quite surprised that it didn't crash, but checkable actions do not go well with actions that have nested menus, apparently. I haven't checked the rest of the code for similar mistakes, but I don't see any other case of this bug in Okular's menus when reading PDFs. REVIEW: 124842
1 files changed, 0 insertions, 1 deletions
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 4528691..1973b22 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -520,7 +520,6 @@ void PageView::setupViewerActions( KActionCollection * ac )
#define ADD_VIEWMODE_ACTION( text, name, id ) \
do { \
QAction *vm = new QAction( text, this ); \
- vm->setMenu( d->aViewMode->menu() ); \
vm->setCheckable( true ); \
vm->setData( qVariantFromValue( id ) ); \
d->aViewMode->addAction( vm ); \