Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
b7737678
Commit
b7737678
authored
Sep 24, 2022
by
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
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
autotests/extractorscriptenginetest.cpp
View file @
b7737678
...
...
@@ -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
);
...
...
autotests/extractortest.cpp
View file @
b7737678
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment