MCPcopy Create free account
hub / github.com/baldurk/renderdoc / UnregisterShortcut

Method UnregisterShortcut

qrenderdoc/Windows/MainWindow.cpp:2362–2399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2360}
2361
2362void MainWindow::UnregisterShortcut(const rdcstr &shortcut, QWidget *widget)
2363{
2364 if(widget)
2365 {
2366 // delete any Qt shortcuts we created for this widget
2367 for(auto it = m_QtShortcuts.begin(); it != m_QtShortcuts.end();)
2368 {
2369 if((*it)->parent() == widget)
2370 {
2371 delete *it;
2372 it = m_QtShortcuts.erase(it);
2373 }
2374 else
2375 {
2376 ++it;
2377 }
2378 }
2379
2380 if(shortcut.isEmpty())
2381 {
2382 // if no shortcut is specified, remove all shortcuts for this widget
2383 for(QMap<QWidget *, ShortcutCallback> &sh : m_WidgetShortcutCallbacks)
2384 sh.remove(widget);
2385 }
2386 else
2387 {
2388 QKeySequence ks = QKeySequence::fromString(shortcut);
2389
2390 m_WidgetShortcutCallbacks[ks].remove(widget);
2391 }
2392 }
2393 else
2394 {
2395 QKeySequence ks = QKeySequence::fromString(shortcut);
2396
2397 m_GlobalShortcutCallbacks.remove(ks);
2398 }
2399}
2400
2401bool MainWindow::eventFilter(QObject *watched, QEvent *event)
2402{

Callers 3

~ShaderViewerMethod · 0.80
~EventBrowserMethod · 0.80

Calls 6

beginMethod · 0.45
endMethod · 0.45
parentMethod · 0.45
eraseMethod · 0.45
isEmptyMethod · 0.45
removeMethod · 0.45

Tested by 1