- Timestamp:
- Jun 6, 2008 6:01:47 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 31762
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxMediaComboBox.h
r9480 r9496 45 45 void setUseEmptyItem (bool); 46 46 void setBelongsTo (const QUuid &); 47 QUuid getId (int aId = -1) ;47 QUuid getId (int aId = -1) const; 48 48 QUuid getBelongsTo(); 49 49 void setCurrentItem (const QUuid &); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxMediaComboBox.cpp
r9480 r9496 249 249 } 250 250 251 QUuid VBoxMediaComboBox::getId (int aId) 251 QUuid VBoxMediaComboBox::getId (int aId) const 252 252 { 253 253 return mUuidList.isEmpty() ? QUuid() : … … 263 263 int currentInd = currentIndex(); 264 264 265 int insertPosition = -1;265 int insertPosition = count(); 266 266 for (int i = 0; i < count(); ++ i) 267 267 /* Searching for the first real (non-null) vdi item … … 275 275 } 276 276 277 insertPosition == -1? mUuidList.append (aId) :277 insertPosition == count() ? mUuidList.append (aId) : 278 278 mUuidList.insert (insertPosition, aId); 279 279 280 insertPosition == -1? mTipList.append (aTip) :280 insertPosition == count() ? mTipList.append (aTip) : 281 281 mTipList.insert (insertPosition, aTip); 282 282 … … 284 284 insertItem (insertPosition, aName); 285 285 286 if (insertPosition != -1&& currentInd >= insertPosition)286 if (insertPosition != count() && currentInd >= insertPosition) 287 287 QComboBox::setCurrentIndex (currentInd + 1); 288 288 }
Note:
See TracChangeset
for help on using the changeset viewer.