comparison framework/MainWindowBase.cpp @ 392:75af0658be84

Connect the signal only once!
author Chris Cannam
date Wed, 13 Aug 2014 11:32:35 +0100
parents 9e31759254fe
children ff43500426da
comparison
equal deleted inserted replaced
391:9e31759254fe 392:75af0658be84
334 // "ambiguous shortcut" errors from the menu entry actions and 334 // "ambiguous shortcut" errors from the menu entry actions and
335 // will need to update the code.) 335 // will need to update the code.)
336 336
337 if (!m_menuShortcutMapper) { 337 if (!m_menuShortcutMapper) {
338 m_menuShortcutMapper = new QSignalMapper(this); 338 m_menuShortcutMapper = new QSignalMapper(this);
339 } 339 connect(m_menuShortcutMapper, SIGNAL(mapped(QObject *)),
340 340 this, SLOT(menuActionMapperInvoked(QObject *)));
341 connect(m_menuShortcutMapper, SIGNAL(mapped(QObject *)), 341 }
342 this, SLOT(menuActionMapperInvoked(QObject *)));
343 342
344 foreach (QAction *a, menu->actions()) { 343 foreach (QAction *a, menu->actions()) {
345 QWidgetList ww = a->associatedWidgets(); 344 QWidgetList ww = a->associatedWidgets();
346 bool hasButton = false; 345 bool hasButton = false;
347 foreach (QWidget *w, ww) { 346 foreach (QWidget *w, ww) {