Changeset 50253 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 28, 2014 12:31:40 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp
r48576 r50253 197 197 else if (strFamilyId == "Windows") 198 198 { 199 int iIndexWinXP = m_pTypeCombo->findData("WindowsXP", TypeID); 199 QString strDefaultID = "WindowsXP"; 200 if (ARCH_BITS == 64) 201 strDefaultID += "_64"; 202 int iIndexWinXP = m_pTypeCombo->findData(strDefaultID, TypeID); 200 203 if (iIndexWinXP != -1) 201 204 m_pTypeCombo->setCurrentIndex(iIndexWinXP); … … 204 207 else if (strFamilyId == "Linux") 205 208 { 206 int iIndexUbuntu = m_pTypeCombo->findData("Ubuntu", TypeID); 209 QString strDefaultID = "Ubuntu"; 210 if (ARCH_BITS == 64) 211 strDefaultID += "_64"; 212 int iIndexUbuntu = m_pTypeCombo->findData(strDefaultID, TypeID); 207 213 if (iIndexUbuntu != -1) 208 214 m_pTypeCombo->setCurrentIndex(iIndexUbuntu); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r48950 r50253 34 34 #include "CSystemProperties.h" 35 35 36 /* Other VBox includes: */ 37 #include <iprt/system.h> 38 36 39 /* Defines some patterns to guess the right OS type. Should be in sync with 37 40 * VirtualBox-settings-common.xsd in Main. The list is sorted by priority. The … … 54 57 { QRegExp("(Wi.*NT)|(NT4)", Qt::CaseInsensitive), "WindowsNT4" }, 55 58 { QRegExp("((Wi.*XP)|(\\bXP\\b)).*64", Qt::CaseInsensitive), "WindowsXP_64" }, 56 { QRegExp("( Wi.*XP)|(\\bXP\\b)", Qt::CaseInsensitive), "WindowsXP" },59 { QRegExp("((Wi.*XP)|(\\bXP\\b)).*32", Qt::CaseInsensitive), "WindowsXP" }, 57 60 { QRegExp("((Wi.*2003)|(W2K3)|(Win2K3)).*64", Qt::CaseInsensitive), "Windows2003_64" }, 58 { QRegExp("( Wi.*2003)|(W2K3)|(Win2K3)", Qt::CaseInsensitive), "Windows2003" },61 { QRegExp("((Wi.*2003)|(W2K3)|(Win2K3)).*32", Qt::CaseInsensitive), "Windows2003" }, 59 62 { QRegExp("((Wi.*V)|(Vista)).*64", Qt::CaseInsensitive), "WindowsVista_64" }, 60 { QRegExp("( Wi.*V)|(Vista)", Qt::CaseInsensitive), "WindowsVista" },63 { QRegExp("((Wi.*V)|(Vista)).*32", Qt::CaseInsensitive), "WindowsVista" }, 61 64 { QRegExp("(Wi.*2012)|(W2K12)|(Win2K12)", Qt::CaseInsensitive), "Windows2012_64" }, 62 65 { QRegExp("((Wi.*2008)|(W2K8)|(Win2k8)).*64", Qt::CaseInsensitive), "Windows2008_64" }, 63 { QRegExp("( Wi.*2008)|(W2K8)|(Win2K8)", Qt::CaseInsensitive), "Windows2008" },66 { QRegExp("((Wi.*2008)|(W2K8)|(Win2K8)).*32", Qt::CaseInsensitive), "Windows2008" }, 64 67 { QRegExp("(Wi.*2000)|(W2K)|(Win2K)", Qt::CaseInsensitive), "Windows2000" }, 65 68 { QRegExp("(Wi.*7.*64)|(W7.*64)", Qt::CaseInsensitive), "Windows7_64" }, 66 { QRegExp("(Wi.*7 )|(W7)", Qt::CaseInsensitive), "Windows7" },69 { QRegExp("(Wi.*7.*32)|(W7.*32)", Qt::CaseInsensitive), "Windows7" }, 67 70 { QRegExp("(Wi.*8.*1.*64)|(W8.*64)", Qt::CaseInsensitive), "Windows81_64" }, 68 { QRegExp("(Wi.*8.*1 )|(W8)", Qt::CaseInsensitive), "Windows81" },71 { QRegExp("(Wi.*8.*1.*32)|(W8.*32)", Qt::CaseInsensitive), "Windows81" }, 69 72 { QRegExp("(Wi.*8.*64)|(W8.*64)", Qt::CaseInsensitive), "Windows8_64" }, 70 { QRegExp("(Wi.*8 )|(W8)", Qt::CaseInsensitive), "Windows8" },73 { QRegExp("(Wi.*8.*32)|(W8.*32)", Qt::CaseInsensitive), "Windows8" }, 71 74 { QRegExp("Wi.*3", Qt::CaseInsensitive), "Windows31" }, 72 { QRegExp("Wi", Qt::CaseInsensitive), "WindowsXP" }, 75 { QRegExp("Wi.*64", Qt::CaseInsensitive), "WindowsXP_64" }, 76 { QRegExp("Wi.*32", Qt::CaseInsensitive), "WindowsXP" }, 73 77 74 78 /* Solaris: */ 75 79 { QRegExp("So.*11", Qt::CaseInsensitive), "Solaris11_64" }, 76 80 { QRegExp("((Op.*So)|(os20[01][0-9])|(So.*10)|(India)|(Neva)).*64", Qt::CaseInsensitive), "OpenSolaris_64" }, 77 { QRegExp("( Op.*So)|(os20[01][0-9])|(So.*10)|(India)|(Neva)", Qt::CaseInsensitive), "OpenSolaris" },81 { QRegExp("((Op.*So)|(os20[01][0-9])|(So.*10)|(India)|(Neva)).*32", Qt::CaseInsensitive), "OpenSolaris" }, 78 82 { QRegExp("So.*64", Qt::CaseInsensitive), "Solaris_64" }, 79 { QRegExp("So ", Qt::CaseInsensitive), "Solaris" },83 { QRegExp("So.*32", Qt::CaseInsensitive), "Solaris" }, 80 84 81 85 /* OS/2: */ … … 91 95 /* Mac OS X: must come before Ubuntu/Maverick and before Linux */ 92 96 { QRegExp("((mac.*10[.,]{0,1}4)|(os.*x.*10[.,]{0,1}4)|(mac.*ti)|(os.*x.*ti)|(Tig)).64", Qt::CaseInsensitive), "MacOS_64" }, 93 { QRegExp( "(mac.*10[.,]{0,1}4)|(os.*x.*10[.,]{0,1}4)|(mac.*ti)|(os.*x.*ti)|(Tig)",Qt::CaseInsensitive), "MacOS" },97 { QRegExp("((mac.*10[.,]{0,1}4)|(os.*x.*10[.,]{0,1}4)|(mac.*ti)|(os.*x.*ti)|(Tig)).32", Qt::CaseInsensitive), "MacOS" }, 94 98 { QRegExp("((mac.*10[.,]{0,1}5)|(os.*x.*10[.,]{0,1}5)|(mac.*leo)|(os.*x.*leo)|(Leop)).*64", Qt::CaseInsensitive), "MacOS_64" }, 95 { QRegExp( "(mac.*10[.,]{0,1}5)|(os.*x.*10[.,]{0,1}5)|(mac.*leo)|(os.*x.*leo)|(Leop)",Qt::CaseInsensitive), "MacOS" },99 { QRegExp("((mac.*10[.,]{0,1}5)|(os.*x.*10[.,]{0,1}5)|(mac.*leo)|(os.*x.*leo)|(Leop)).*32", Qt::CaseInsensitive), "MacOS" }, 96 100 { QRegExp("((mac.*10[.,]{0,1}6)|(os.*x.*10[.,]{0,1}6)|(mac.*SL)|(os.*x.*SL)|(Snow L)).*64", Qt::CaseInsensitive), "MacOS106_64" }, 97 { QRegExp( "(mac.*10[.,]{0,1}6)|(os.*x.*10[.,]{0,1}6)|(mac.*SL)|(os.*x.*SL)|(Snow L)",Qt::CaseInsensitive), "MacOS106" },101 { QRegExp("((mac.*10[.,]{0,1}6)|(os.*x.*10[.,]{0,1}6)|(mac.*SL)|(os.*x.*SL)|(Snow L)).*32", Qt::CaseInsensitive), "MacOS106" }, 98 102 { QRegExp( "(mac.*10[.,]{0,1}7)|(os.*x.*10[.,]{0,1}7)|(mac.*ML)|(os.*x.*ML)|(Mount)", Qt::CaseInsensitive), "MacOS108_64" }, 99 103 { QRegExp( "(mac.*10[.,]{0,1}8)|(os.*x.*10[.,]{0,1}8)|(Lion)", Qt::CaseInsensitive), "MacOS107_64" }, 100 104 { QRegExp( "(mac.*10[.,]{0,1}9)|(os.*x.*10[.,]{0,1}9)|(mac.*mav)|(os.*x.*mav)|(Mavericks)", Qt::CaseInsensitive), "MacOS109_64" }, 101 105 { QRegExp("((Mac)|(Tig)|(Leop)|(os[ ]*x)).*64", Qt::CaseInsensitive), "MacOS_64" }, 102 { QRegExp("( Mac)|(Tig)|(Leop)|(os[ ]*x)", Qt::CaseInsensitive), "MacOS" },106 { QRegExp("((Mac)|(Tig)|(Leop)|(os[ ]*x)).*32", Qt::CaseInsensitive), "MacOS" }, 103 107 104 108 /* Code names for Linux distributions: */ 105 109 { QRegExp("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)|(quantal)|(raring)).*64", Qt::CaseInsensitive), "Ubuntu_64" }, 106 { QRegExp("( edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)|(quantal)|(raring)", Qt::CaseInsensitive), "Ubuntu" },110 { QRegExp("((edgy)|(feisty)|(gutsy)|(hardy)|(intrepid)|(jaunty)|(karmic)|(lucid)|(maverick)|(natty)|(oneiric)|(precise)|(quantal)|(raring)).*32", Qt::CaseInsensitive), "Ubuntu" }, 107 111 { QRegExp("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(jessie)|(sid)).*64", Qt::CaseInsensitive), "Debian_64" }, 108 { QRegExp("( sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(jessie)|(sid)", Qt::CaseInsensitive), "Debian" },112 { QRegExp("((sarge)|(etch)|(lenny)|(squeeze)|(wheezy)|(jessie)|(sid)).*32", Qt::CaseInsensitive), "Debian" }, 109 113 { QRegExp("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)|(beefy)|(spherical)).*64", Qt::CaseInsensitive), "Fedora_64" }, 110 { QRegExp("( moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)|(beefy)|(spherical)", Qt::CaseInsensitive), "Fedora" },114 { QRegExp("((moonshine)|(werewolf)|(sulphur)|(cambridge)|(leonidas)|(constantine)|(goddard)|(laughlin)|(lovelock)|(verne)|(beefy)|(spherical)).*32", Qt::CaseInsensitive), "Fedora" }, 111 115 112 116 /* Regular names of Linux distributions: */ 113 117 { QRegExp("Arc.*64", Qt::CaseInsensitive), "ArchLinux_64" }, 114 { QRegExp("Arc ", Qt::CaseInsensitive), "ArchLinux" },118 { QRegExp("Arc.*32", Qt::CaseInsensitive), "ArchLinux" }, 115 119 { QRegExp("Deb.*64", Qt::CaseInsensitive), "Debian_64" }, 116 { QRegExp("Deb ", Qt::CaseInsensitive), "Debian" },120 { QRegExp("Deb.*32", Qt::CaseInsensitive), "Debian" }, 117 121 { QRegExp("((SU)|(Nov)|(SLE)).*64", Qt::CaseInsensitive), "OpenSUSE_64" }, 118 { QRegExp("( SU)|(Nov)|(SLE)", Qt::CaseInsensitive), "OpenSUSE" },122 { QRegExp("((SU)|(Nov)|(SLE)).*32", Qt::CaseInsensitive), "OpenSUSE" }, 119 123 { QRegExp("Fe.*64", Qt::CaseInsensitive), "Fedora_64" }, 120 { QRegExp("Fe ", Qt::CaseInsensitive), "Fedora" },124 { QRegExp("Fe.*32", Qt::CaseInsensitive), "Fedora" }, 121 125 { QRegExp("((Gen)|(Sab)).*64", Qt::CaseInsensitive), "Gentoo_64" }, 122 { QRegExp("( Gen)|(Sab)", Qt::CaseInsensitive), "Gentoo" },126 { QRegExp("((Gen)|(Sab)).*32", Qt::CaseInsensitive), "Gentoo" }, 123 127 { QRegExp("((Man)|(Mag)).*64", Qt::CaseInsensitive), "Mandriva_64" }, 124 { QRegExp("((Man)|(Mag)) ", Qt::CaseInsensitive), "Mandriva" },128 { QRegExp("((Man)|(Mag)).*32", Qt::CaseInsensitive), "Mandriva" }, 125 129 { QRegExp("((Red)|(rhel)|(cen)).*64", Qt::CaseInsensitive), "RedHat_64" }, 126 { QRegExp("( Red)|(rhel)|(cen)", Qt::CaseInsensitive), "RedHat" },130 { QRegExp("((Red)|(rhel)|(cen)).*32", Qt::CaseInsensitive), "RedHat" }, 127 131 { QRegExp("Tur.*64", Qt::CaseInsensitive), "Turbolinux_64" }, 128 { QRegExp("Tur ", Qt::CaseInsensitive), "Turbolinux" },132 { QRegExp("Tur.*32", Qt::CaseInsensitive), "Turbolinux" }, 129 133 { QRegExp("Ub.*64", Qt::CaseInsensitive), "Ubuntu_64" }, 130 { QRegExp("Ub ", Qt::CaseInsensitive), "Ubuntu" },134 { QRegExp("Ub.*32", Qt::CaseInsensitive), "Ubuntu" }, 131 135 { QRegExp("Xa.*64", Qt::CaseInsensitive), "Xandros_64" }, 132 { QRegExp("Xa ", Qt::CaseInsensitive), "Xandros" },136 { QRegExp("Xa.*32", Qt::CaseInsensitive), "Xandros" }, 133 137 { QRegExp("((Or)|(oel)).*64", Qt::CaseInsensitive), "Oracle_64" }, 134 { QRegExp("( Or)|(oel)", Qt::CaseInsensitive), "Oracle" },138 { QRegExp("((Or)|(oel)).*32", Qt::CaseInsensitive), "Oracle" }, 135 139 { QRegExp("Knoppix", Qt::CaseInsensitive), "Linux26" }, 136 140 { QRegExp("Dsl", Qt::CaseInsensitive), "Linux24" }, 137 141 { QRegExp("((Lin)|(lnx)).*2.?2", Qt::CaseInsensitive), "Linux22" }, 138 142 { QRegExp("((Lin)|(lnx)).*2.?4.*64", Qt::CaseInsensitive), "Linux24_64" }, 139 { QRegExp("((Lin)|(lnx)).*2.?4 ", Qt::CaseInsensitive), "Linux24" },143 { QRegExp("((Lin)|(lnx)).*2.?4.*32", Qt::CaseInsensitive), "Linux24" }, 140 144 { QRegExp("((((Lin)|(lnx)).*2.?6)|(LFS)).*64", Qt::CaseInsensitive), "Linux26_64" }, 141 { QRegExp("((( Lin)|(lnx)).*2.?6)|(LFS)", Qt::CaseInsensitive), "Linux26" },145 { QRegExp("((((Lin)|(lnx)).*2.?6)|(LFS)).*32", Qt::CaseInsensitive), "Linux26" }, 142 146 { QRegExp("((Lin)|(lnx)).*64", Qt::CaseInsensitive), "Linux26_64" }, 143 { QRegExp("( Lin)|(lnx)", Qt::CaseInsensitive), "Linux26" },147 { QRegExp("((Lin)|(lnx)).*32", Qt::CaseInsensitive), "Linux26" }, 144 148 145 149 /* Other: */ 146 150 { QRegExp("L4", Qt::CaseInsensitive), "L4" }, 147 151 { QRegExp("((Fr.*B)|(fbsd)).*64", Qt::CaseInsensitive), "FreeBSD_64" }, 148 { QRegExp("( Fr.*B)|(fbsd)", Qt::CaseInsensitive), "FreeBSD" },152 { QRegExp("((Fr.*B)|(fbsd)).*32", Qt::CaseInsensitive), "FreeBSD" }, 149 153 { QRegExp("Op.*B.*64", Qt::CaseInsensitive), "OpenBSD_64" }, 150 { QRegExp("Op.*B ", Qt::CaseInsensitive), "OpenBSD" },154 { QRegExp("Op.*B.*32", Qt::CaseInsensitive), "OpenBSD" }, 151 155 { QRegExp("Ne.*B.*64", Qt::CaseInsensitive), "NetBSD_64" }, 152 { QRegExp("Ne.*B ", Qt::CaseInsensitive), "NetBSD" },156 { QRegExp("Ne.*B.*32", Qt::CaseInsensitive), "NetBSD" }, 153 157 { QRegExp("Net", Qt::CaseInsensitive), "Netware" }, 154 158 { QRegExp("Rocki", Qt::CaseInsensitive), "JRockitVE" }, … … 161 165 } 162 166 163 void UIWizardNewVMPage1::onNameChanged(const QString &strNewName) 164 { 167 void UIWizardNewVMPage1::onNameChanged(QString strNewName) 168 { 169 /* Do not forget about achitecture bits: */ 170 strNewName += QString::number(ARCH_BITS); 171 165 172 /* Search for a matching OS type based on the string the user typed already. */ 166 173 for (size_t i = 0; i < RT_ELEMENTS(gs_OSTypePattern); ++i) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
r42616 r50253 36 36 37 37 /* Handlers: */ 38 void onNameChanged( const QString &strNewName);38 void onNameChanged(QString strNewName); 39 39 void onOsTypeChanged(); 40 40
Note:
See TracChangeset
for help on using the changeset viewer.