VirtualBox

Changeset 27462 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 17, 2010 8:31:05 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New running VM core: early start error processing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r27374 r27462  
    2525#include <QApplication>
    2626#include <QWidget>
     27#include <QTimer>
    2728
    2829/* Local includes */
     
    604605                         console.PowerUpPaused() : console.PowerUp();
    605606
    606 #if 0 // TODO: Check immediate failure!
    607     /* Check for an immediate failure: */
     607    /* Check for immediate failure: */
    608608    if (!console.isOk())
    609609    {
    610         vboxProblem().cannotStartMachine(console);
    611         machineWindowWrapper()->machineWindow()->close();
     610        if (vboxGlobal().showStartVMErrors())
     611            vboxProblem().cannotStartMachine(console);
     612        QTimer::singleShot(0, this, SLOT(sltCloseVirtualSession()));
    612613        return;
    613614    }
    614 
    615     /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */
    616     setPreventAutoClose(true);
    617 #endif
    618615
    619616    /* Show "Starting/Restoring" progress dialog: */
     
    623620        vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow());
    624621
    625 #if 0 // TODO: Check immediate failure!
    626     /* Check for an progress failure */
     622    /* Check for a progress failure: */
    627623    if (progress.GetResultCode() != 0)
    628624    {
    629         vboxProblem().cannotStartMachine(progress);
    630         machineWindowWrapper()->machineWindow()->close();
     625        if (vboxGlobal().showStartVMErrors())
     626            vboxProblem().cannotStartMachine(progress);
     627        QTimer::singleShot(0, this, SLOT(sltCloseVirtualSession()));
    631628        return;
    632629    }
    633630
    634     /* Enable auto-closure again: */
    635     setPreventAutoClose(false);
    636 
    637631    /* Check if we missed a really quick termination after successful startup, and process it if we did: */
    638     if (uisession()->isTurnedOff())
    639     {
    640         machineWindowWrapper()->machineWindow()->close();
     632    if (isTurnedOff())
     633    {
     634        QTimer::singleShot(0, this, SLOT(sltCloseVirtualSession()));
    641635        return;
    642636    }
    643 #endif
    644637
    645638#if 0 // TODO: Rework debugger logic!
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette