changeset 393:ff43500426da

More debug
author Chris Cannam
date Wed, 13 Aug 2014 11:49:45 +0100
parents 75af0658be84
children 71b21d6e66be
files framework/MainWindowBase.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Wed Aug 13 11:32:35 2014 +0100
+++ b/framework/MainWindowBase.cpp	Wed Aug 13 11:49:45 2014 +0100
@@ -340,6 +340,12 @@
                 this, SLOT(menuActionMapperInvoked(QObject *)));
     }
 
+    cerr << "examining menu: " << menu << ", " << menu->title() << endl;
+    QMenu *pm = qobject_cast<QMenu *>(menu->parent());
+    if (pm) {
+        cerr << "(sub-menu of: " << pm << ", " << pm->title() << ")" << endl;
+    }
+
     foreach (QAction *a, menu->actions()) {
         QWidgetList ww = a->associatedWidgets();
         bool hasButton = false;
@@ -355,7 +361,7 @@
             QShortcut *newSc = new QShortcut(sc, a->parentWidget());
             QObject::connect(newSc, SIGNAL(activated()),
                              m_menuShortcutMapper, SLOT(map()));
-            cerr << "setting mapping for action " << a << ", name " << a->text() << " on mapper " << m_menuShortcutMapper << " through shortcut " << newSc << endl;
+            cerr << "setting mapping for action " << a << ", name " << a->text() << " on mapper " << m_menuShortcutMapper << " through shortcut " << newSc << " with key " << newSc->key().toString() << endl;
             m_menuShortcutMapper->setMapping(newSc, a);
             m_appShortcuts.push_back(newSc);
         }