- Timestamp:
- Aug 2, 2007 3:40:37 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSnapshotsWgt.ui
r3355 r4009 272 272 <include location="global" impldecl="in implementation">qtooltip.h</include> 273 273 <include location="global" impldecl="in implementation">qmetaobject.h</include> 274 <include location="global" impldecl="in implementation">qregexp.h</include> 274 275 <include location="local" impldecl="in declaration">COMDefs.h</include> 275 276 <include location="local" impldecl="in implementation">VBoxUtils.h</include> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSnapshotsWgt.ui.h
r4008 r4009 583 583 dlg.pmIcon->setPixmap (vboxGlobal().vmGuestOSTypeIcon (typeId)); 584 584 585 dlg.leName->setText (tr ("Snapshot %1").arg (mMachine.GetSnapshotCount() + 1)); 585 /* search for the max available filter index */ 586 int maxSnapShotIndex = 0; 587 QString snapShotName = tr ("Snapshot %1"); 588 QRegExp regExp (QString ("^") + snapShotName.arg ("([0-9]+)") + QString ("$")); 589 QListViewItemIterator iterator (listView); 590 while (*iterator) 591 { 592 QString snapShot = (*iterator)->text (0); 593 int pos = regExp.search (snapShot); 594 if (pos != -1) 595 maxSnapShotIndex = regExp.cap (1).toInt() > maxSnapShotIndex ? 596 regExp.cap (1).toInt() : maxSnapShotIndex; 597 ++ iterator; 598 } 599 dlg.leName->setText (snapShotName.arg (maxSnapShotIndex + 1)); 586 600 587 601 if (dlg.exec() == QDialog::Accepted)
Note:
See TracChangeset
for help on using the changeset viewer.