VirtualBox

Changeset 55687 in vbox


Ignore:
Timestamp:
May 6, 2015 9:08:05 AM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: A bit of care for r100071.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r55678 r55687  
    198198    }
    199199
    200     /* Apply ad-hoc reconfigurations from the command line. */
     200    /* Apply ad-hoc reconfigurations from the command line: */
    201201    if (vboxGlobal().hasFloppyImageToMount())
    202202        mountAdHocImage(KDeviceType_Floppy, UIMediumType_Floppy, vboxGlobal().getFloppyImage());
     
    18481848}
    18491849
    1850 bool UISession::mountAdHocImage(KDeviceType enmDeviceType, UIMediumType enmMediumType, QString const &strImage)
    1851 {
    1852     /*
    1853      * The 'none' image name means ejecting what ever is in the drive, so leave
    1854      * the image variables null.
    1855      */
     1850bool UISession::mountAdHocImage(KDeviceType enmDeviceType, UIMediumType enmMediumType, const QString &strImage)
     1851{
     1852    /* The 'none' image name means ejecting what ever is in the drive,
     1853     * so leave the image variables null. */
    18561854    CVirtualBox vbox = vboxGlobal().virtualBox();
    18571855    UIMedium uiImage;
    18581856    if (strImage != "none")
    18591857    {
    1860         /*
    1861          * Open the image.
    1862          */
    1863         QString strMediumID;
     1858        /* Open the image: */
    18641859        CVirtualBox vbox = vboxGlobal().virtualBox();
    18651860        CMedium vboxImage = vbox.OpenMedium(strImage, enmDeviceType, KAccessMode_ReadWrite, false /* fForceNewUuid */);
    18661861        if (!vbox.isOk() || vboxImage.isNull())
    18671862        {
    1868             msgCenter().cannotOpenMedium(vbox, enmMediumType, strImage, mainMachineWindow());
     1863            msgCenter().cannotOpenMedium(vbox, enmMediumType, strImage);
    18691864            return false;
    18701865        }
    18711866
    1872         /*
    1873          * Work the cache and use the cached image if possible.
    1874          */
     1867        /* Work the cache and use the cached image if possible: */
    18751868        uiImage = vboxGlobal().medium(vboxImage.GetId());
    18761869        if (uiImage.isNull())
     
    18821875    if (vbox.isOk())
    18831876    {
    1884         /*
    1885          * Find suitable storage controller.
    1886          */
     1877        /* Find suitable storage controller: */
    18871878        foreach (const CStorageController &controller, machine().GetStorageControllers())
    18881879        {
     
    18911882                if (attachment.GetType() == enmDeviceType)
    18921883                {
    1893                     /*
    1894                      * Mount the image.
    1895                      */
     1884                    /* Mount the image: */
    18961885                    machine().MountMedium(controller.GetName(), attachment.GetPort(), attachment.GetDevice(), uiImage.medium(), true /* force */);
    18971886                    if (machine().isOk())
    18981887                        return true;
    1899                     msgCenter().cannotRemountMedium(machine(), uiImage, !uiImage.isNull() /*mount*/, false /* retry? */, mainMachineWindow());
     1888                    msgCenter().cannotRemountMedium(machine(), uiImage, !uiImage.isNull() /* mount */, false /* retry */);
    19001889                    return false;
    19011890                }
    19021891            }
    19031892        }
    1904         msgCenter().cannotRemountMedium(machine(), uiImage, !uiImage.isNull() /*mount*/, false /* retry? */, mainMachineWindow());
     1893        msgCenter().cannotRemountMedium(machine(), uiImage, !uiImage.isNull() /* mount */, false /* retry */);
    19051894    }
    19061895    else
    1907         msgCenter().cannotOpenMedium(vbox, enmMediumType, strImage, mainMachineWindow());
     1896        msgCenter().cannotOpenMedium(vbox, enmMediumType, strImage);
    19081897    return false;
    19091898}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r55678 r55687  
    380380    void setPointerShape(const uchar *pShapeData, bool fHasAlpha, uint uXHot, uint uYHot, uint uWidth, uint uHeight);
    381381    bool preprocessInitialization();
    382     bool mountAdHocImage(KDeviceType enmDeviceType, enum UIMediumDefs::UIMediumType enmMediumType, QString const &strImage);
     382    bool mountAdHocImage(KDeviceType enmDeviceType, UIMediumType enmMediumType, const QString &strImage);
    383383    bool postprocessInitialization();
    384384    int countOfVisibleWindows();
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