VirtualBox

Ignore:
Timestamp:
Jan 25, 2013 10:24:45 AM (12 years ago)
Author:
vboxsync
Message:

Main: change API. Interface IMedium was touched. Handling enumeration MediumVariant was changed. PR5434.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp

    r44113 r44365  
    142142        mHardDiskFormat = mMedium.GetFormat();
    143143        mHardDiskType = vboxGlobal().mediumTypeString (mMedium);
    144         mStorageDetails = gpConverter->toString((KMediumVariant)mMedium.GetVariant());
     144
     145        QVector<KMediumVariant> mediumVariants_QVector = mMedium.GetVariant();
     146        qlonglong mediumVariants_qlonglong = 0;
     147        for (int i = 0; i < mediumVariants_QVector.size(); i++)
     148            mediumVariants_qlonglong |= mediumVariants_QVector[i];
     149
     150        mStorageDetails = gpConverter->toString((KMediumVariant)mediumVariants_qlonglong);
    145151        mIsReadOnly = mMedium.GetReadOnly();
    146152
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp

    r41587 r44365  
    7171    }
    7272
     73    QVector<KMediumVariant> l_variants(sizeof(uVariant)*8);
     74
     75    for (int i = 0; i < l_variants.size(); ++i)
     76    {
     77        qulonglong temp = uVariant;
     78        l_variants [i] = (KMediumVariant)(temp & (1<<i));
     79    }
     80
    7381    /* Copy existing virtual-disk to the new virtual-disk: */
    74     progress = sourceVirtualDisk.CloneTo(virtualDisk, uVariant, CMedium());
     82    progress = sourceVirtualDisk.CloneTo(virtualDisk, l_variants, CMedium());
    7583    if (!virtualDisk.isOk())
    7684    {
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp

    r41615 r44365  
    7474    }
    7575
     76    QVector<KMediumVariant> l_variants(sizeof(qulonglong)*8);
     77
     78    for (int i = 0; i < l_variants.size(); ++i)
     79    {
     80        qulonglong temp = uVariant;
     81        l_variants [i] = (KMediumVariant)(temp & (1<<i));
     82    }
     83
    7684    /* Create base storage for the new hard disk: */
    77     progress = virtualDisk.CreateBaseStorage(uSize, uVariant);
     85    progress = virtualDisk.CreateBaseStorage(uSize, l_variants);
     86
    7887    if (!virtualDisk.isOk())
    7988    {
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