mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Use one QMessageBox for both Win and *nix
Create one QMessageBox object to use for both Windows and non-Windows platforms. Additionally, set all relevant text during creation of QMessageBox, and show Warning icon as part of message box.
This commit is contained in:
parent
57c269e6de
commit
16a32262ac
@ -163,20 +163,23 @@ void CMainDialog::launch()
|
||||
if (m_modified) {
|
||||
currentConfigApp->WriteRegisterSettings();
|
||||
}
|
||||
|
||||
QDir::setCurrent(QCoreApplication::applicationDirPath());
|
||||
|
||||
QMessageBox msgBox = QMessageBox(
|
||||
QMessageBox::Warning,
|
||||
QString("Error!"),
|
||||
QString("Unable to locate isle executable!"),
|
||||
QMessageBox::Close
|
||||
);
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!QProcess::startDetached("./isle.exe")) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Unable to locate isle executable!");
|
||||
msgBox.setWindowTitle("Error");
|
||||
msgBox.exec();
|
||||
}
|
||||
#else
|
||||
if (!QProcess::startDetached("./isle")) { // Check in isle-config directory
|
||||
if (!QProcess::startDetached("isle")) { // Check in $PATH
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Unable to locate isle executable!");
|
||||
msgBox.setWindowTitle("Error");
|
||||
msgBox.exec();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user