summaryrefslogtreecommitdiffstats
path: root/pokemodr/PokeModrUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemodr/PokeModrUI.cpp')
-rw-r--r--pokemodr/PokeModrUI.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/pokemodr/PokeModrUI.cpp b/pokemodr/PokeModrUI.cpp
index 6db54597..bfe9c1a9 100644
--- a/pokemodr/PokeModrUI.cpp
+++ b/pokemodr/PokeModrUI.cpp
@@ -249,6 +249,7 @@ bool PokeModrUI::savePokemod(const KUrl& url)
{
file.write(Object::xml(pokemod).toByteArray());
file.close();
+ return true;
}
else
KMessageBox::error(this, QString::fromUtf8("Error saving the PokéMod!"), "Save error");
@@ -259,12 +260,15 @@ bool PokeModrUI::savePokemod(const KUrl& url)
if (temp.open())
{
temp.write(Object::xml(pokemod).toByteArray());
- if (!KIO::NetAccess::upload(temp.fileName(), url, this))
+ if (KIO::NetAccess::upload(temp.fileName(), url, this))
+ return true;
+ else
KMessageBox::error(this, KIO::NetAccess::lastErrorString(), "KIO Error");
}
else
KMessageBox::error(this, QString::fromUtf8("Error saving the PokéMod!"), "Save error");
}
+ return false;
}
void PokeModrUI::closePokeMod()