diff --git a/src/format/KeePass2XmlWriter.cpp b/src/format/KeePass2XmlWriter.cpp index dda98011c..313607c24 100644 --- a/src/format/KeePass2XmlWriter.cpp +++ b/src/format/KeePass2XmlWriter.cpp @@ -57,6 +57,12 @@ void KeePass2XmlWriter::writeDatabase(QIODevice* device, Database* db, KeePass2R m_xml.writeEndElement(); m_xml.writeEndDocument(); + +#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0) + if (m_xml.hasError()) { + raiseError(device->errorString()); + } +#endif } void KeePass2XmlWriter::writeDatabase(const QString& filename, Database* db)