summaryrefslogtreecommitdiffstats
path: root/sigmodr/SigmodrUI.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-03-30 00:18:58 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-03-30 00:18:58 -0400
commitdcbe9e1a1db1a08c303d8b3fa7076de507087848 (patch)
tree61ffa7849bda380aed3367e73198b63a9913fbf1 /sigmodr/SigmodrUI.cpp
parent21c6ce64d4bc3c60e487140d3eda1fe015774515 (diff)
downloadsigen-dcbe9e1a1db1a08c303d8b3fa7076de507087848.tar.gz
sigen-dcbe9e1a1db1a08c303d8b3fa7076de507087848.tar.xz
sigen-dcbe9e1a1db1a08c303d8b3fa7076de507087848.zip
Better error messages and check for Game, not Sigmod as the DOCTYPE
Diffstat (limited to 'sigmodr/SigmodrUI.cpp')
-rw-r--r--sigmodr/SigmodrUI.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sigmodr/SigmodrUI.cpp b/sigmodr/SigmodrUI.cpp
index eb13122d..e6b308c2 100644
--- a/sigmodr/SigmodrUI.cpp
+++ b/sigmodr/SigmodrUI.cpp
@@ -120,13 +120,13 @@ void SigmodrUI::dropEvent(QDropEvent* event)
int column;
if (xml.setContent(data->data("application/x-sigmod+xml"), &error, &line, &column))
{
- if (xml.doctype().name() == "Sigmod")
+ if (xml.doctype().name() == "Game")
{
treeSigmod->addGame(new Game(xml.documentElement()));
loaded = true;
}
else
- KMessageBox::error(this, "The file is not a Sigmod.", "Invalid Sigmod");
+ KMessageBox::error(this, QString("The file is not a Sigmod. The doctype was reported to be %1").arg(xml.doctype().name()), "Invalid Sigmod");
}
else
KMessageBox::error(this, QString("%1 at line %2, column %3").arg(error).arg(line).arg(column), "XML Error");
@@ -233,13 +233,13 @@ bool SigmodrUI::openGame(const QString& path, const bool isRemote)
int column;
if (xml.setContent(&file, &error, &line, &column))
{
- if (xml.doctype().name() == "Sigmod")
+ if (xml.doctype().name() == "Game")
{
treeSigmod->addGame(new Game(xml.documentElement()), isRemote ? KUrl() : KUrl(path));
return true;
}
else
- KMessageBox::error(this, "The file is not a Sigmod.", "Invalid Sigmod");
+ KMessageBox::error(this, QString("The file is not a Sigmod. The doctype was reported to be %1").arg(xml.doctype().name()), "Invalid Sigmod");
}
else
KMessageBox::error(this, QString("%1 at line %2, column %3").arg(error).arg(line).arg(column), "XML Error");