VirtualBox

Ignore:
Timestamp:
Feb 12, 2010 10:24:59 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57604
Message:

FE/Qt4: Don't guess the OS type anymore when the user manually changed it.

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

Legend:

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

    r26440 r26456  
    193193    connect(m_pNameEditor, SIGNAL(textChanged(const QString&)),
    194194            this, SLOT(sltNameChanged(const QString&)));
     195    connect(m_pTypeSelector, SIGNAL(osTypeChanged()),
     196            this, SLOT(sltOsTypeChanged()));
    195197
    196198    /* Setup contents */
     
    223225    /* Search for a matching OS type based on the string the user typed
    224226     * already. */
    225     /** @todo Perhaps we shouldn't do this if the user has manually selected
    226      *        anything in any of the the combo boxes. */
    227227    for (size_t i=0; i < RT_ELEMENTS(gs_OSTypePattern); ++i)
    228228        if (strNewText.contains(gs_OSTypePattern[i].pattern))
    229229        {
     230            m_pTypeSelector->blockSignals(true);
    230231            m_pTypeSelector->setType(vboxGlobal().vmGuestOSType(gs_OSTypePattern[i].pcstId));
     232            m_pTypeSelector->blockSignals(false);
    231233            break;
    232234        }
     235}
     236
     237void UINewVMWzdPage2::sltOsTypeChanged()
     238{
     239    /* If the user manually edited the OS type, we didn't want our automatic OS
     240     * type guessing anymore. So simply disconnect the text edit signal. */
     241    disconnect(m_pNameEditor, SIGNAL(textChanged(const QString&)),
     242               this, SLOT(sltNameChanged(const QString&)));
    233243}
    234244
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.h

    r26367 r26456  
    7676
    7777    void sltNameChanged(const QString &strNewText);
     78    void sltOsTypeChanged();
    7879
    7980protected:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette