VirtualBox

Changeset 90109 in vbox for trunk


Ignore:
Timestamp:
Jul 9, 2021 10:12:29 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145609
Message:

FE/Qt: bugref:9996: Removing redundant data members

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r90108 r90109  
    6161    , m_iSASCount(0)
    6262    , m_iUSBCount(0)
    63     , m_fInstallGuestAdditions(false)
    64     , m_fStartHeadless(false)
    6563    , m_fSkipUnattendedInstall(false)
    6664    , m_fEFIEnabled(false)
     
    564562{
    565563    m_unattendedInstallData = unattendedInstallData;
    566     setFieldsFromDefaultUnttendedInstallData();
    567 }
    568 
    569 void UIWizardNewVM::setFieldsFromDefaultUnttendedInstallData()
    570 {
    571     m_strUserName = m_unattendedInstallData.m_strUserName;
    572     m_strPassword = m_unattendedInstallData.m_strPassword;
    573     m_strHostname = m_unattendedInstallData.m_strHostname;
    574     m_fInstallGuestAdditions = m_unattendedInstallData.m_fInstallGuestAdditions;
    575     m_strGuestAdditionsISOPath = m_unattendedInstallData.m_strGuestAdditionsISOPath;
    576564}
    577565
     
    672660bool UIWizardNewVM::installGuestAdditions() const
    673661{
    674     return m_fInstallGuestAdditions;
     662    return m_unattendedInstallData.m_fInstallGuestAdditions;
    675663}
    676664
    677665void UIWizardNewVM::setInstallGuestAdditions(bool fInstallGA)
    678666{
    679     m_fInstallGuestAdditions = fInstallGA;
     667    m_unattendedInstallData.m_fInstallGuestAdditions = fInstallGA;
    680668}
    681669
    682670bool UIWizardNewVM::startHeadless() const
    683671{
    684     return m_fStartHeadless;
     672    return m_unattendedInstallData.m_fStartHeadless;
    685673}
    686674
    687675void UIWizardNewVM::setStartHeadless(bool fStartHeadless)
    688676{
    689     m_fStartHeadless = fStartHeadless;
     677    m_unattendedInstallData.m_fStartHeadless = fStartHeadless;
    690678}
    691679
     
    726714const QString &UIWizardNewVM::userName() const
    727715{
    728     return m_strUserName;
     716    return m_unattendedInstallData.m_strUserName;
    729717}
    730718
    731719void UIWizardNewVM::setUserName(const QString &strUserName)
    732720{
    733     m_strUserName = strUserName;
     721    m_unattendedInstallData.m_strUserName = strUserName;
    734722}
    735723
    736724const QString &UIWizardNewVM::password() const
    737725{
    738     return m_strPassword;
     726    return m_unattendedInstallData.m_strPassword;
    739727}
    740728
    741729void UIWizardNewVM::setPassword(const QString &strPassword)
    742730{
    743     m_strPassword = strPassword;
     731    m_unattendedInstallData.m_strPassword = strPassword;
    744732}
    745733
    746734const QString &UIWizardNewVM::guestAdditionsISOPath() const
    747735{
    748     return m_strGuestAdditionsISOPath;
     736    return m_unattendedInstallData.m_strGuestAdditionsISOPath;
    749737}
    750738
    751739void UIWizardNewVM::setGuestAdditionsISOPath(const QString &strGAISOPath)
    752740{
    753     m_strGuestAdditionsISOPath = strGAISOPath;
     741    m_unattendedInstallData.m_strGuestAdditionsISOPath = strGAISOPath;
    754742}
    755743
    756744const QString &UIWizardNewVM::hostname() const
    757745{
    758     return m_strHostname;
     746    return m_unattendedInstallData.m_strHostname;
    759747}
    760748
    761749void UIWizardNewVM::setHostname(const QString &strHostname)
    762750{
    763     m_strHostname = strHostname;
     751    m_unattendedInstallData.m_strHostname = strHostname;
    764752}
    765753
    766754const QString &UIWizardNewVM::productKey() const
    767755{
    768     return m_strProductKey;
     756    return m_unattendedInstallData.m_strProductKey;
    769757}
    770758
    771759void UIWizardNewVM::setProductKey(const QString &productKey)
    772760{
    773     m_strProductKey = productKey;
     761    m_unattendedInstallData.m_strProductKey = productKey;
    774762}
    775763
     
    838826{
    839827    m_unattendedInstallData.m_strISOPath = m_strISOFilePath;
    840     m_unattendedInstallData.m_strUserName = m_strUserName;
    841     m_unattendedInstallData.m_strPassword = m_strPassword;
    842     m_unattendedInstallData.m_strHostname = m_strHostname;
    843 
    844     m_unattendedInstallData.m_strDetectedOSTypeId = m_strDetectedOSTypeId;
    845     // // m_unattendedInstallData.m_strDetectedOSVersion = getStringFieldValue("detectedOSVersion");
    846     // // m_unattendedInstallData.m_strDetectedOSFlavor = getStringFieldValue("detectedOSFlavor");
    847     // // m_unattendedInstallData.m_strDetectedOSLanguages = getStringFieldValue("detectedOSLanguages");
    848     // // m_unattendedInstallData.m_strDetectedOSHints = getStringFieldValue("detectedOSHints");
    849     m_unattendedInstallData.m_strProductKey = m_strProductKey;
    850     m_unattendedInstallData.m_strGuestAdditionsISOPath = m_strGuestAdditionsISOPath;
    851828    m_unattendedInstallData.m_fUnattendedEnabled = isUnattendedEnabled();
    852     m_unattendedInstallData.m_fStartHeadless = m_fStartHeadless;
    853     m_unattendedInstallData.m_fInstallGuestAdditions = m_fInstallGuestAdditions;
    854829    m_unattendedInstallData.m_uMachineUid = createdMachineId();
    855830
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h

    r90108 r90109  
    4545{
    4646    UIUnattendedInstallData();
    47     bool m_fUnattendedEnabled;
    4847    QUuid m_uMachineUid;
    4948    QString m_strISOPath;
     49
     50    bool m_fUnattendedEnabled;
    5051    bool m_fStartHeadless;
    5152    QString m_strUserName;
    5253    QString m_strPassword;
    5354    QString m_strHostname;
    54     QString m_strDetectedOSTypeId;
     55    QString m_strProductKey;
     56    bool m_fInstallGuestAdditions;
     57    QString m_strGuestAdditionsISOPath;
     58#if 0
    5559    QString m_strDetectedOSVersion;
    5660    QString m_strDetectedOSFlavor;
    5761    QString m_strDetectedOSLanguages;
    5862    QString m_strDetectedOSHints;
    59     QString m_strProductKey;
    60     bool m_fInstallGuestAdditions;
    61     QString m_strGuestAdditionsISOPath;
     63#endif
    6264};
    6365
     
    171173    void retranslateUi();
    172174    QString getNextControllerName(KStorageBus type);
    173     void setFieldsFromDefaultUnttendedInstallData();
    174175    void setUnattendedPageVisible(bool fVisible);
    175176    /** Returns the Id of newly created VM. */
     
    214215    /** True if guest additions are to be installed during unattended install. */
    215216    bool m_fInstallGuestAdditions;
    216     bool m_fStartHeadless;
    217217    bool m_fSkipUnattendedInstall;
    218218    bool m_fEFIEnabled;
    219 
    220     QString m_strUserName;
    221     QString m_strPassword;
    222     QString m_strGuestAdditionsISOPath;
    223     QString m_strHostname;
    224     QString m_strProductKey;
    225219
    226220    int m_iCPUCount;
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