Quick and dirty port to Qt5
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user