VirtualBox

Changeset 90070 in vbox


Ignore:
Timestamp:
Jul 6, 2021 4:08:24 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: More fixes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIUserNamePasswordEditor.cpp

    r90037 r90070  
    255255        if (m_pPasswordLineEdit->text() != m_pPasswordRepeatLineEdit->text())
    256256            fPasswordOK = false;
    257 #if 0
    258257        if (m_pPasswordLineEdit->text().isEmpty())
    259258            fPasswordOK = false;
    260 #endif
    261259        m_pPasswordLineEdit->mark(!fPasswordOK, m_strPasswordError);
    262260        m_pPasswordRepeatLineEdit->mark(!fPasswordOK, m_strPasswordError);
     
    317315    {
    318316        if(m_pUserNameLineEdit)
    319             m_pUserNameLineEdit->setPlaceholderText(strUsername);
     317            m_pUserNameLineEdit->setPlaceholderText(strUsername.remove('&'));
    320318        if (m_pPasswordLineEdit)
    321             m_pPasswordLineEdit->setPlaceholderText(strPassword);
     319            m_pPasswordLineEdit->setPlaceholderText(strPassword.remove('&'));
    322320        if (m_pPasswordRepeatLineEdit)
    323             m_pPasswordRepeatLineEdit->setPlaceholderText(strRepeatPassword);
     321            m_pPasswordRepeatLineEdit->setPlaceholderText(strRepeatPassword.remove('&'));
    324322    }
    325323    else
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r90066 r90070  
    8888        {
    8989            addPage(new UIWizardNewVMNameOSTypePageBasic);
    90             // addPage(new UIWizardNewVMUnattendedPageBasic);
    91             // addPage(new UIWizardNewVMHardwarePageBasic);
    92             // addPage(new UIWizardNewVMDiskPageBasic);
     90            addPage(new UIWizardNewVMUnattendedPageBasic);
     91            addPage(new UIWizardNewVMHardwarePageBasic);
     92            addPage(new UIWizardNewVMDiskPageBasic);
    9393            break;
    9494        }
     
    806806bool UIWizardNewVM::isUnattendedEnabled() const
    807807{
    808     if (!m_fSkipUnattendedInstall)
    809         return false;
    810808    if (m_strISOFilePath.isEmpty() || m_strISOFilePath.isNull())
    811809        return false;
     810    if (m_fSkipUnattendedInstall)
     811        return false;
    812812    return true;
    813813}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h

    r90066 r90070  
    3030#include "CMedium.h"
    3131
    32 #define newVMWizardPropertySet(functionName, value)                  \
    33     UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); \
    34     if (!pWizard)                                                    \
    35         pWizard->set##functionName(value)
     32#define newVMWizardPropertySet(functionName, value)                     \
     33    do                                                                  \
     34    {                                                                   \
     35        UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); \
     36        if (pWizard)                                                   \
     37            pWizard->set##functionName(value);                          \
     38    }                                                                   \
     39    while(0)
    3640
    3741/** Container for unattended install related data. */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp

    r90066 r90070  
    385385        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged);
    386386        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged);
    387         connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOSFamilyChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltGuestOSFamilChanged);
     387        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOSFamilyChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltGuestOSFamilyChanged);
    388388    }
    389389}
     
    441441void UIWizardNewVMNameOSTypePageBasic::initializePage()
    442442{
    443     /* Translate page: */
    444443    retranslateUi();
     444
     445    /* Make sure parameters are initialized correctly: */
     446    if (m_pNameAndSystemEditor)
     447        newVMWizardPropertySet(GuestOSFamilyId, m_pNameAndSystemEditor->familyId());
     448
    445449    if (m_pNameAndSystemEditor)
    446450        m_pNameAndSystemEditor->setFocus();
     
    479483}
    480484
    481 void UIWizardNewVMNameOSTypePageBasic::sltGuestOSFamilChanged(const QString &strGuestOSFamilyId)
     485void UIWizardNewVMNameOSTypePageBasic::sltGuestOSFamilyChanged(const QString &strGuestOSFamilyId)
    482486{
    483487    newVMWizardPropertySet(GuestOSFamilyId, strGuestOSFamilyId);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h

    r90060 r90070  
    7979private slots:
    8080
    81     /** Handlers. */
    8281    void sltNameChanged(const QString &strNewText);
    8382    void sltPathChanged(const QString &strNewPath);
    8483    void sltOsTypeChanged();
    8584    void sltISOPathChanged(const QString &strPath);
    86     void sltGuestOSFamilChanged(const QString &strGuestOSFamilyId);
     85    void sltGuestOSFamilyChanged(const QString &strGuestOSFamilyId);
    8786
    8887private:
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