- Timestamp:
- Oct 25, 2021 2:22:18 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r92037 r92038 176 176 bool UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName) 177 177 { 178 CHost host = uiCommon().host();179 bool fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx);180 bool fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode);181 182 178 /* Append default architecture bit-count (64/32) if not already in the name: */ 183 179 if (!strNewName.contains("32") && !strNewName.contains("64")) 180 { 181 /** @todo cache this result, no need to re-query it for each keystroke... */ 182 CHost host = uiCommon().host(); 183 bool fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx); 184 bool fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode); 184 185 strNewName += ARCH_BITS == 64 && fSupportsHWVirtEx && fSupportsLongMode ? "64" : "32"; 186 } 185 187 186 188 /* Search for a matching OS type based on the string the user typed already. */
Note:
See TracChangeset
for help on using the changeset viewer.