- Timestamp:
- Mar 23, 2023 12:16:07 PM (19 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
-
UIMachine.cpp (modified) (5 diffs)
-
UIMachine.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r99135 r99139 1462 1462 bool UIMachine::prepare() 1463 1463 { 1464 /* Create session UI: */1465 m_pSession = new UISession(this);1466 AssertPtrReturn(uisession(), false); 1467 /* And make sure it's prepared: */1468 if (! uisession()->prepare())1464 /* Prepare stuff unrelated to VM: */ 1465 prepareNotificationCenter(); 1466 1467 /* Prepare VM session: */ 1468 if (!prepareSession()) 1469 1469 return false; 1470 1470 1471 /* Prepare stuff: */ 1472 prepareNotificationCenter(); 1471 /* Prepare VM related stuff: */ 1473 1472 prepareBranding(); 1474 prepareSessionConnections();1475 1473 prepareActions(); 1476 1474 prepareScreens(); … … 1479 1477 prepareMachineLogic(); 1480 1478 1481 /* Try to initialize session UI: */1479 /* Try to initialize VM session: */ 1482 1480 if (!uisession()->initialize()) 1483 1481 return false; … … 1501 1499 } 1502 1500 1503 void UIMachine::prepareBranding() 1504 { 1505 /* Create the icon dynamically: */ 1506 m_pMachineWindowIcon = new QIcon; 1507 acquireUserMachineIcon(*m_pMachineWindowIcon); 1508 1509 #ifndef VBOX_WS_MAC 1510 /* Load user's machine-window name postfix: */ 1511 const QUuid uMachineID = uiCommon().managedVMUuid(); 1512 m_strMachineWindowNamePostfix = gEDataManager->machineWindowNamePostfix(uMachineID); 1513 #endif /* !VBOX_WS_MAC */ 1514 } 1515 1516 void UIMachine::prepareSessionConnections() 1517 { 1501 bool UIMachine::prepareSession() 1502 { 1503 /* Create session UI: */ 1504 m_pSession = new UISession(this); 1505 AssertPtrReturn(uisession(), false); 1506 1518 1507 /* Console events stuff: */ 1519 1508 connect(uisession(), &UISession::sigAudioAdapterChange, … … 1567 1556 connect(uisession(), &UISession::sigCursorPositionChange, 1568 1557 this, &UIMachine::sltCursorPositionChange); 1558 1559 /* Make sure session prepared: */ 1560 return uisession()->prepare(); 1561 } 1562 1563 void UIMachine::prepareBranding() 1564 { 1565 /* Create the icon dynamically: */ 1566 m_pMachineWindowIcon = new QIcon; 1567 acquireUserMachineIcon(*m_pMachineWindowIcon); 1568 1569 #ifndef VBOX_WS_MAC 1570 /* Load user's machine-window name postfix: */ 1571 const QUuid uMachineID = uiCommon().managedVMUuid(); 1572 m_strMachineWindowNamePostfix = gEDataManager->machineWindowNamePostfix(uMachineID); 1573 #endif /* !VBOX_WS_MAC */ 1569 1574 } 1570 1575 … … 1842 1847 cleanupActions(); 1843 1848 cleanupBranding(); 1849 cleanupSession(); 1844 1850 cleanupNotificationCenter(); 1845 1846 /* Cleanup session UI: */1847 cleanupSession();1848 1851 } 1849 1852 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r99135 r99139 844 844 /** Prepares notification-center. */ 845 845 void prepareNotificationCenter(); 846 /** Prepare routine: Session stuff. */ 847 bool prepareSession(); 846 848 /** Prepare routine: Branding. */ 847 849 void prepareBranding(); 848 /** Prepare routine: Session connection stuff. */849 void prepareSessionConnections();850 850 /** Prepare routine: Actions stuff. */ 851 851 void prepareActions();
Note:
See TracChangeset
for help on using the changeset viewer.

