VirtualBox

Changeset 91294 in vbox


Ignore:
Timestamp:
Sep 17, 2021 9:01:51 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996. Some space fixes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDExpertPage.cpp

    r91293 r91294  
    9393    QString strMediumPath =
    9494        UIWizardDiskEditors::appendExtension(strSelectedPath,
    95                                               UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
     95                                             UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
    9696    QFileInfo mediumPath(strMediumPath);
    9797    m_pMediumSizePathGroupBox->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath()));
     
    118118    QString strMediumPath =
    119119        UIWizardDiskEditors::appendExtension(strPath,
    120                                               UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
     120                                             UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
    121121    pWizard->setMediumPath(strMediumPath);
    122122    emit completeChanged();
     
    147147    QString strMediumFilePath =
    148148        UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDiskName,
    149                                                                                             strExtension), strSourceDiskPath);
     149                                                                                          strExtension), strSourceDiskPath);
    150150    m_pMediumSizePathGroupBox->setMediumFilePath(strMediumFilePath);
    151151    pWizard->setMediumPath(strMediumFilePath);
     
    167167        fResult =  m_pMediumSizePathGroupBox->isComplete();
    168168
    169    return fResult;
     169    return fResult;
    170170}
    171171
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPathSizePage.cpp

    r91293 r91294  
    8080        QString strMediumFilePath =
    8181            UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDiskName,
    82                                                                                                 strExtension), strSourceDiskPath);
     82                                                                                              strExtension), strSourceDiskPath);
    8383        m_pMediumSizePathGroupBox->setMediumFilePath(strMediumFilePath);
    8484        pWizard->setMediumPath(strMediumFilePath);
     
    119119    QString strMediumPath =
    120120        UIWizardDiskEditors::appendExtension(strSelectedPath,
    121                                               UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
     121                                             UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
    122122    QFileInfo mediumPath(strMediumPath);
    123123    m_pMediumSizePathGroupBox->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath()));
     
    131131    QString strMediumPath =
    132132        UIWizardDiskEditors::appendExtension(strPath,
    133                                               UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
     133                                             UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));
    134134    pWizard->setMediumPath(strMediumPath);
    135135    emit completeChanged();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.cpp

    r91293 r91294  
    8787    QString strMediumPath =
    8888        UIWizardDiskEditors::appendExtension(strPath,
    89                                               UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));
     89                                             UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));
    9090    pWizard->setMediumPath(strMediumPath);
    9191    emit completeChanged();
     
    115115    QString strSelectedPath =
    116116        UIWizardDiskEditors::openFileDialogForDiskFile(pWizard->mediumPath(), comMediumFormat,
    117                                                         KDeviceType_HardDisk, pWizard);
     117                                                       KDeviceType_HardDisk, pWizard);
    118118    if (strSelectedPath.isEmpty())
    119119        return;
    120120    QString strMediumPath =
    121121        UIWizardDiskEditors::appendExtension(strSelectedPath,
    122                                               UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));
     122                                             UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));
    123123    QFileInfo mediumPath(strMediumPath);
    124124    m_pSizeAndPathGroup->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath()));
     
    145145    QString strMediumFilePath =
    146146        UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(m_strDefaultName,
    147                                                                                             strExtension), m_strDefaultPath);
     147                                                                                          strExtension), m_strDefaultPath);
    148148    m_pSizeAndPathGroup->blockSignals(true);
    149149    m_pSizeAndPathGroup->setMediumFilePath(strMediumFilePath);
     
    196196    /* Make sure we are passing FAT size limitation: */
    197197    fResult = UIWizardDiskEditors::checkFATSizeLimitation(pWizard->mediumVariant(),
    198                                      pWizard->mediumPath(),
    199                                      pWizard->mediumSize());
     198                                                          pWizard->mediumPath(),
     199                                                          pWizard->mediumSize());
    200200    if (!fResult)
    201201    {
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp

    r91293 r91294  
    303303    QString strMediumPath =
    304304        UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDefaultName,
    305                                                                                   strDefaultExtension), strMachineFolder);
     305                                                                                          strDefaultExtension), strMachineFolder);
    306306    pWizard->setMediumPath(strMediumPath);
    307307
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp

    r91293 r91294  
    147147
    148148    if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType"))
    149             UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
     149        UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
    150150    pWizard->setISOFilePath(strISOPath);
    151151
     
    276276    if (m_pSkipUnattendedCheckBox)
    277277        connect(m_pSkipUnattendedCheckBox, &QCheckBox::toggled,
    278         this, &UIWizardNewVMExpertPage::sltSkipUnattendedCheckBoxChecked);
     278                this, &UIWizardNewVMExpertPage::sltSkipUnattendedCheckBoxChecked);
    279279
    280280    if (m_pSizeAndLocationGroup)
     
    363363{
    364364    /* We need not to check existence of parameter within m_userModifiedParameters since initializePage() runs
    365         once the page loads before user has a chance to modify parameters explicitly: */
     365       once the page loads before user has a chance to modify parameters explicitly: */
    366366    UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>();
    367367    AssertReturnVoid(pWizard);
     
    700700    QString strMediumPath =
    701701        UIWizardDiskEditors::appendExtension(strSelectedPath,
    702                                               UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));
     702                                             UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));
    703703    QFileInfo mediumPath(strMediumPath);
    704704    m_pSizeAndLocationGroup->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath()));
     
    823823        QString strMediumFilePath =
    824824            UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDiskFileName,
    825                                                                                       strExtension), strMediumPath);
     825                                                                                              strExtension), strMediumPath);
    826826        m_pSizeAndLocationGroup->blockSignals(true);
    827827        m_pSizeAndLocationGroup->setMediumFilePath(strMediumFilePath);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp

    r91220 r91294  
    197197
    198198void UIWizardNewVMNameOSTypeCommon::composeMachineFilePath(UINameAndSystemEditor *pNameAndSystemEditor,
    199                                                          UIWizardNewVM *pWizard)
     199                                                           UIWizardNewVM *pWizard)
    200200{
    201201    if (!pNameAndSystemEditor || !pWizard)
     
    203203    if (pNameAndSystemEditor->name().isEmpty() || pNameAndSystemEditor->path().isEmpty())
    204204        return;
    205      /* Get VBox: */
     205    /* Get VBox: */
    206206    CVirtualBox vbox = uiCommon().virtualBox();
    207207
    208208    /* Compose machine filename: */
    209209    pWizard->setMachineFilePath(vbox.ComposeMachineFilename(pNameAndSystemEditor->name(),
    210                                                                  pWizard->machineGroup(),
    211                                                                  QString(),
    212                                                                  pNameAndSystemEditor->path()));
     210                                                            pWizard->machineGroup(),
     211                                                            QString(),
     212                                                            pNameAndSystemEditor->path()));
    213213    /* Compose machine folder/basename: */
    214214    const QFileInfo fileInfo(pWizard->machineFilePath());
     
    218218
    219219bool UIWizardNewVMNameOSTypeCommon::createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor,
    220                                                       UINativeWizardPage *pCaller,
    221                                                       UIWizardNewVM *pWizard)
     220                                                        UINativeWizardPage *pCaller,
     221                                                        UIWizardNewVM *pWizard)
    222222{
    223223    if (!pNameAndSystemEditor || !pWizard)
     
    449449
    450450    if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType"))
    451             UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
     451        UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
    452452    pWizard->setISOFilePath(strPath);
    453453
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMSummaryPage.cpp

    r91293 r91294  
    3333
    3434/*********************************************************************************************************************************
    35 *   UIWizardNewVMSummaryItem definition.                                                                                  *
     35 *   UIWizardNewVMSummaryItem definition.                                                                                  *
    3636*********************************************************************************************************************************/
    3737
     
    7777
    7878/*********************************************************************************************************************************
    79 *   UIWizardNewVMSummaryModel definition.                                                                                  *
    80 *********************************************************************************************************************************/
     79 *   UIWizardNewVMSummaryModel definition.                                                                                  *
     80 *********************************************************************************************************************************/
    8181
    8282class UIWizardNewVMSummaryModel : public QAbstractItemModel
     
    260260QModelIndex UIWizardNewVMSummaryModel::index(int row, int column, const QModelIndex &parent /* = QModelIndex() */) const
    261261{
    262      if (!hasIndex(row, column, parent))
    263           return QModelIndex();
    264 
    265      UIWizardNewVMSummaryItem *pParentItem;
    266 
    267      if (!parent.isValid())
    268          pParentItem = m_pRootItem;
    269      else
    270          pParentItem = static_cast<UIWizardNewVMSummaryItem*>(parent.internalPointer());
    271 
    272      UIWizardNewVMSummaryItem *pChildItem = pParentItem->childItem(row);
    273      if (pChildItem)
    274          return createIndex(row, column, pChildItem);
    275      else
    276          return QModelIndex();
     262    if (!hasIndex(row, column, parent))
     263        return QModelIndex();
     264
     265    UIWizardNewVMSummaryItem *pParentItem;
     266
     267    if (!parent.isValid())
     268        pParentItem = m_pRootItem;
     269    else
     270        pParentItem = static_cast<UIWizardNewVMSummaryItem*>(parent.internalPointer());
     271
     272    UIWizardNewVMSummaryItem *pChildItem = pParentItem->childItem(row);
     273    if (pChildItem)
     274        return createIndex(row, column, pChildItem);
     275    else
     276        return QModelIndex();
    277277}
    278278
     
    442442    if (m_pLabel)
    443443        m_pLabel->setText(UIWizardNewVM::tr("The following table summarizes the configuration you have"
    444                                           " chosen for the new virtual machine. When you are happy with the configuration"
    445                                           " press Finish to create the virtual machine. Alternatively you can go back"
    446                                           " and modify the configuration."));
     444                                            " chosen for the new virtual machine. When you are happy with the configuration"
     445                                            " press Finish to create the virtual machine. Alternatively you can go back"
     446                                            " and modify the configuration."));
    447447}
    448448
     
    494494        /* Check FAT size limitation of the host hard drive: */
    495495        fResult = UIWizardDiskEditors::checkFATSizeLimitation(pWizard->mediumVariant(),
    496                                                                 strMediumPath,
    497                                                                 pWizard->mediumSize());
     496                                                              strMediumPath,
     497                                                              pWizard->mediumSize());
    498498        if (!fResult)
    499499        {
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