Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
07bc3977
Commit
07bc3977
authored
Aug 13, 2021
by
Friedrich W. H. Kossebau
Committed by
Laurent Montel
Aug 14, 2021
Browse files
Fix MainTextJobTest::testHtmlWithImages
parent
df0ec579
Pipeline
#74733
passed with stage
in 24 minutes and 48 seconds
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
messagecomposer/autotests/maintextjobtest.cpp
View file @
07bc3977
...
...
@@ -234,12 +234,6 @@ void MainTextJobTest::testHtmlWithImages()
editor
.
composerControler
()
->
composerImages
()
->
addImage
(
QUrl
::
fromLocalFile
(
image1Path
));
editor
.
composerControler
()
->
composerImages
()
->
addImage
(
QUrl
::
fromLocalFile
(
image2Path
));
editor
.
composerControler
()
->
composerImages
()
->
addImage
(
QUrl
::
fromLocalFile
(
image2Path
));
KPIMTextEdit
::
ImageList
images
=
editor
.
composerControler
()
->
composerImages
()
->
embeddedImages
();
QCOMPARE
(
images
.
count
(),
2
);
QString
cid1
=
images
[
0
]
->
contentID
;
QString
cid2
=
images
[
1
]
->
contentID
;
QString
name1
=
images
[
0
]
->
imageName
;
QString
name2
=
images
[
1
]
->
imageName
;
auto
composer
=
new
Composer
;
composer
->
globalPart
()
->
setGuiEnabled
(
false
);
...
...
@@ -248,7 +242,14 @@ void MainTextJobTest::testHtmlWithImages()
textPart
->
setWordWrappingEnabled
(
false
);
textPart
->
setCleanPlainText
(
editor
.
composerControler
()
->
toCleanPlainText
());
textPart
->
setCleanHtml
(
editor
.
composerControler
()
->
toCleanHtml
());
textPart
->
setEmbeddedImages
(
editor
.
composerControler
()
->
composerImages
()
->
embeddedImages
());
// only get once, are regenerated on call with new contentID each time
const
KPIMTextEdit
::
ImageList
images
=
editor
.
composerControler
()
->
composerImages
()
->
embeddedImages
();
QCOMPARE
(
images
.
count
(),
2
);
const
QString
cid1
=
images
[
0
]
->
contentID
;
const
QString
cid2
=
images
[
1
]
->
contentID
;
const
QString
name1
=
images
[
0
]
->
imageName
;
const
QString
name2
=
images
[
1
]
->
imageName
;
textPart
->
setEmbeddedImages
(
images
);
auto
mjob
=
new
MainTextJob
(
textPart
,
composer
);
QVERIFY
(
mjob
->
exec
());
Content
*
result
=
mjob
->
content
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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