mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-06-19 21:41:39 +00:00
when loading a file fails, pop-up critical window and highlight error text
This commit is contained in:
parent
82ef145e79
commit
ce7cef924e
1 changed files with 6 additions and 2 deletions
|
@ -8,6 +8,8 @@
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
#include "../../model/doc/document.hpp"
|
#include "../../model/doc/document.hpp"
|
||||||
|
|
||||||
|
@ -104,8 +106,10 @@ void CSVDoc::LoadingDocument::nextRecord (int records)
|
||||||
void CSVDoc::LoadingDocument::abort (const std::string& error)
|
void CSVDoc::LoadingDocument::abort (const std::string& error)
|
||||||
{
|
{
|
||||||
mAborted = true;
|
mAborted = true;
|
||||||
mError->setText (QString::fromUtf8 (("Loading failed: " + error).c_str()));
|
mError->setText (QString::fromUtf8 (("<font color=red>Loading failed: " + error + "</font>").c_str()));
|
||||||
mButtons->setStandardButtons (QDialogButtonBox::Close);
|
mButtons->setStandardButtons (QDialogButtonBox::Close);
|
||||||
|
QMessageBox::critical(this, tr("OpenCS Loading Failed"),
|
||||||
|
QString::fromUtf8 (("Loading failed:\n" + error).c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVDoc::LoadingDocument::addMessage (const std::string& message)
|
void CSVDoc::LoadingDocument::addMessage (const std::string& message)
|
||||||
|
|
Loading…
Reference in a new issue