- Timestamp:
- Oct 8, 2014 12:40:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r52978 r52993 495 495 * We must close Runtime UI: */ 496 496 uisession()->closeRuntimeUI(); 497 return; 497 498 } 498 499 break; … … 1324 1325 bool fDialogAccepted = pDlg->exec() == QDialog::Accepted; 1325 1326 1326 /* Is the dialog still valid? */ 1327 if (pDlg) 1328 { 1329 /* Acquire variables: */ 1330 QString strSnapshotName = pDlg->mLeName->text().trimmed(); 1331 QString strSnapshotDescription = pDlg->mTeDescription->toPlainText(); 1332 1333 /* Destroy dialog early: */ 1334 delete pDlg; 1335 1336 /* Was the dialog accepted? */ 1337 if (fDialogAccepted) 1327 /* Make sure dialog still valid: */ 1328 if (!pDlg) 1329 return; 1330 1331 /* Acquire variables: */ 1332 QString strSnapshotName = pDlg->mLeName->text().trimmed(); 1333 QString strSnapshotDescription = pDlg->mTeDescription->toPlainText(); 1334 1335 /* Destroy dialog early: */ 1336 delete pDlg; 1337 1338 /* Was the dialog accepted? */ 1339 if (fDialogAccepted) 1340 { 1341 /* Prepare the take-snapshot progress: */ 1342 CConsole console = session().GetConsole(); 1343 CProgress progress = console.TakeSnapshot(strSnapshotName, strSnapshotDescription); 1344 if (console.isOk()) 1338 1345 { 1339 /* Prepare the take-snapshot progress: */ 1340 CConsole console = session().GetConsole(); 1341 CProgress progress = console.TakeSnapshot(strSnapshotName, strSnapshotDescription); 1342 if (console.isOk()) 1343 { 1344 /* Show the take-snapshot progress: */ 1345 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_snapshot_create_90px.png"); 1346 if (!progress.isOk() || progress.GetResultCode() != 0) 1347 msgCenter().cannotTakeSnapshot(progress, machine.GetName()); 1348 } 1349 else 1350 msgCenter().cannotTakeSnapshot(console, machine.GetName()); 1346 /* Show the take-snapshot progress: */ 1347 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_snapshot_create_90px.png"); 1348 if (!progress.isOk() || progress.GetResultCode() != 0) 1349 msgCenter().cannotTakeSnapshot(progress, machine.GetName()); 1351 1350 } 1351 else 1352 msgCenter().cannotTakeSnapshot(console, machine.GetName()); 1352 1353 } 1353 1354
Note:
See TracChangeset
for help on using the changeset viewer.