- Timestamp:
- Mar 9, 2023 9:14:32 AM (19 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
-
main.cpp (modified) (14 diffs)
-
runtime/UIMachine.cpp (modified) (4 diffs)
-
runtime/UIMachine.h (modified) (15 diffs)
-
runtime/UISession.cpp (modified) (1 diff)
-
runtime/UISession.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r98103 r98882 209 209 /** Qt5 message handler, function that prints out 210 210 * debug, warning, critical, fatal and system error messages. 211 * @param typeHolds the type of the message.211 * @param enmType Holds the type of the message. 212 212 * @param context Holds the message context. 213 213 * @param strMessage Holds the message body. */ 214 static void QtMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &strMessage)214 static void QtMessageOutput(QtMsgType enmType, const QMessageLogContext &context, const QString &strMessage) 215 215 { 216 216 NOREF(context); … … 218 218 NOREF(strMessage); 219 219 # endif 220 switch ( type)220 switch (enmType) 221 221 { 222 222 case QtDebugMsg: … … 255 255 { 256 256 #ifndef VBOX_RUNTIME_UI 257 static const char s_szTitle[] = VBOX_PRODUCT " VM Selector";257 static const char s_szTitle[] = VBOX_PRODUCT " Manager"; 258 258 #else 259 static const char s_szTitle[] = VBOX_PRODUCT " VM Runner"; 260 #endif 259 static const char s_szTitle[] = VBOX_PRODUCT " Runner"; 260 #endif 261 261 262 static const char s_szUsage[] = 262 263 #ifdef VBOX_RUNTIME_UI … … 315 316 s_szTitle, RTBldCfgVersion(), s_szUsage); 316 317 317 #ifdef RT_OS_WINDOWS318 #ifdef VBOX_WS_WIN 318 319 /* Show message box. Modify the option list a little 319 320 * to better make it fit in the upcoming dialog. */ … … 372 373 MessageBoxExA(NULL /*hwndOwner*/, szMsg, szTitleWithVersion, MB_OK | MB_ICONINFORMATION, 373 374 MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)); 374 #endif 375 #endif /* VBOX_WS_WIN */ 375 376 } 376 377 377 378 extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char ** /*envp*/) 378 379 { 379 #ifdef RT_OS_WINDOWS380 #ifdef VBOX_WS_WIN 380 381 ATL::CComModule _Module; /* Required internally by ATL (constructor records instance in global variable). */ 381 382 #endif … … 394 395 if (!MakeSureMultiThreadingIsSafe()) 395 396 break; 397 396 398 /* Force using Qt platform module 'xcb', we have X11 specific code: */ 397 399 RTEnvSet("QT_QPA_PLATFORM", "xcb"); … … 438 440 # ifdef VBOX_RUNTIME_UI 439 441 /* If we're a helper app inside Resources in the main application bundle, 440 we need to amend the library path so the platform plugin can be found.441 Note! This builds on the initIprtForDarwinHelperApp() hack. */442 * we need to amend the library path so the platform plugin can be found. 443 * Note! This builds on the initIprtForDarwinHelperApp() hack. */ 442 444 { 443 445 char szExecDir[RTPATH_MAX]; … … 473 475 /* Create application: */ 474 476 QApplication a(argc, argv); 477 478 #ifdef VBOX_WS_MAC 479 /* Disable menu icons on MacOS X host: */ 480 ::darwinDisableIconsInMenus(); 481 #endif /* VBOX_WS_MAC */ 475 482 476 483 #ifdef VBOX_WS_WIN … … 482 489 * thread to several seconds). */ 483 490 PlaySound(NULL, NULL, 0); 484 485 491 #endif /* VBOX_WS_WIN */ 486 487 #ifdef VBOX_WS_MAC488 /* Disable menu icons on MacOS X host: */489 ::darwinDisableIconsInMenus();490 491 #endif /* VBOX_WS_MAC */492 492 493 493 #ifdef VBOX_WS_X11 … … 546 546 if (!uiCommon().isValid()) 547 547 break; 548 549 /* Init link between UI starter and global app instance: */550 gStarter->init();551 552 548 /* Exit if UICommon pre-processed arguments: */ 553 549 if (uiCommon().processArgs()) 554 550 break; 551 552 /* Init link between UI starter and global app instance: */ 553 gStarter->init(); 555 554 556 555 // WORKAROUND: … … 563 562 // by startup error message-box which is not treated as real window by some 564 563 // reason. So we are making application exit manual everywhere. 565 qApp->setQuitOnLastWindowClosed(false);564 a.setQuitOnLastWindowClosed(false); 566 565 567 566 /* Request to Start UI _after_ QApplication executed: */ … … 653 652 654 653 /* 655 * Determin the IPRT/SUPLib initialization flags if runtime UI process.654 * Determine the IPRT/SUPLib initialization flags if runtime UI process. 656 655 * Only initialize SUPLib if about to start a VM in this process. 657 656 * … … 702 701 fFlags |= SUPR3INIT_F_DRIVERLESS << RTR3INIT_FLAGS_SUPLIB_SHIFT; 703 702 } 704 # endif 703 # endif /* VBOX_RUNTIME_UI */ 705 704 706 705 /* Initialize VBox Runtime: */ … … 710 709 int rc = RTR3InitExe(argc, &argv, fFlags); 711 710 # endif 711 /* Initialization failed: */ 712 712 if (RT_FAILURE(rc)) 713 713 { 714 /* Initialization failed: */715 716 714 /* We have to create QApplication anyway 717 715 * just to show the only one error-message: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98855 r98882 927 927 928 928 void UIMachine::generateMachineInformationSystem(const UIExtraDataMetaDefs::DetailsElementOptionTypeSystem &fOptions, 929 UITextTable &returnTable)929 UITextTable &returnTable) 930 930 { 931 931 uisession()->generateMachineInformationSystem(fOptions, returnTable); … … 945 945 946 946 void UIMachine::generateMachineInformationAudio(const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions, 947 UITextTable &returnTable)947 UITextTable &returnTable) 948 948 { 949 949 uisession()->generateMachineInformationAudio(fOptions, returnTable); … … 957 957 958 958 void UIMachine::generateMachineInformationSerial(const UIExtraDataMetaDefs::DetailsElementOptionTypeSerial &fOptions, 959 UITextTable &returnTable)959 UITextTable &returnTable) 960 960 { 961 961 uisession()->generateMachineInformationSerial(fOptions, returnTable); … … 963 963 964 964 void UIMachine::generateMachineInformationUSB(const UIExtraDataMetaDefs::DetailsElementOptionTypeUsb &fOptions, 965 UITextTable &returnTable)965 UITextTable &returnTable) 966 966 { 967 967 uisession()->generateMachineInformationUSB(fOptions, returnTable); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98855 r98882 74 74 75 75 /** Requests async visual-state change. */ 76 void sigRequestAsyncVisualStateChange(UIVisualStateType visualStateType);76 void sigRequestAsyncVisualStateChange(UIVisualStateType enmVisualStateType); 77 77 78 78 /** @name COM events stuff. … … 115 115 116 116 #ifdef VBOX_WS_MAC 117 /** Notifies about VM window should be shown. */117 /** macOS X: Notifies about VM window should be shown. */ 118 118 void sigShowWindows(); 119 119 #endif … … 174 174 UIFrameBuffer *frameBuffer(ulong uScreenId); 175 175 /** Returns active machine-window reference (if possible). */ 176 QWidget *activeWindow() const;176 QWidget *activeWindow() const; 177 177 178 178 /** Returns whether requested visual @a state allowed. */ … … 180 180 181 181 /** Requests async visual-state change. */ 182 void asyncChangeVisualState(UIVisualStateType visualStateType);182 void asyncChangeVisualState(UIVisualStateType enmVisualStateType); 183 183 184 184 /** Requests visual-state to be entered when possible. */ 185 void setRequestedVisualState(UIVisualStateType visualStateType);185 void setRequestedVisualState(UIVisualStateType enmVisualStateType); 186 186 /** Returns requested visual-state to be entered when possible. */ 187 187 UIVisualStateType requestedVisualState() const; … … 685 685 /** Return system info. of the machine(). */ 686 686 void generateMachineInformationSystem(const UIExtraDataMetaDefs::DetailsElementOptionTypeSystem &fOptions, 687 UITextTable &returnTable);687 UITextTable &returnTable); 688 688 /** Returns system info. of the machine(). */ 689 689 void generateMachineInformationDisplay(const UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay &fOptions, … … 694 694 /** Returns audio info. of the machine(). */ 695 695 void generateMachineInformationAudio(const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions, 696 UITextTable &returnTable);696 UITextTable &returnTable); 697 697 /** Returns network info. of the machine(). */ 698 698 void generateMachineInformationNetwork(const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork &fOptions, … … 700 700 /** Returns serial info. of the machine(). */ 701 701 void generateMachineInformationSerial(const UIExtraDataMetaDefs::DetailsElementOptionTypeSerial &fOptions, 702 UITextTable &returnTable);702 UITextTable &returnTable); 703 703 /** Returns USB info. of the machine(). */ 704 704 void generateMachineInformationUSB(const UIExtraDataMetaDefs::DetailsElementOptionTypeUsb &fOptions, 705 UITextTable &returnTable);705 UITextTable &returnTable); 706 706 /** Returns shared folders info. of the machine(). */ 707 707 void generateMachineInformationSharedFolders(const UIExtraDataMetaDefs::DetailsElementOptionTypeSharedFolders &fOptions, … … 742 742 743 743 /** Visual state-change handler. */ 744 void sltChangeVisualState(UIVisualStateType visualStateType);744 void sltChangeVisualState(UIVisualStateType enmVisualStateType); 745 745 746 746 /** @name COM events stuff. … … 761 761 ** @{ */ 762 762 #ifdef VBOX_WS_MAC 763 /** MacOS X: Handles menu-bar configuration-change. */763 /** macOS X: Handles menu-bar configuration-change. */ 764 764 void sltHandleMenuBarConfigurationChange(const QUuid &uMachineID); 765 765 #endif … … 776 776 777 777 #ifdef VBOX_WS_MAC 778 /** MacOS X: Restarts display-reconfiguration watchdog timer from the beginning.778 /** macOS X: Restarts display-reconfiguration watchdog timer from the beginning. 779 779 * @note Watchdog is trying to determine display reconfiguration in 780 780 * UISession::sltCheckIfHostDisplayChanged() slot every 500ms for 40 tries. */ … … 831 831 private: 832 832 833 /** Construct or. */833 /** Constructs machine UI singleton. */ 834 834 UIMachine(); 835 /** Destruct or. */836 ~UIMachine();835 /** Destructs machine UI singleton. */ 836 virtual ~UIMachine() RT_OVERRIDE; 837 837 838 838 /** Prepare routine. */ … … 875 875 876 876 #ifdef VBOX_WS_MAC 877 /** MacOS X: Updates menu-bar content. */877 /** macOS X: Updates menu-bar content. */ 878 878 void updateMenu(); 879 879 #endif … … 911 911 912 912 #ifdef VBOX_WS_WIN 913 /** Windows: Returns whether pointer of 1bpp depth. */ 913 914 static bool isPointer1bpp(const uint8_t *pu8XorMask, 914 915 uint uWidth, … … 960 961 961 962 #ifdef VBOX_WS_MAC 962 /** MacOS X: Holds the menu-bar instance. */963 /** macOS X: Holds the menu-bar instance. */ 963 964 QMenuBar *m_pMenuBar; 964 965 #endif … … 971 972 972 973 #ifdef VBOX_WS_MAC 973 /** MacOS X: Watchdog timer looking for display reconfiguration. */974 /** macOS X: Watchdog timer looking for display reconfiguration. */ 974 975 QTimer *m_pWatchdogDisplayChange; 975 976 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98841 r98882 2637 2637 strInterfaceName = comNetworkAdapter.GetBridgedInterface(); 2638 2638 break; 2639 # ifndef VBOX_WITH_VMNET2639 # ifndef VBOX_WITH_VMNET 2640 2640 case KNetworkAttachmentType_HostOnly: 2641 2641 strInterfaceName = comNetworkAdapter.GetHostOnlyInterface(); 2642 2642 break; 2643 # endif /* !VBOX_WITH_VMNET */2643 # endif /* !VBOX_WITH_VMNET */ 2644 2644 default: 2645 2645 break; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98849 r98882 576 576 /** Returns system info. of the machine(). */ 577 577 void generateMachineInformationSystem(const UIExtraDataMetaDefs::DetailsElementOptionTypeSystem &fOptions, 578 UITextTable &returnTable);578 UITextTable &returnTable); 579 579 /** Returns display info. of the machine(). */ 580 580 void generateMachineInformationDisplay(const UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay &fOptions, … … 585 585 /** Returns audio info. of the machine(). */ 586 586 void generateMachineInformationAudio(const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions, 587 UITextTable &returnTable);587 UITextTable &returnTable); 588 588 /** Returns network info. of the machine(). */ 589 589 void generateMachineInformationNetwork(const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork &fOptions,
Note:
See TracChangeset
for help on using the changeset viewer.

