VirtualBox

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


Ignore:
Timestamp:
Apr 19, 2021 4:40:07 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8161: More rework for Chooser pane; Save group definition changes even after group toggling; That allows to avoid saving on app shutdown.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r88585 r88586  
    403403void UIChooserAbstractModel::deinit()
    404404{
    405     // WORKAROUND:
    406     // Currently we are not saving group descriptors
    407     // (which reflecting group toggle-state) on-the-fly,
    408     // so for now we are additionally save group definitions
    409     // when exiting application:
    410     saveGroupDefinitions();
    411 
    412405    /* Make sure all saving steps complete: */
    413406    makeSureGroupSettingsSaveIsFinished();
     
    540533void UIChooserAbstractModel::saveGroups()
    541534{
    542     emit sigStartGroupSaving();
     535    emit sigSaveSettings();
    543536}
    544537
     
    987980}
    988981
    989 void UIChooserAbstractModel::sltStartGroupSaving()
     982void UIChooserAbstractModel::sltSaveSettings()
    990983{
    991984    saveGroupSettings();
     
    1000993void UIChooserAbstractModel::prepareConnections()
    1001994{
    1002     /* Cloud VM registration connections: */
     995    /* UICommon connections: */
    1003996    connect(&uiCommon(), &UICommon::sigCloudMachineUnregistered,
    1004997            this, &UIChooserAbstractModel::sltCloudMachineUnregistered);
     
    10321025            this, &UIChooserAbstractModel::sltHandleCloudProviderUninstall);
    10331026
    1034     /* Group saving connections: */
    1035     connect(this, &UIChooserAbstractModel::sigStartGroupSaving,
    1036             this, &UIChooserAbstractModel::sltStartGroupSaving,
     1027    /* Settings saving connections: */
     1028    connect(this, &UIChooserAbstractModel::sigSaveSettings,
     1029            this, &UIChooserAbstractModel::sltSaveSettings,
    10371030            Qt::QueuedConnection);
    10381031
     
    10761069               this, &UIChooserAbstractModel::sltHandleCloudProviderUninstall);
    10771070
    1078     /* Group saving connections: */
    1079     disconnect(this, &UIChooserAbstractModel::sigStartGroupSaving,
    1080                this, &UIChooserAbstractModel::sltStartGroupSaving);
     1071    /* Settings saving connections: */
     1072    disconnect(this, &UIChooserAbstractModel::sigSaveSettings,
     1073               this, &UIChooserAbstractModel::sltSaveSettings);
    10811074
    10821075    /* Extra-data connections: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r86802 r88586  
    5757    /** @name Group saving stuff.
    5858      * @{ */
    59         /** Commands to start group saving. */
    60         void sigStartGroupSaving();
     59        /** Issues request to save settings. */
     60        void sigSaveSettings();
    6161        /** Notifies listeners about group saving state changed. */
    6262        void sigGroupSavingStateChanged();
     
    236236    /** @name Group saving stuff.
    237237      * @{ */
    238         /** Handles request to start group saving. */
    239         void sltStartGroupSaving();
     238        /** Handles request to save settings. */
     239        void sltSaveSettings();
    240240    /** @} */
    241241
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp

    r86767 r88586  
    10321032    /* Repaint finally: */
    10331033    update();
     1034    /* Save changes: */
     1035    model()->saveGroups();
    10341036
    10351037    /* Toggle finished: */
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