VirtualBox

Changeset 99467 in vbox for trunk


Ignore:
Timestamp:
Apr 19, 2023 7:47:10 PM (18 months ago)
Author:
vboxsync
Message:

FE/Qt: Make sure the shortcut is deregistered in ~UIAction() so we don't leave dangling owner pointers in the QGuiApplication.shortcutMap. (To reproduce: Start selector. Open VM settings. Press Ctrl-F (or other selector specific shortcut). Crash/misbehavior/whatever in qobject_cast<QAction *>(object) in qWidgetShortcutContextMatcher() - qshortcut.cpp - when already delete UIAction instance is referenced.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r98103 r99467  
    237237    UIAction(UIActionPool *pParent, UIActionType enmType, bool fMachineMenuAction = false);
    238238    /** Destructs action. */
    239     virtual ~UIAction() RT_OVERRIDE { delete menu(); }
     239    virtual ~UIAction() RT_OVERRIDE { delete menu(); setShortcuts(QList<QKeySequence>() /*unregister*/); }
    240240
    241241    /** Returns action-pool this action belongs to. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette