VirtualBox

Changeset 88874 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
May 5, 2021 12:38:50 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8161. Saving extra data and closing com stuff not in dtor but in respective slots

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.cpp

    r88741 r88874  
    315315UIGuestProcessControlWidget::~UIGuestProcessControlWidget()
    316316{
    317     saveSettings();
    318     cleanupListener();
    319317}
    320318
     
    393391                this, &UIGuestProcessControlWidget::sltGuestSessionUnregistered);
    394392    }
     393    connect(&uiCommon(), &UICommon::sigAskToCommitData,
     394            this, &UIGuestProcessControlWidget::sltSaveSettings);
     395    connect(&uiCommon(), &UICommon::sigAskToDetachCOM,
     396            this, &UIGuestProcessControlWidget::sltCleanupListener);
    395397}
    396398
     
    558560}
    559561
    560 void UIGuestProcessControlWidget::saveSettings()
     562void UIGuestProcessControlWidget::sltSaveSettings()
    561563{
    562564    if (!m_pSplitter)
     
    565567}
    566568
    567 void UIGuestProcessControlWidget::cleanupListener()
     569void UIGuestProcessControlWidget::sltCleanupListener()
    568570{
    569571    /* Unregister everything: */
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.h

    r88741 r88874  
    7171    void sltCloseSessionOrProcess();
    7272    void sltShowProperties();
     73    void sltSaveSettings();
     74    void sltCleanupListener();
    7375
    7476private:
     
    8284    void addGuestSession(CGuestSession guestSession);
    8385    void loadSettings();
    84     void cleanupListener();
    85     void saveSettings();
    8686
    8787    CGuest                    m_comGuest;
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r88834 r88874  
    174174UIVMLogViewerWidget::~UIVMLogViewerWidget()
    175175{
    176     /* In machine UI context we perform cleanup during destruction.
    177        UIMachineLogic makes sure this happens early enough: */
    178     if (m_enmEmbedding == EmbedTo_Dialog)
    179         sltSaveOptions();
    180176}
    181177
     
    770766    if (loadedFont != QFont())
    771767        m_font = loadedFont;
    772     /* In manager UI we cleanup by listening the sigAskToCommitData signal: */
    773     if (m_enmEmbedding == EmbedTo_Stack)
    774         connect(&uiCommon(), &UICommon::sigAskToCommitData,
    775                 this, &UIVMLogViewerWidget::sltSaveOptions);
     768    connect(&uiCommon(), &UICommon::sigAskToCommitData,
     769            this, &UIVMLogViewerWidget::sltSaveOptions);
    776770}
    777771
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp

    r88771 r88874  
    6969UIVMInformationDialog::~UIVMInformationDialog()
    7070{
    71     saveSettings();
    7271}
    7372
     
    118117}
    119118
    120 void UIVMInformationDialog::saveSettings()
     119void UIVMInformationDialog::sltSaveSettings()
    121120{
    122121    /* Save window geometry: */
     
    135134    /* Load settings: */
    136135    loadSettings();
     136    connect(&uiCommon(), &UICommon::sigAskToCommitData,
     137            this, &UIVMInformationDialog::sltSaveSettings);
    137138}
    138139
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.h

    r88771 r88874  
    7373    /** Handles tab-widget page change. */
    7474    void sltHandlePageChanged(int iIndex);
     75    void sltSaveSettings();
    7576
    7677private:
     
    9091    /** Loads settings. */
    9192    void loadSettings();
    92     void saveSettings();
    9393
    9494    /** @name Widget variables.
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r88785 r88874  
    38673867UISoftKeyboard::~UISoftKeyboard()
    38683868{
    3869     saveSettings();
    3870     keyboard().ReleaseKeys();
    38713869}
    38723870
     
    42174215
    42184216    connect(this, &UISoftKeyboard::sigHelpRequested, &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);
    4219 }
    4220 
    4221 void UISoftKeyboard::saveSettings()
     4217    connect(&uiCommon(), &UICommon::sigAskToCommitData, this, &UISoftKeyboard::sltSaveSettings);
     4218    connect(&uiCommon(), &UICommon::sigAskToCommitData, this, &UISoftKeyboard::sltReleaseKeys);
     4219}
     4220
     4221void UISoftKeyboard::sltSaveSettings()
    42224222{
    42234223    /* Save geometry to extradata: */
     
    42434243}
    42444244
     4245void UISoftKeyboard::sltReleaseKeys()
     4246{
     4247    keyboard().ReleaseKeys();
     4248}
     4249
    42454250void UISoftKeyboard::loadSettings()
    42464251{
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h

    r88785 r88874  
    104104    void sltResetKeyboard();
    105105    void sltHandleHelpRequest();
     106    void sltSaveSettings();
     107    void sltReleaseKeys();
    106108
    107109private:
     
    109111    void prepareObjects();
    110112    void prepareConnections();
    111     void saveSettings();
    112113    void loadSettings();
    113114    void configure();
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