Quick and dirty port to Qt5

This commit is contained in:
2017-10-15 11:36:27 +02:00
parent 7b6d0bb870
commit 2b664c3b4f
24 changed files with 202 additions and 145 deletions

View File

@@ -180,9 +180,10 @@ bool GrisbiImportEngine::HandleFile(const QString& path, User* user, Database* d
if (!ImportEngine::HandleFile(path, user, db, kiss)) return false;
QXmlInputSource *source = new QXmlInputSource(&file);
try
{
res = _sax.parse(&file);
res = _sax.parse(source, false);
LinkChilds();
}
catch (const char* s)
@@ -192,6 +193,7 @@ bool GrisbiImportEngine::HandleFile(const QString& path, User* user, Database* d
}
file.close();
delete source;
return res;
}

View File

@@ -51,9 +51,11 @@ bool XMLImportEngine::HandleFile(const QString& path, User* user, Database* db,
return false;
}
QXmlInputSource *source = new QXmlInputSource(&file);
try
{
res = _sax.parse(&file);
res = _sax.parse(source, false);
LinkChilds();
}
catch (const char* s)
@@ -63,6 +65,7 @@ bool XMLImportEngine::HandleFile(const QString& path, User* user, Database* db,
}
file.close();
delete source;
return res;
}