VirtualBox

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


Ignore:
Timestamp:
Aug 2, 2018 4:17:50 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
124084
Message:

FE/Qt: VirtualBox Manager UI: Few more coding-style fixes and cleanups.

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

Legend:

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

    r73456 r73457  
    629629void UIVirtualBoxManager::sltOpenImportApplianceWizard(const QString &strFileName /* = QString() */)
    630630{
    631     /* Show Import Appliance wizard: */
     631    /* Initialize variables: */
    632632#ifdef VBOX_WS_MAC
    633633    const QString strTmpFile = ::darwinResolveAlias(strFileName);
     
    689689void UIVirtualBoxManager::sltOpenPreferencesDialog()
    690690{
    691     /* Check that we do NOT handling that already: */
    692     if (actionPool()->action(UIActionIndex_M_Application_S_Preferences)->data().toBool())
    693         return;
    694691    /* Remember that we handling that already: */
    695     actionPool()->action(UIActionIndex_M_Application_S_Preferences)->setData(true);
     692    actionPool()->action(UIActionIndex_M_Application_S_Preferences)->setEnabled(false);
    696693
    697694    /* Don't show the inaccessible warning
     
    706703    /// @todo Is it possible at all if event-loop unwind?
    707704    /* Remember that we do NOT handling that already: */
    708     actionPool()->action(UIActionIndex_M_Application_S_Preferences)->setData(false);
     705    actionPool()->action(UIActionIndex_M_Application_S_Preferences)->setEnabled(true);
    709706}
    710707
     
    719716#ifdef VBOX_WS_MAC
    720717    QString strTmpFile = ::darwinResolveAlias(strFileName);
    721 #else /* VBOX_WS_MAC */
     718#else
    722719    QString strTmpFile = strFileName;
    723 #endif /* !VBOX_WS_MAC */
    724     CVirtualBox vbox = vboxGlobal().virtualBox();
     720#endif
     721    CVirtualBox comVBox = vboxGlobal().virtualBox();
     722
     723    /* No file specified: */
    725724    if (strTmpFile.isEmpty())
    726725    {
    727         QString strBaseFolder = vbox.GetSystemProperties().GetDefaultMachineFolder();
     726        QString strBaseFolder = comVBox.GetSystemProperties().GetDefaultMachineFolder();
    728727        QString strTitle = tr("Select a virtual machine file");
    729728        QStringList extensions;
     
    741740
    742741    /* Make sure this machine can be opened: */
    743     CMachine newMachine = vbox.OpenMachine(strTmpFile);
    744     if (!vbox.isOk())
    745     {
    746         msgCenter().cannotOpenMachine(vbox, strTmpFile);
     742    CMachine comMachineNew = comVBox.OpenMachine(strTmpFile);
     743    if (!comVBox.isOk())
     744    {
     745        msgCenter().cannotOpenMachine(comVBox, strTmpFile);
    747746        return;
    748747    }
    749748
    750749    /* Make sure this machine was NOT registered already: */
    751     CMachine oldMachine = vbox.FindMachine(newMachine.GetId());
    752     if (!oldMachine.isNull())
    753     {
    754         msgCenter().cannotReregisterExistingMachine(strTmpFile, oldMachine.GetName());
     750    CMachine comMachineOld = comVBox.FindMachine(comMachineNew.GetId());
     751    if (!comMachineOld.isNull())
     752    {
     753        msgCenter().cannotReregisterExistingMachine(strTmpFile, comMachineOld.GetName());
    755754        return;
    756755    }
    757756
    758757    /* Register that machine: */
    759     vbox.RegisterMachine(newMachine);
    760 }
    761 
    762 void UIVirtualBoxManager::sltOpenMachineSettingsDialog(const QString &strCategoryRef /* = QString() */,
    763                                                        const QString &strControlRef /* = QString() */,
     758    comVBox.RegisterMachine(comMachineNew);
     759}
     760
     761void UIVirtualBoxManager::sltOpenMachineSettingsDialog(QString strCategory /* = QString() */,
     762                                                       QString strControl /* = QString() */,
    764763                                                       const QString &strID /* = QString() */)
    765 {
    766     /* This slot should not be called when there is not selection: */
    767     AssertMsgReturnVoid(currentItem(), ("Current item should be selected!\n"));
    768 
    769     /* Check that we do NOT handling that already: */
    770     if (actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->data().toBool())
    771         return;
    772     /* Remember that we handling that already: */
    773     actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(true);
    774 
    775     /* Process href from VM details / description: */
    776     if (!strCategoryRef.isEmpty() && strCategoryRef[0] != '#')
    777     {
    778         vboxGlobal().openURL(strCategoryRef);
    779         return;
    780     }
    781 
    782     /* Get category and control: */
    783     QString strCategory = strCategoryRef;
    784     QString strControl = strControlRef;
    785     /* Check if control is coded into the URL by %%: */
    786     if (strControl.isEmpty())
    787     {
    788         QStringList parts = strCategory.split("%%");
    789         if (parts.size() == 2)
    790         {
    791             strCategory = parts.at(0);
    792             strControl = parts.at(1);
    793         }
    794     }
    795 
    796     /* Don't show the inaccessible warning
    797      * if the user tries to open VM settings: */
    798     m_fFirstMediumEnumerationHandled = true;
    799 
    800     /* Create and execute corresponding VM settings window: */
    801     QPointer<UISettingsDialogMachine> pDlg = new UISettingsDialogMachine(this,
    802                                                                          QUuid(strID).isNull() ? currentItem()->id() : strID,
    803                                                                          strCategory, strControl);
    804     pDlg->execute();
    805     delete pDlg;
    806 
    807     /// @todo Is it possible at all if event-loop unwind?
    808     /* Remember that we do NOT handling that already: */
    809     actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setData(false);
    810 }
    811 
    812 void UIVirtualBoxManager::sltOpenCloneMachineWizard()
    813764{
    814765    /* Get current item: */
     
    817768
    818769    /* Lock the action preventing cascade calls: */
     770    actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(false);
     771
     772    /* Process href from VM details / description: */
     773    if (!strCategory.isEmpty() && strCategory[0] != '#')
     774    {
     775        vboxGlobal().openURL(strCategory);
     776    }
     777    else
     778    {
     779        /* Check if control is coded into the URL by %%: */
     780        if (strControl.isEmpty())
     781        {
     782            QStringList parts = strCategory.split("%%");
     783            if (parts.size() == 2)
     784            {
     785                strCategory = parts.at(0);
     786                strControl = parts.at(1);
     787            }
     788        }
     789
     790        /* Don't show the inaccessible warning
     791         * if the user tries to open VM settings: */
     792        m_fFirstMediumEnumerationHandled = true;
     793
     794        /* Create and execute corresponding VM settings window: */
     795        QPointer<UISettingsDialogMachine> pDlg = new UISettingsDialogMachine(this,
     796                                                                             QUuid(strID).isNull() ? pItem->id() : strID,
     797                                                                             strCategory, strControl);
     798        pDlg->execute();
     799        delete pDlg;
     800    }
     801
     802    /// @todo Is it possible at all if event-loop unwind?
     803    /* Unlock the action allowing further calls: */
     804    actionPool()->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(true);
     805}
     806
     807void UIVirtualBoxManager::sltOpenCloneMachineWizard()
     808{
     809    /* Get current item: */
     810    UIVirtualMachineItem *pItem = currentItem();
     811    AssertMsgReturnVoid(pItem, ("Current item should be selected!\n"));
     812
     813    /* Lock the action preventing cascade calls: */
    819814    actionPool()->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(false);
    820815
    821816    /* Use the "safe way" to open stack of Mac OS X Sheets: */
    822817    QWidget *pWizardParent = windowManager().realParentWindow(this);
    823 
    824818    const QStringList &machineGroupNames = pItem->groups();
    825     QString strGroup = !machineGroupNames.isEmpty() ? machineGroupNames.at(0) : QString();
     819    const QString strGroup = !machineGroupNames.isEmpty() ? machineGroupNames.at(0) : QString();
    826820    UISafePointerWizard pWizard = new UIWizardCloneVM(pWizardParent, pItem->machine(), strGroup);
    827821    windowManager().registerNewParent(pWizard, pWizardParent);
     
    835829}
    836830
    837 void UIVirtualBoxManager::sltPerformMoveMachine()
    838 {
     831void UIVirtualBoxManager::sltPerformMachineMove()
     832{
     833    /* Get current item: */
    839834    UIVirtualMachineItem *pItem = currentItem();
    840835    AssertMsgReturnVoid(pItem, ("Current item should be selected!\n"));
     
    913908    QList<UIVirtualMachineItem*> itemsToDiscard;
    914909    foreach (UIVirtualMachineItem *pItem, items)
     910    {
    915911        if (isActionEnabled(UIActionIndexST_M_Group_S_Discard, QList<UIVirtualMachineItem*>() << pItem))
    916912        {
     
    918914            itemsToDiscard << pItem;
    919915        }
     916    }
    920917    AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!"));
    921918
     
    928925    {
    929926        /* Open a session to modify VM: */
    930         CSession session = vboxGlobal().openSession(pItem->id());
    931         if (session.isNull())
     927        CSession comSession = vboxGlobal().openSession(pItem->id());
     928        if (comSession.isNull())
    932929            return;
    933930
    934931        /* Get session machine: */
    935         CMachine machine = session.GetMachine();
    936         machine.DiscardSavedState(true);
    937         if (!machine.isOk())
    938             msgCenter().cannotDiscardSavedState(machine);
     932        CMachine comMachine = comSession.GetMachine();
     933        comMachine.DiscardSavedState(true);
     934        if (!comMachine.isOk())
     935            msgCenter().cannotDiscardSavedState(comMachine);
    939936
    940937        /* Unlock machine finally: */
    941         session.UnlockMachine();
     938        comSession.UnlockMachine();
    942939    }
    943940}
     
    953950    {
    954951        /* Get item state: */
    955         KMachineState state = pItem->machineState();
     952        const KMachineState enmState = pItem->machineState();
    956953
    957954        /* Check if current item could be paused/resumed: */
     
    961958        /* Check if current item already paused: */
    962959        if (fPause &&
    963             (state == KMachineState_Paused ||
    964              state == KMachineState_TeleportingPausedVM))
     960            (enmState == KMachineState_Paused ||
     961             enmState == KMachineState_TeleportingPausedVM))
    965962            continue;
    966963
    967964        /* Check if current item already resumed: */
    968965        if (!fPause &&
    969             (state == KMachineState_Running ||
    970              state == KMachineState_Teleporting ||
    971              state == KMachineState_LiveSnapshotting))
     966            (enmState == KMachineState_Running ||
     967             enmState == KMachineState_Teleporting ||
     968             enmState == KMachineState_LiveSnapshotting))
    972969            continue;
    973970
    974971        /* Open a session to modify VM state: */
    975         CSession session = vboxGlobal().openExistingSession(pItem->id());
    976         if (session.isNull())
     972        CSession comSession = vboxGlobal().openExistingSession(pItem->id());
     973        if (comSession.isNull())
    977974            return;
    978975
    979976        /* Get session console: */
    980         CConsole console = session.GetConsole();
     977        CConsole comConsole = comSession.GetConsole();
    981978        /* Pause/resume VM: */
    982979        if (fPause)
    983             console.Pause();
     980            comConsole.Pause();
    984981        else
    985             console.Resume();
    986         bool ok = console.isOk();
    987         if (!ok)
     982            comConsole.Resume();
     983        if (!comConsole.isOk())
    988984        {
    989985            if (fPause)
    990                 msgCenter().cannotPauseMachine(console);
     986                msgCenter().cannotPauseMachine(comConsole);
    991987            else
    992                 msgCenter().cannotResumeMachine(console);
     988                msgCenter().cannotResumeMachine(comConsole);
    993989        }
    994990
    995991        /* Unlock machine finally: */
    996         session.UnlockMachine();
     992        comSession.UnlockMachine();
    997993    }
    998994}
     
    10081004    QList<UIVirtualMachineItem*> itemsToReset;
    10091005    foreach (UIVirtualMachineItem *pItem, items)
     1006    {
    10101007        if (isActionEnabled(UIActionIndexST_M_Group_S_Reset, QList<UIVirtualMachineItem*>() << pItem))
    10111008        {
     
    10131010            itemsToReset << pItem;
    10141011        }
     1012    }
    10151013    AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!"));
    10161014
     
    10231021    {
    10241022        /* Open a session to modify VM state: */
    1025         CSession session = vboxGlobal().openExistingSession(pItem->id());
    1026         if (session.isNull())
     1023        CSession comSession = vboxGlobal().openExistingSession(pItem->id());
     1024        if (comSession.isNull())
    10271025            return;
    10281026
    10291027        /* Get session console: */
    1030         CConsole console = session.GetConsole();
     1028        CConsole comConsole = comSession.GetConsole();
    10311029        /* Reset VM: */
    1032         console.Reset();
     1030        comConsole.Reset();
    10331031
    10341032        /* Unlock machine finally: */
    1035         session.UnlockMachine();
     1033        comSession.UnlockMachine();
    10361034    }
    10371035}
     
    10691067
    10701068        /* Open a session to modify VM state: */
    1071         CSession session = vboxGlobal().openExistingSession(pItem->id());
    1072         if (session.isNull())
     1069        CSession comSession = vboxGlobal().openExistingSession(pItem->id());
     1070        if (comSession.isNull())
    10731071            return;
    10741072
    10751073        /* Get session console: */
    1076         CConsole console = session.GetConsole();
     1074        CConsole comConsole = comSession.GetConsole();
    10771075        /* Get session machine: */
    1078         CMachine machine = session.GetMachine();
     1076        CMachine comMachine = comSession.GetMachine();
    10791077        /* Pause VM first if necessary: */
    10801078        if (pItem->machineState() != KMachineState_Paused)
    1081             console.Pause();
    1082         if (console.isOk())
     1079            comConsole.Pause();
     1080        if (comConsole.isOk())
    10831081        {
    10841082            /* Prepare machine state saving progress: */
    1085             CProgress progress = machine.SaveState();
    1086             if (machine.isOk())
     1083            CProgress comProgress = comMachine.SaveState();
     1084            if (comMachine.isOk())
    10871085            {
    10881086                /* Show machine state saving progress: */
    1089                 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_state_save_90px.png");
    1090                 if (!progress.isOk() || progress.GetResultCode() != 0)
    1091                     msgCenter().cannotSaveMachineState(progress, machine.GetName());
     1087                msgCenter().showModalProgressDialog(comProgress, comMachine.GetName(), ":/progress_state_save_90px.png");
     1088                if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
     1089                    msgCenter().cannotSaveMachineState(comProgress, comMachine.GetName());
    10921090            }
    10931091            else
    1094                 msgCenter().cannotSaveMachineState(machine);
     1092                msgCenter().cannotSaveMachineState(comMachine);
    10951093        }
    10961094        else
    1097             msgCenter().cannotPauseMachine(console);
     1095            msgCenter().cannotPauseMachine(comConsole);
    10981096
    10991097        /* Unlock machine finally: */
    1100         session.UnlockMachine();
     1098        comSession.UnlockMachine();
    11011099    }
    11021100}
     
    11121110    QList<UIVirtualMachineItem*> itemsToShutdown;
    11131111    foreach (UIVirtualMachineItem *pItem, items)
     1112    {
    11141113        if (isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, QList<UIVirtualMachineItem*>() << pItem))
    11151114        {
     
    11171116            itemsToShutdown << pItem;
    11181117        }
     1118    }
    11191119    AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!"));
    11201120
     
    11271127    {
    11281128        /* Open a session to modify VM state: */
    1129         CSession session = vboxGlobal().openExistingSession(pItem->id());
    1130         if (session.isNull())
     1129        CSession comSession = vboxGlobal().openExistingSession(pItem->id());
     1130        if (comSession.isNull())
    11311131            return;
    11321132
    11331133        /* Get session console: */
    1134         CConsole console = session.GetConsole();
     1134        CConsole comConsole = comSession.GetConsole();
    11351135        /* ACPI Shutdown: */
    1136         console.PowerButton();
    1137         if (!console.isOk())
    1138             msgCenter().cannotACPIShutdownMachine(console);
     1136        comConsole.PowerButton();
     1137        if (!comConsole.isOk())
     1138            msgCenter().cannotACPIShutdownMachine(comConsole);
    11391139
    11401140        /* Unlock machine finally: */
    1141         session.UnlockMachine();
     1141        comSession.UnlockMachine();
    11421142    }
    11431143}
     
    11531153    QList<UIVirtualMachineItem*> itemsToPowerOff;
    11541154    foreach (UIVirtualMachineItem *pItem, items)
     1155    {
    11551156        if (isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, QList<UIVirtualMachineItem*>() << pItem))
    11561157        {
     
    11581159            itemsToPowerOff << pItem;
    11591160        }
     1161    }
    11601162    AssertMsg(!machineNames.isEmpty(), ("This action should not be allowed!"));
    11611163
     
    11681170    {
    11691171        /* Open a session to modify VM state: */
    1170         CSession session = vboxGlobal().openExistingSession(pItem->id());
    1171         if (session.isNull())
     1172        CSession comSession = vboxGlobal().openExistingSession(pItem->id());
     1173        if (comSession.isNull())
    11721174            return;
    11731175
    11741176        /* Get session console: */
    1175         CConsole console = session.GetConsole();
     1177        CConsole comConsole = comSession.GetConsole();
    11761178        /* Prepare machine power down: */
    1177         CProgress progress = console.PowerDown();
    1178         if (console.isOk())
     1179        CProgress comProgress = comConsole.PowerDown();
     1180        if (comConsole.isOk())
    11791181        {
    11801182            /* Show machine power down progress: */
    1181             CMachine machine = session.GetMachine();
    1182             msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_poweroff_90px.png");
    1183             if (!progress.isOk() || progress.GetResultCode() != 0)
    1184                 msgCenter().cannotPowerDownMachine(progress, machine.GetName());
     1183            CMachine machine = comSession.GetMachine();
     1184            msgCenter().showModalProgressDialog(comProgress, machine.GetName(), ":/progress_poweroff_90px.png");
     1185            if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
     1186                msgCenter().cannotPowerDownMachine(comProgress, machine.GetName());
    11851187        }
    11861188        else
    1187             msgCenter().cannotPowerDownMachine(console);
     1189            msgCenter().cannotPowerDownMachine(comConsole);
    11881190
    11891191        /* Unlock machine finally: */
    1190         session.UnlockMachine();
     1192        comSession.UnlockMachine();
    11911193    }
    11921194}
     
    12411243void UIVirtualBoxManager::sltCloseLogViewerWindow()
    12421244{
     1245    /* Search for the sender of the signal within the m_logViewers map: */
    12431246    QMap<QString, QIManagerDialog*>::iterator sendersIterator = m_logViewers.begin();
    1244 
    1245     /* Search for the sender of the signal within the m_logViewers map: */
    12461247    while (sendersIterator != m_logViewers.end() && sendersIterator.value() != sender())
    12471248        ++sendersIterator;
     
    12501251        return;
    12511252
    1252     QIManagerDialog* pDialog = qobject_cast<QIManagerDialog*>(sendersIterator.value());
     1253    /* Check whether we have found the proper dialog: */
     1254    QIManagerDialog *pDialog = qobject_cast<QIManagerDialog*>(sendersIterator.value());
    12531255    if (!pDialog)
    12541256        return;
    12551257
    1256     /* First remove this log viewer dialog from the map. This should be
    1257        done before closing the dialog which will incur a second call to
    1258        this function and result in double delete!!!: */
     1258    /* First remove this log-viewer dialog from the map.
     1259     * This should be done before closing the dialog which will incur
     1260     * a second call to this function and result in double delete!!!: */
    12591261    m_logViewers.erase(sendersIterator);
    12601262    UIVMLogViewerDialogFactory(CMachine()).cleanup(pDialog);
     
    12931295
    12941296        /* Create shortcut for this VM: */
    1295         const CMachine &machine = pItem->machine();
    1296         UIDesktopServices::createMachineShortcut(machine.GetSettingsFilePath(),
     1297        const CMachine &comMachine = pItem->machine();
     1298        UIDesktopServices::createMachineShortcut(comMachine.GetSettingsFilePath(),
    12971299                                                 QStandardPaths::writableLocation(QStandardPaths::DesktopLocation),
    1298                                                  machine.GetName(), machine.GetId());
     1300                                                 comMachine.GetName(), comMachine.GetId());
    12991301    }
    13001302}
     
    14131415    /* We have to make sure that we are getting the front most process: */
    14141416    ::darwinSetFrontMostProcess();
    1415 #endif /* VBOX_WS_MAC */
     1417#endif
    14161418
    14171419    /* Cache medium data early if necessary: */
     
    14581460     * On Mac OS X the icon referenced in info.plist is used.
    14591461     * On X11 we will provide as much icons as we can. */
    1460 #if !(defined (VBOX_WS_WIN) || defined (VBOX_WS_MAC))
     1462#if !defined(VBOX_WS_WIN) && !defined(VBOX_WS_MAC)
    14611463    QIcon icon(":/VirtualBox.svg");
    14621464    icon.addFile(":/VirtualBox_48px.png");
     
    15051507    menuBar()->addMenu(gpWindowMenuManager->createMenu(this));
    15061508    gpWindowMenuManager->addWindow(this);
    1507 #endif /* VBOX_WS_MAC */
     1509#endif
    15081510
    15091511    /* Prepare Help-menu: */
     
    15231525
    15241526#ifdef VBOX_WS_MAC
     1527
    15251528    /* 'About' action goes to Application menu: */
    15261529    pMenu->addAction(actionPool()->action(UIActionIndex_M_Application_S_About));
     
    16071610    /* 'Close' action goes to 'File' menu: */
    16081611    pMenu->addAction(actionPool()->action(UIActionIndexST_M_File_S_Close));
     1612
    16091613#endif /* !VBOX_WS_MAC */
    16101614}
     
    20902094    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltOpenMachineSettingsDialog()));
    20912095    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltOpenCloneMachineWizard()));
    2092     connect(actionPool()->action(UIActionIndexST_M_Machine_S_Move), SIGNAL(triggered()), this, SLOT(sltPerformMoveMachine()));
     2096    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Move), SIGNAL(triggered()), this, SLOT(sltPerformMachineMove()));
    20932097    connect(actionPool()->action(UIActionIndexST_M_Machine_M_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowMachine()));
    20942098    connect(actionPool()->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseOrResumeMachine(bool)));
     
    22682272    /* Cleanup 'Window' menu: */
    22692273    UIWindowMenuManager::destroy();
    2270 #endif /* VBOX_WS_MAC */
     2274#endif
    22712275
    22722276    /* Destroy action-pool: */
     
    22982302    QList<UIVirtualMachineItem*> startableItems;
    22992303    foreach (UIVirtualMachineItem *pItem, items)
     2304    {
    23002305        if (isAtLeastOneItemCanBeStarted(QList<UIVirtualMachineItem*>() << pItem))
    23012306        {
     
    23032308            startableMachineNames << pItem->name();
    23042309        }
     2310    }
    23052311
    23062312    /* Initially we have start auto-confirmed: */
     
    23132319    /* For every item => check if it could be launched: */
    23142320    foreach (UIVirtualMachineItem *pItem, items)
     2321    {
    23152322        if (   isAtLeastOneItemCanBeShown(QList<UIVirtualMachineItem*>() << pItem)
    23162323            || (   isAtLeastOneItemCanBeStarted(QList<UIVirtualMachineItem*>() << pItem)
     
    23282335            vboxGlobal().launchMachine(machine, enmItemLaunchMode);
    23292336        }
     2337    }
    23302338}
    23312339
     
    24412449    UIVirtualMachineItem *pFirstStartedAction = 0;
    24422450    foreach (UIVirtualMachineItem *pSelectedItem, items)
     2451    {
    24432452        if (UIVirtualMachineItem::isItemStarted(pSelectedItem))
    24442453        {
     
    24462455            break;
    24472456        }
     2457    }
    24482458    /* Update the group Pause/Resume action appearance: */
    24492459    actionPool()->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(true);
     
    26502660{
    26512661    foreach (UIVirtualMachineItem *pItem, items)
    2652         if (pItem->accessible()
     2662    {
     2663        if (   pItem->accessible()
    26532664#ifdef VBOX_WS_MAC
    26542665            /* On Mac OS X this are real alias files, which don't work with the old legacy xml files. */
    26552666            && pItem->settingsFile().endsWith(".vbox", Qt::CaseInsensitive)
    2656 #endif /* VBOX_WS_MAC */
     2667#endif
    26572668            )
    26582669            return true;
     2670    }
    26592671    return false;
    26602672}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h

    r73451 r73457  
    181181          * @param strControl  can bring the widget of the page to focus.
    182182          * @param strID       can bring the ID of machine to manage. */
    183         void sltOpenMachineSettingsDialog(const QString &strCategory = QString(),
    184                                           const QString &strControl = QString(),
     183        void sltOpenMachineSettingsDialog(QString strCategory = QString(),
     184                                          QString strControl = QString(),
    185185                                          const QString &strID = QString());
    186186
     
    189189
    190190        /** Handles the Move Machine action. */
    191         void sltPerformMoveMachine();
     191        void sltPerformMachineMove();
    192192
    193193        /** Handles call to start or show machine. */
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