Commit d8136a05 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

In Qt6 QDomDocument does not open the file itself any more

parent a11037a0
Pipeline #54688 passed with stage
in 13 minutes and 59 seconds
......@@ -57,6 +57,11 @@ QString FilterClawsMail::localMailDirPath()
QString errorMsg;
int errorRow;
int errorCol;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (!folderListFile.open(QIODevice::ReadOnly)) {
qCWarning(MAILIMPORTER_LOG) << "Impossible to open " << folderListFile.fileName();
}
#endif
if (!doc.setContent(&folderListFile, &errorMsg, &errorRow, &errorCol)) {
qCDebug(MAILIMPORTER_LOG) << "Unable to load document.Parse error in line " << errorRow << ", col " << errorCol << ": " << errorMsg;
return QString();
......
......@@ -65,6 +65,11 @@ QString FilterSylpheed::localMailDirPath()
QString errorMsg;
int errorRow;
int errorCol;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (!folderListFile.open(QIODevice::ReadOnly)) {
qCWarning(MAILIMPORTER_LOG) << "Impossible to open " << folderListFile.fileName();
}
#endif
if (!doc.setContent(&folderListFile, &errorMsg, &errorRow, &errorCol)) {
qCDebug(MAILIMPORTER_LOG) << "Unable to load document.Parse error in line " << errorRow << ", col " << errorCol << ": " << errorMsg;
return QString();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment