VirtualBox

Ignore:
Timestamp:
Sep 30, 2015 12:28:29 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Main.cpp: Do not use QIMessageBox before VBoxGobal get initialized to prevent crash.

File:
1 edited

Legend:

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

    r57953 r57964  
    2828# include "UISelectorWindow.h"
    2929# include "UIModalWindowManager.h"
    30 # ifdef VBOX_WITH_HARDENING
    31 #  include "QIMessageBox.h"
    32 # endif /* VBOX_WITH_HARDENING */
    3330# ifdef Q_WS_MAC
    3431#  include "VBoxUtils.h"
     
    700697    }
    701698
    702     strText += "</html>";
    703 
    704 
    705699# ifdef Q_WS_X11
    706700    /* We have to to make sure that we display the error-message
     
    709703# endif /* Q_WS_X11 */
    710704
    711     /*
    712      * Create the message box and show it.
    713      */
    714     QString strTitle = QApplication::tr("VirtualBox - Error In %1").arg(pszWhere);
    715     QIMessageBox msgBox(strTitle, strText, AlertIconType_Critical, AlertButton_Ok | AlertButtonOption_Default);
     705    /* Update strText with strDetails: */
    716706    if (!strDetails.isEmpty())
    717         msgBox.setDetailsText(strDetails);
    718 
    719     msgBox.exec();
     707        strText += QString("<br><br>%1").arg(strDetails);
     708
     709    /* Close the <html> scope: */
     710    strText += "</html>";
     711
     712    /* Create and show the error message-box: */
     713    QMessageBox::critical(0, QApplication::tr("VirtualBox - Error In %1").arg(pszWhere), strText);
    720714
    721715    qFatal("%s", strText.toUtf8().constData());
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