diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-02-14 15:45:36 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-02-14 15:45:36 +0000 |
commit | ed1ae3606e0485eeac461a0bd1c0aee6a4838e8f (patch) | |
tree | 81480244f20bd45b83156c568ec93f72d4e7f23d /src/VBox/Frontends | |
parent | 48fa16ca0a98fca37880b824abbc0b999e52044a (diff) | |
download | VirtualBox-svn-ed1ae3606e0485eeac461a0bd1c0aee6a4838e8f.tar.gz |
FE/Qt: bugref:9241: VirtualBox Manager UI: Simplify Chooser pane selection change handler.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@77313 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Frontends')
-rw-r--r-- | src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp | 20 | ||||
-rw-r--r-- | src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h | 11 |
2 files changed, 10 insertions, 21 deletions
diff --git a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp index 2f5e9e8341d..6d28dafccf9 100644 --- a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp +++ b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp @@ -203,7 +203,7 @@ void UIVirtualBoxManagerWidget::sltHandleContextMenuRequest(const QPoint &positi void UIVirtualBoxManagerWidget::retranslateUi() { /* Make sure chosen item fetched: */ - sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */, false /* update the logviewer? */); + sltHandleChooserPaneIndexChange(); #ifdef VBOX_WS_MAC // WORKAROUND: @@ -215,9 +215,7 @@ void UIVirtualBoxManagerWidget::retranslateUi() #endif } -void UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange(bool fUpdateDetails /* = true */, - bool fUpdateSnapshots /* = true */, - bool fUpdateLogs /* = true */) +void UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange() { /* Let the parent know: */ emit sigChooserPaneIndexChange(); @@ -266,12 +264,10 @@ void UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange(bool fUpdateDeta if (m_pPaneToolsMachine->currentTool() == UIToolType_Error) sltHandleToolsPaneIndexChange(); - /* Propagate current items to update the Details-pane (if requested): */ - if (fUpdateDetails) - m_pPaneToolsMachine->setItems(currentItems()); - /* Propagate current machine to update the Snapshots-pane or/and Logviewer-pane (if requested): */ - if (fUpdateSnapshots || fUpdateLogs) - m_pPaneToolsMachine->setMachine(pItem->machine()); + /* Propagate current items to update the Details-pane: */ + m_pPaneToolsMachine->setItems(currentItems()); + /* Propagate current machine to update the Snapshots-pane or/and Logviewer-pane: */ + m_pPaneToolsMachine->setMachine(pItem->machine()); } else { @@ -309,7 +305,7 @@ void UIVirtualBoxManagerWidget::sltHandleSlidingAnimationComplete(SlidingDirecti } } /* Then handle current item change (again!): */ - sltHandleChooserPaneIndexChangeDefault(); + sltHandleChooserPaneIndexChange(); } void UIVirtualBoxManagerWidget::sltHandleToolMenuRequested(UIToolClass enmClass, const QPoint &position) @@ -528,7 +524,7 @@ void UIVirtualBoxManagerWidget::prepareConnections() /* Chooser-pane connections: */ connect(m_pPaneChooser, &UIChooser::sigSelectionChanged, - this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChangeDefault); + this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange); connect(m_pPaneChooser, &UIChooser::sigSlidingStarted, m_pPaneToolsMachine, &UIToolPaneMachine::sigSlidingStarted); connect(m_pPaneChooser, &UIChooser::sigToggleStarted, diff --git a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h index fe42c2b538b..1e3ef8fdcec 100644 --- a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h +++ b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h @@ -144,15 +144,8 @@ private slots: /** @name Common stuff. * @{ */ - /** Handles signal about Chooser-pane index change. - * @param fUpdateDetails Brings whether details should be updated. - * @param fUpdateSnapshots Brings whether snapshots should be updated. - * @param fUpdateLogs Brings whether log-viewer should be updated. */ - void sltHandleChooserPaneIndexChange(bool fUpdateDetails = true, - bool fUpdateSnapshots = true, - bool fUpdateLogs = true); - /** Handles signal about Chooser-pane index change the default way. */ - void sltHandleChooserPaneIndexChangeDefault() { sltHandleChooserPaneIndexChange(); } + /** Handles signal about Chooser-pane index change. */ + void sltHandleChooserPaneIndexChange(); /** Handles sliding animation complete signal. * @param enmDirection Brings which direction was animation finished for. */ |