VirtualBox

Changeset 84104 in vbox


Ignore:
Timestamp:
Apr 30, 2020 1:43:36 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137693
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Prepare/cleanup cascade fixes for contents widget.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
2 edited

Legend:

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

    r84084 r84104  
    398398void UIVirtualBoxManagerWidget::prepare()
    399399{
    400     /* Configure palette: */
     400    /* Prepare everything: */
     401    preparePalette();
     402    prepareWidgets();
     403    prepareConnections();
     404
     405    /* Load settings: */
     406    loadSettings();
     407
     408    /* Translate UI: */
     409    retranslateUi();
     410
     411    /* Make sure current Chooser-pane index fetched: */
     412    sltHandleChooserPaneIndexChange();
     413}
     414
     415void UIVirtualBoxManagerWidget::preparePalette()
     416{
    401417    setAutoFillBackground(true);
    402418    QPalette pal = palette();
     
    408424    pal.setColor(QPalette::Window, color);
    409425    setPalette(pal);
    410 
    411     /* Prepare: */
    412     prepareWidgets();
    413     prepareConnections();
    414 
    415     /* Load settings: */
    416     loadSettings();
    417 
    418     /* Translate UI: */
    419     retranslateUi();
    420 
    421     /* Make sure current Chooser-pane index fetched: */
    422     sltHandleChooserPaneIndexChange();
    423426}
    424427
     
    818821}
    819822
     823void UIVirtualBoxManagerWidget::cleanupConnections()
     824{
     825    /* Tool-bar connections: */
     826    disconnect(m_pToolBar, &UIToolBar::sigResized,
     827               m_pPaneChooser, &UIChooser::sltHandleToolbarResize);
     828    disconnect(m_pToolBar, &UIToolBar::customContextMenuRequested,
     829               this, &UIVirtualBoxManagerWidget::sltHandleContextMenuRequest);
     830
     831    /* Chooser-pane connections: */
     832    disconnect(m_pPaneChooser, &UIChooser::sigSelectionChanged,
     833               this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange);
     834    disconnect(m_pPaneChooser, &UIChooser::sigSelectionInvalidated,
     835               this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneSelectionInvalidated);
     836    disconnect(m_pPaneChooser, &UIChooser::sigToggleStarted,
     837               m_pPaneToolsMachine, &UIToolPaneMachine::sigToggleStarted);
     838    disconnect(m_pPaneChooser, &UIChooser::sigToggleFinished,
     839               m_pPaneToolsMachine, &UIToolPaneMachine::sigToggleFinished);
     840    disconnect(m_pPaneChooser, &UIChooser::sigGroupSavingStateChanged,
     841               this, &UIVirtualBoxManagerWidget::sigGroupSavingStateChanged);
     842    disconnect(m_pPaneChooser, &UIChooser::sigToolMenuRequested,
     843               this, &UIVirtualBoxManagerWidget::sltHandleToolMenuRequested);
     844
     845    /* Details-pane connections: */
     846    disconnect(m_pPaneToolsMachine, &UIToolPaneMachine::sigLinkClicked,
     847               this, &UIVirtualBoxManagerWidget::sigMachineSettingsLinkClicked);
     848
     849    /* Tools-pane connections: */
     850    disconnect(m_pPaneTools, &UITools::sigSelectionChanged,
     851               this, &UIVirtualBoxManagerWidget::sltHandleToolsPaneIndexChange);
     852}
     853
    820854void UIVirtualBoxManagerWidget::cleanup()
    821855{
    822856    /* Save settings: */
    823857    saveSettings();
     858
     859    /* Cleanup everything: */
     860    cleanupConnections();
    824861}
    825862
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r84084 r84104  
    188188    /** @name Prepare/Cleanup cascade.
    189189      * @{ */
    190         /** Prepares window. */
     190        /** Prepares all. */
    191191        void prepare();
     192        /** Prepares palette. */
     193        void preparePalette();
    192194        /** Prepares widgets. */
    193195        void prepareWidgets();
     
    197199        void loadSettings();
    198200
    199         /** Update toolbar. */
     201        /** Updates toolbar. */
    200202        void updateToolbar();
    201203
    202204        /** Saves settings. */
    203205        void saveSettings();
    204         /** Cleanups window. */
     206        /** Cleanups connections. */
     207        void cleanupConnections();
     208        /** Cleanups all. */
    205209        void cleanup();
    206210    /** @} */
Note: See TracChangeset for help on using the changeset viewer.

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