VirtualBox

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


Ignore:
Timestamp:
Mar 20, 2025 4:15:22 PM (4 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168076
Message:

FE/Qt: bugref:10814: Reverting r168069 and r168068; It was too early for this stuff.

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

Legend:

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

    r108655 r108663  
    205205}
    206206
    207 void UIGlobalToolsWidget::sltHandleCloudMachineStateChange(const QUuid &uId)
    208 {
    209     /* Acquire current item: */
    210     UIVirtualMachineItem *pItem = machineToolsWidget()->currentItem();
    211     const bool fCurrentItemIsOk = machineToolsWidget()->isItemAccessible(pItem);
    212 
    213     /* If current item is Ok: */
    214     if (fCurrentItemIsOk)
    215     {
    216         /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */
    217         if (toolPaneMachine()->currentTool() == UIToolType_Error)
    218             machineToolsWidget()->switchToolTo(toolMenu()->toolsType(UIToolClass_Machine));
    219 
    220         /* If we still have same item selected: */
    221         if (pItem && pItem->id() == uId)
    222         {
    223             /* Propagate current items to update the Details-pane: */
    224             toolPaneMachine()->setItems(machineToolsWidget()->currentItems());
    225         }
    226     }
    227     else
    228     {
    229         /* Make sure Error pane raised: */
    230         if (toolPaneMachine()->currentTool() != UIToolType_Error)
    231             toolPaneMachine()->openTool(UIToolType_Error);
    232 
    233         /* If we still have same item selected: */
    234         if (pItem && pItem->id() == uId)
    235         {
    236             /* Propagate current items to update the Details-pane (in any case): */
    237             toolPaneMachine()->setItems(machineToolsWidget()->currentItems());
    238             /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */
    239             toolPaneMachine()->setErrorDetails(pItem->accessError());
    240         }
    241     }
    242 
    243     /* Pass the signal further: */
    244     emit sigCloudMachineStateChange(uId);
    245 }
    246 
    247207void UIGlobalToolsWidget::sltHandleGlobalToolMenuUpdate()
    248208{
     
    410370    connect(chooser(), &UIChooser::sigCloudProfileStateChange,
    411371            this, &UIGlobalToolsWidget::sltHandleCloudProfileStateChange);
    412     connect(chooser(), &UIChooser::sigCloudMachineStateChange,
    413             this, &UIGlobalToolsWidget::sltHandleCloudMachineStateChange);
    414372
    415373    /* Tools-menu connections: */
     
    458416    disconnect(chooser(), &UIChooser::sigCloudProfileStateChange,
    459417               this, &UIGlobalToolsWidget::sltHandleCloudProfileStateChange);
    460     disconnect(chooser(), &UIChooser::sigCloudMachineStateChange,
    461                this, &UIGlobalToolsWidget::sltHandleCloudMachineStateChange);
    462418
    463419    /* Tools-menu connections: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.h

    r108655 r108663  
    6565    /** @} */
    6666
    67     /** @name Chooser pane stuff.
    68       * @{ */
    69         /** Notifies about state change for cloud machine with certain @a uId. */
    70         void sigCloudMachineStateChange(const QUuid &uId);
    71     /** @} */
    72 
    7367public:
    7468
     
    140134        void sltHandleCloudProfileStateChange(const QString &strProviderShortName,
    141135                                              const QString &strProfileName);
    142 
    143         /** Handles state change for cloud machine with certain @a uId. */
    144         void sltHandleCloudMachineStateChange(const QUuid &uId);
    145136    /** @} */
    146137
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.cpp

    r108655 r108663  
    298298}
    299299
     300void UIMachineToolsWidget::sltHandleCloudMachineStateChange(const QUuid &uId)
     301{
     302    /* Acquire current item: */
     303    UIVirtualMachineItem *pItem = currentItem();
     304    const bool fCurrentItemIsOk = isItemAccessible(pItem);
     305
     306    /* If current item is Ok: */
     307    if (fCurrentItemIsOk)
     308    {
     309        /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */
     310        if (toolPane()->currentTool() == UIToolType_Error)
     311            switchToolTo(toolMenu()->toolsType(UIToolClass_Machine));
     312
     313        /* If we still have same item selected: */
     314        if (pItem && pItem->id() == uId)
     315        {
     316            /* Propagate current items to update the Details-pane: */
     317            toolPane()->setItems(currentItems());
     318        }
     319    }
     320    else
     321    {
     322        /* Make sure Error pane raised: */
     323        if (toolPane()->currentTool() != UIToolType_Error)
     324            toolPane()->openTool(UIToolType_Error);
     325
     326        /* If we still have same item selected: */
     327        if (pItem && pItem->id() == uId)
     328        {
     329            /* Propagate current items to update the Details-pane (in any case): */
     330            toolPane()->setItems(currentItems());
     331            /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */
     332            toolPane()->setErrorDetails(pItem->accessError());
     333        }
     334    }
     335
     336    /* Pass the signal further: */
     337    emit sigCloudMachineStateChange(uId);
     338}
     339
    300340void UIMachineToolsWidget::sltHandleToolMenuUpdate(UIVirtualMachineItem *pItem)
    301341{
     
    457497    connect(chooser(), &UIChooser::sigToolMenuRequested,
    458498            this, &UIMachineToolsWidget::sltHandleToolMenuRequested);
     499    connect(chooser(), &UIChooser::sigCloudMachineStateChange,
     500            this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange);
    459501    connect(chooser(), &UIChooser::sigToggleStarted,
    460502            toolPane(), &UIToolPane::sigToggleStarted);
     
    510552    disconnect(chooser(), &UIChooser::sigToolMenuRequested,
    511553               this, &UIMachineToolsWidget::sltHandleToolMenuRequested);
     554    disconnect(chooser(), &UIChooser::sigCloudMachineStateChange,
     555               this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange);
    512556    disconnect(chooser(), &UIChooser::sigToggleStarted,
    513557               toolPane(), &UIToolPane::sigToggleStarted);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.h

    r108655 r108663  
    7171        /** Notifies about Chooser-pane selection change. */
    7272        void sigChooserPaneSelectionChange();
     73
     74        /** Notifies about state change for cloud machine with certain @a uId. */
     75        void sigCloudMachineStateChange(const QUuid &uId);
    7376    /** @} */
    7477
     
    185188        /** Handles signal about Chooser-pane selection invalidated. */
    186189        void sltHandleChooserPaneSelectionInvalidated();
     190
     191        /** Handles state change for cloud machine with certain @a uId. */
     192        void sltHandleCloudMachineStateChange(const QUuid &uId);
    187193    /** @} */
    188194
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxWidget.cpp

    r108656 r108663  
    461461    connect(globalToolsWidget(), &UIGlobalToolsWidget::sigToolTypeChange,
    462462            this, &UIVirtualBoxWidget::sigToolTypeChangeGlobal);
    463     connect(globalToolsWidget(), &UIGlobalToolsWidget::sigCloudMachineStateChange,
    464             this, &UIVirtualBoxWidget::sigCloudMachineStateChange);
    465463    /* Global Tool Pane connections: */
    466464    connect(globalToolPane(), &UIToolPane::sigCreateMedium,
     
    478476    connect(machineToolsWidget(), &UIMachineToolsWidget::sigChooserPaneSelectionChange,
    479477            this, &UIVirtualBoxWidget::sltUpdateToolbar);
     478    connect(machineToolsWidget(), &UIMachineToolsWidget::sigCloudMachineStateChange,
     479            this, &UIVirtualBoxWidget::sigCloudMachineStateChange);
    480480    /* Machine Tool Pane connections: */
    481481    connect(machineToolPane(), &UIToolPane::sigLinkClicked,
     
    718718    disconnect(globalToolsWidget(), &UIGlobalToolsWidget::sigToolTypeChange,
    719719               this, &UIVirtualBoxWidget::sigToolTypeChangeGlobal);
    720     disconnect(globalToolsWidget(), &UIGlobalToolsWidget::sigCloudMachineStateChange,
    721                this, &UIVirtualBoxWidget::sigCloudMachineStateChange);
    722720    /* Global Tool Pane connections: */
    723721    disconnect(globalToolPane(), &UIToolPane::sigCreateMedium,
     
    735733    disconnect(machineToolsWidget(), &UIMachineToolsWidget::sigChooserPaneSelectionChange,
    736734               this, &UIVirtualBoxWidget::sltUpdateToolbar);
     735    disconnect(machineToolsWidget(), &UIMachineToolsWidget::sigCloudMachineStateChange,
     736               this, &UIVirtualBoxWidget::sigCloudMachineStateChange);
    737737    /* Machine Tool Pane connections: */
    738738    disconnect(machineToolPane(), &UIToolPane::sigLinkClicked,
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