Commit b7737678 authored by Volker Krause's avatar Volker Krause
Browse files

Read text input files in text mode

Should improve results on Windows.
parent 2b3a9ce7
Pipeline #236365 passed with stage
in 5 minutes and 7 seconds
......@@ -72,7 +72,8 @@ private Q_SLOTS:
QFETCH(QString, refFile);
QFile in(inputFile);
QVERIFY(in.open(QFile::ReadOnly));
const auto openFlags = inputFile.endsWith(QLatin1String(".txt")) ? QFile::Text : QFile::ReadOnly;
QVERIFY(in.open(QFile::ReadOnly | openFlags));
ExtractorEngine engine;
auto root = engine.documentNodeFactory()->createNode(in.readAll(), inputFile);
......
......@@ -86,7 +86,8 @@ private Q_SLOTS:
m_engine.setHints(inputFile.endsWith(QLatin1String(".png")) ? ExtractorEngine::ExtractFullPageRasterImages : ExtractorEngine::NoHint);
QFile inFile(inputFile);
QVERIFY(inFile.open(QFile::ReadOnly));
const auto openFlags = inputFile.endsWith(QLatin1String(".txt")) ? QFile::Text : QFile::ReadOnly;
QVERIFY(inFile.open(QFile::ReadOnly | openFlags));
QFile cf(contextFile);
KMime::Message contextMsg;
......
Supports Markdown
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