mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 12:09:43 +00:00
use QMessageBox to show errors
This commit is contained in:
parent
89dee80dcf
commit
c97fac8116
1 changed files with 18 additions and 3 deletions
|
@ -157,7 +157,12 @@ bool GraphicsPage::setupSDL()
|
||||||
|
|
||||||
if (displays < 0)
|
if (displays < 0)
|
||||||
{
|
{
|
||||||
qDebug() << "SDL_GetNumVideoDisplays failed: " << QString::fromStdString(SDL_GetError());
|
QMessageBox msgBox;
|
||||||
|
msgBox.setWindowTitle(tr("Error receiving number of screens"));
|
||||||
|
msgBox.setIcon(QMessageBox::Critical);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setText(tr("<br><b>SDL_GetNumDisplayModes failed:</b><br><br>") + QString::fromStdString(SDL_GetError()) + "<br>");
|
||||||
|
msgBox.exec();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +286,12 @@ QStringList GraphicsPage::getAvailableResolutions(int screen)
|
||||||
|
|
||||||
if (modes < 0)
|
if (modes < 0)
|
||||||
{
|
{
|
||||||
qDebug() << "SDL_GetNumDisplayModes failed: " << QString::fromStdString(SDL_GetError());
|
QMessageBox msgBox;
|
||||||
|
msgBox.setWindowTitle(tr("Error receiving resolutions"));
|
||||||
|
msgBox.setIcon(QMessageBox::Critical);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setText(tr("<br><b>SDL_GetNumDisplayModes failed:</b><br><br>") + QString::fromStdString(SDL_GetError()) + "<br>");
|
||||||
|
msgBox.exec();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +299,12 @@ QStringList GraphicsPage::getAvailableResolutions(int screen)
|
||||||
{
|
{
|
||||||
if (SDL_GetDisplayMode(screen, modeIndex, &mode) < 0)
|
if (SDL_GetDisplayMode(screen, modeIndex, &mode) < 0)
|
||||||
{
|
{
|
||||||
qDebug() << "SDL_GetDisplayMode failed: " << QString::fromStdString(SDL_GetError());
|
QMessageBox msgBox;
|
||||||
|
msgBox.setWindowTitle(tr("Error receiving resolutions"));
|
||||||
|
msgBox.setIcon(QMessageBox::Critical);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setText(tr("<br><b>SDL_GetDisplayMode failed:</b><br><br>") + QString::fromStdString(SDL_GetError()) + "<br>");
|
||||||
|
msgBox.exec();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue