- Timestamp:
- Feb 24, 2023 1:24:27 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156022
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98700 r98722 233 233 } 234 234 235 QString UIMachine::osTypeId() const 236 { 237 return uisession()->osTypeId(); 238 } 239 235 240 void UIMachine::updateStateAdditionsActions() 236 241 { … … 718 723 { 719 724 return uisession()->acquireWhetherLogEnabled(fEnabled); 725 } 726 727 bool UIMachine::acquireLogFolder(QString &strFolder) 728 { 729 return uisession()->acquireLogFolder(strFolder); 720 730 } 721 731 … … 1209 1219 /* Use the OS type icon if user one was not set: */ 1210 1220 if (icon.isNull()) 1211 icon = generalIconPool().guestOSTypeIcon( uisession()->machine().GetOSTypeId());1221 icon = generalIconPool().guestOSTypeIcon(osTypeId()); 1212 1222 /* Use the default icon if nothing else works: */ 1213 1223 if (icon.isNull()) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98700 r98722 185 185 /** Returns the machine name. */ 186 186 QString machineName() const; 187 /** Returns the OS type id. */ 188 QString osTypeId() const; 187 189 /** @} */ 188 190 … … 516 518 bool acquireWhetherLogEnabled(bool &fEnabled); 517 519 520 /** Acquire log folder. */ 521 bool acquireLogFolder(QString &strFolder); 522 518 523 /** Acquires effective CPU @a uLoad. */ 519 524 bool acquireEffectiveCPULoad(ulong &uLoad); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98682 r98722 415 415 uimachine()->setGuestResizeIgnored(true); 416 416 /* Get log-folder: */ 417 QString strLogFolder = machine().GetLogFolder(); 417 QString strLogFolder; 418 uimachine()->acquireLogFolder(strLogFolder); 418 419 /* Take the screenshot for debugging purposes: */ 419 420 takeScreenshot(strLogFolder + "/VBox.png", "png"); … … 1241 1242 QPixmap pixmap = generalIconPool().userMachinePixmap(machine(), QSize(42, 42)); 1242 1243 if (pixmap.isNull()) 1243 pixmap = generalIconPool().guestOSTypePixmap( machine().GetOSTypeId(), QSize(42, 42));1244 pixmap = generalIconPool().guestOSTypePixmap(uimachine()->osTypeId(), QSize(42, 42)); 1244 1245 m_pDockIconPreview = new UIDockIconPreview(uimachine(), pixmap); 1245 1246 … … 1658 1659 void UIMachineLogic::sltShowFileManagerDialog() 1659 1660 { 1660 if ( machine().isNull() ||!activeMachineWindow())1661 if (!activeMachineWindow()) 1661 1662 return; 1662 1663 … … 1700 1701 void UIMachineLogic::sltShowLogDialog() 1701 1702 { 1702 if ( machine().isNull() ||!activeMachineWindow())1703 if (!activeMachineWindow()) 1703 1704 return; 1704 1705 … … 2034 2035 void UIMachineLogic::sltShowSoftKeyboard() 2035 2036 { 2036 if ( machine().isNull() ||!activeMachineWindow())2037 if (!activeMachineWindow()) 2037 2038 return; 2038 2039 … … 2456 2457 void UIMachineLogic::sltShowGuestControlConsoleDialog() 2457 2458 { 2458 if ( machine().isNull() ||!activeMachineWindow())2459 if (!activeMachineWindow()) 2459 2460 return; 2460 2461 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98700 r98722 645 645 646 646 /* Auto GA update is currently for Windows and Linux guests only */ 647 const CGuestOSType osType = uiCommon().vmGuestOSType( machine().GetOSTypeId());647 const CGuestOSType osType = uiCommon().vmGuestOSType(uimachine()->osTypeId()); 648 648 if (!osType.isOk()) 649 649 return false; … … 1070 1070 else 1071 1071 fEnabled = fLogEnabled == TRUE; 1072 return fSuccess; 1073 } 1074 1075 bool UISession::acquireLogFolder(QString &strFolder) 1076 { 1077 CMachine comMachine = machine(); 1078 const QString strLogFolder = comMachine.GetLogFolder(); 1079 const bool fSuccess = comMachine.isOk(); 1080 if (!fSuccess) 1081 UINotificationMessage::cannotAcquireMachineParameter(comMachine); 1082 else 1083 strFolder = strLogFolder; 1072 1084 return fSuccess; 1073 1085 } … … 1469 1481 return false; 1470 1482 1471 /* Update machine -name: */1483 /* Update machine attributes: */ 1472 1484 m_strMachineName = machine().GetName(); 1485 m_strOSTypeId = machine().GetOSTypeId(); 1473 1486 1474 1487 /* Update machine-state: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98700 r98722 190 190 /** Returns the machine name. */ 191 191 QString machineName() const { return m_strMachineName; } 192 /** Returns the OS type id. */ 193 QString osTypeId() const { return m_strOSTypeId; } 192 194 193 195 /** Returns main machine-widget id. */ … … 424 426 bool acquireWhetherLogEnabled(bool &fEnabled); 425 427 428 /** Acquire log folder. */ 429 bool acquireLogFolder(QString &strFolder); 430 426 431 /** Acquires VM's execution engine @a enmType. */ 427 432 bool acquireExecutionEngineType(KVMExecutionEngine &enmType); … … 575 580 /** Holds the machine name. */ 576 581 QString m_strMachineName; 582 /** Holds the OS type id. */ 583 QString m_strOSTypeId; 577 584 /** @} */ 578 585
Note:
See TracChangeset
for help on using the changeset viewer.