void wxWindowQt::SetAcceleratorTable( const wxAcceleratorTable& accel ) { wxWindowBase::SetAcceleratorTable( accel ); // Disable previously set accelerators #if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */ # pragma ivdep # pragma swp # pragma unroll # pragma prefetch # if 0 # pragma simd noassert # endif #endif /* VDM auto patch */ while ( !m_qtShortcuts.isEmpty() ) delete m_qtShortcuts.takeFirst(); // Create new shortcuts (use GetHandle() so all events inside // the window are handled, not only in the container subwindow) m_qtShortcuts = accel.ConvertShortcutTable( GetHandle() ); // Connect shortcuts to window Q_FOREACH( QShortcut *s, m_qtShortcuts ) { QObject::connect( s, &QShortcut::activated, m_qtShortcutHandler, &wxQtShortcutHandler::activated ); QObject::connect( s, &QShortcut::activatedAmbiguously, m_qtShortcutHandler, &wxQtShortcutHandler::activated ); }
void wxWindowQt::SetAcceleratorTable( const wxAcceleratorTable& accel ) { wxWindowBase::SetAcceleratorTable( accel ); // Disable previously set accelerators while ( !m_qtShortcuts.isEmpty() ) delete m_qtShortcuts.takeFirst(); // Create new shortcuts (use GetHandle() so all events inside // the window are handled, not only in the container subwindow) m_qtShortcuts = accel.ConvertShortcutTable( GetHandle() ); // Connect shortcuts to window Q_FOREACH( QShortcut *s, m_qtShortcuts ) { QObject::connect( s, &QShortcut::activated, m_qtShortcutHandler, &wxQtShortcutHandler::activated ); QObject::connect( s, &QShortcut::activatedAmbiguously, m_qtShortcutHandler, &wxQtShortcutHandler::activated ); }