VirtualBox

Changeset 102474 in vbox


Ignore:
Timestamp:
Dec 5, 2023 1:16:47 PM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160617
Message:

FE/Qt: ​bugref:9080, bugref:10141 Open newly create viso to register it and return its QUuid.

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

Legend:

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

    r102363 r102474  
    16401640            break;
    16411641        case UIMediumDeviceType_DVD:
    1642             UIVisoCreatorDialog::createViso(pActionPool, pParent, strDefaultFolder, strMachineName);
     1642            uMediumId = UIVisoCreatorDialog::createViso(pActionPool, pParent, strDefaultFolder, strMachineName);
    16431643            break;
    16441644        case UIMediumDeviceType_Floppy:
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r102446 r102474  
    878878
    879879/* static */
    880 void UIVisoCreatorDialog::createViso(UIActionPool *pActionPool, QWidget *pParent,
    881                                      const QString &strDefaultFolder /* = QString() */,
    882                                      const QString &strMachineName /* = QString() */)
     880QUuid UIVisoCreatorDialog::createViso(UIActionPool *pActionPool, QWidget *pParent,
     881                                      const QString &strDefaultFolder /* = QString() */,
     882                                      const QString &strMachineName /* = QString() */)
    883883{
    884884    QString strVisoSaveFolder(strDefaultFolder);
     
    889889    UIVisoCreatorDialog *pVisoCreator = new UIVisoCreatorDialog(pActionPool, pDialogParent,
    890890                                                                strVisoSaveFolder, strMachineName);
    891     AssertPtrReturnVoid(pVisoCreator);
     891    AssertPtrReturn(pVisoCreator, QUuid());
    892892
    893893    windowManager().registerNewParent(pVisoCreator, pDialogParent);
    894894    pVisoCreator->setCurrentPath(gEDataManager->visoCreatorRecentFolder());
    895 
     895    QUuid mediumId;
    896896    if (pVisoCreator->exec(false /* not application modal */))
    897897    {
    898898        if (pVisoCreator->saveVISOFile())
     899        {
     900            QString strFilePath = pVisoCreator->visoFileFullPath();
    899901            gEDataManager->setVISOCreatorRecentFolder(pVisoCreator->currentPath());
     902            mediumId = uiCommon().openMedium(UIMediumDeviceType_DVD, strFilePath);
     903        }
    900904    }
    901905
    902906    delete pVisoCreator;
    903     return;
     907    return mediumId;
    904908}
    905909
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h

    r102404 r102474  
    188188      * @param  pParent           Passes the dialog parent.
    189189      * @param  strDefaultFolder  Passes the folder to save the VISO file.
    190       * @param  strMachineName    Passes the name of the machine. */
    191     static void createViso(UIActionPool *pActionPool, QWidget *pParent,
    192                            const QString &strDefaultFolder = QString(),
    193                            const QString &strMachineName  = QString());
     190      * @param  strMachineName    Passes the name of the machine.
     191      * returns QUuid of the opened medium when successful. */
     192    static QUuid createViso(UIActionPool *pActionPool, QWidget *pParent,
     193                            const QString &strDefaultFolder = QString(),
     194                            const QString &strMachineName  = QString());
    194195
    195196protected:
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