VirtualBox

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


Ignore:
Timestamp:
Mar 16, 2018 3:53:24 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: Detach VBoxGlobal from UIMachine stuff.

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

Legend:

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

    r71355 r71371  
    3636# include "VBoxFBOverlay.h"
    3737# include "UIDesktopWidgetWatchdog.h"
     38# include "UIExtraDataManager.h"
    3839# include "UIMessageCenter.h"
     40# include "UIModalWindowManager.h"
    3941# include "UIPopupCenter.h"
    40 # include "UIExtraDataManager.h"
    4142# include "VBoxGlobal.h"
    4243
     
    39994000
    40004001    if (remind)
    4001         popupCenter().remindAboutWrongColorDepth(vboxGlobal().activeMachineWindow(), size.bitsPerPixel(), 32);
     4002        popupCenter().remindAboutWrongColorDepth(windowManager().mainWindowShown(), size.bitsPerPixel(), 32);
    40024003    else
    4003         popupCenter().forgetAboutWrongColorDepth(vboxGlobal().activeMachineWindow());
     4004        popupCenter().forgetAboutWrongColorDepth(windowManager().mainWindowShown());
    40044005}
    40054006
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp

    r69500 r71371  
    2121
    2222/* GUI includes: */
     23# include "VBoxGlobal.h"
     24# include "UIMachine.h"
    2325# include "UIModalWindowManager.h"
    2426# ifdef VBOX_GUI_WITH_NETWORK_MANAGER
     27#  include "UINetworkManager.h"
    2528#  include "UINetworkManagerDialog.h"
    26 #  include "UINetworkManager.h"
    2729# endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
     30# include "UIProgressDialog.h"
    2831# include "UISelectorWindow.h"
    29 # include "UIProgressDialog.h"
    30 # include "VBoxGlobal.h"
    3132
    3233/* Other VBox includes: */
     
    9293    {
    9394        /* It will be currently active machine-window if visible: */
    94         if (vboxGlobal().activeMachineWindow() &&
    95             vboxGlobal().activeMachineWindow()->isVisible())
    96             return vboxGlobal().activeMachineWindow();
     95        if (gpMachine &&
     96            gpMachine->activeWindow() &&
     97            gpMachine->activeWindow()->isVisible())
     98            return gpMachine->activeWindow();
    9799    }
    98100    /* For VM selector process: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r71369 r71371  
    6666#  include "UIUpdateManager.h"
    6767# endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    68 # include "UIMachine.h"
    6968# include "UIConverter.h"
    7069# include "UIMediumEnumerator.h"
     
    337336}
    338337#endif /* VBOX_WS_MAC */
    339 
    340 QWidget* VBoxGlobal::activeMachineWindow() const
    341 {
    342     if (isVMConsoleProcess() && gpMachine && gpMachine->activeWindow())
    343         return gpMachine->activeWindow();
    344     return 0;
    345 }
    346338
    347339/**
     
    16371629        machine.SaveSettings();
    16381630        if (!machine.isOk())
    1639             msgCenter().cannotSaveMachineSettings(machine, activeMachineWindow());
     1631            msgCenter().cannotSaveMachineSettings(machine, windowManager().mainWindowShown());
    16401632    }
    16411633
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r71369 r71371  
    129129    /** Returns the thread-pool instance. */
    130130    UIThreadPool* threadPool() const { return m_pThreadPool; }
    131 
    132     /** Returns currently active virtual machine window. */
    133     QWidget* activeMachineWindow() const;
    134131
    135132    bool is3DAvailableWorker() const;
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