Changeset 36922 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 3, 2011 7:15:23 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r36589 r36922 2036 2036 QModelIndex rootIndex = mStorageModel->root(); 2037 2037 QMap <QString, QString> config; 2038 QMap<int, QString> names; 2039 /* For each controller: */ 2038 2040 for (int i = 0; i < mStorageModel->rowCount (rootIndex); ++ i) 2039 2041 { 2040 2042 QModelIndex ctrIndex = rootIndex.child (i, 0); 2041 2043 QString ctrName = mStorageModel->data (ctrIndex, StorageModel::R_CtrName).toString(); 2044 /* Check for name emptiness: */ 2045 if (ctrName.isEmpty()) 2046 { 2047 aWarning = tr("no name specified for controller at position <b>%1</b>.").arg(i + 1); 2048 return aWarning.isNull(); 2049 } 2050 /* Check for name coincidence: */ 2051 if (names.values().contains(ctrName)) 2052 { 2053 aWarning = tr("controller at position <b>%1</b> uses the name that is " 2054 "already used by controller at position <b>%2</b>.") 2055 .arg(i + 1).arg(names.key(ctrName) + 1); 2056 return aWarning.isNull(); 2057 } 2058 else names.insert(i, ctrName); 2059 /* For each attachment: */ 2042 2060 for (int j = 0; j < mStorageModel->rowCount (ctrIndex); ++ j) 2043 2061 { … … 2050 2068 if (vboxGlobal().findMedium (key).isNull() && attDevice == KDeviceType_HardDisk) 2051 2069 { 2052 aWarning = tr (" No hard disk is selected for <i>%1</i>.").arg (value);2070 aWarning = tr ("no hard disk is selected for <i>%1</i>.").arg (value); 2053 2071 return aWarning.isNull(); 2054 2072 }
Note:
See TracChangeset
for help on using the changeset viewer.