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
6bc45dca
Commit
6bc45dca
authored
Sep 28, 2021
by
Laurent Montel
😁
Browse files
fix shadow variables etc.
parent
2730222f
Pipeline
#83156
passed with stage
in 45 minutes and 8 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messagecomposer/autotests/cryptofunctions.cpp
View file @
6bc45dca
...
...
@@ -196,7 +196,6 @@ void ComposerTestUtil::verifySignatureAndEncryption(KMime::Content *content,
if
(
combined
)
{
QCOMPARE
(
nh
->
signatureState
(
resultMessage
.
data
()),
MimeTreeParser
::
KMMsgFullySigned
);
}
else
{
QVector
<
KMime
::
Content
*>
extra
=
nh
->
extraContents
(
resultMessage
.
data
());
QCOMPARE
(
extra
.
size
(),
1
);
QCOMPARE
(
nh
->
signatureState
(
extra
[
0
]),
MimeTreeParser
::
KMMsgFullySigned
);
}
...
...
messagecomposer/autotests/signencrypttest.cpp
View file @
6bc45dca
...
...
@@ -245,9 +245,9 @@ void SignEncryptTest::testProtectedHeaders()
{
QByteArray
plainText
;
auto
job
=
QGpgME
::
openpgp
()
->
decryptVerifyJob
();
auto
r
esult
=
job
->
exec
(
encPart
->
encodedBody
(),
plainText
);
auto
jobR
esult
=
job
->
exec
(
encPart
->
encodedBody
(),
plainText
);
auto
signature
=
r
esult
.
second
.
signatures
()[
0
];
auto
signature
=
jobR
esult
.
second
.
signatures
()[
0
];
QCOMPARE
(
signature
.
fingerprint
(),
"1BA323932B3FAA826132C79E8D9860C58F246DE6"
);
QCOMPARE
(
signature
.
status
().
code
(),
0
);
...
...
messagecomposer/src/composer-ng/richtextcomposersignatures.cpp
View file @
6bc45dca
...
...
@@ -146,7 +146,6 @@ bool RichTextComposerSignatures::replaceSignature(const KIdentityManagement::Sig
}
// Select the signature
QTextCursor
cursor
(
d
->
richTextComposer
->
document
());
cursor
.
setPosition
(
currentMatch
);
// If the new signature is completely empty, we also want to remove the
...
...
messagecomposer/src/helper/messagefactoryng.cpp
View file @
6bc45dca
...
...
@@ -550,7 +550,7 @@ MessageFactoryNG::createRedirect(const QString &toStr, const QString &ccStr, con
const
bool
fccIsDisabled
=
ident
.
disabledFcc
();
if
(
fccIsDisabled
)
{
auto
header
=
new
KMime
::
Headers
::
Generic
(
"X-KMail-FccDisabled"
);
header
=
new
KMime
::
Headers
::
Generic
(
"X-KMail-FccDisabled"
);
header
->
fromUnicodeString
(
QStringLiteral
(
"true"
),
"utf-8"
);
msg
->
setHeader
(
header
);
}
else
{
...
...
messagecomposer/src/job/savecontactpreferencejob.cpp
View file @
6bc45dca
...
...
@@ -91,8 +91,8 @@ void SaveContactPreferenceJob::slotSearchContact(KJob *job)
item
.
setPayload
<
KContacts
::
Addressee
>
(
contact
);
auto
j
ob
=
new
Akonadi
::
ItemModifyJob
(
item
);
connect
(
j
ob
,
&
Akonadi
::
ContactSearchJob
::
result
,
this
,
&
SaveContactPreferenceJob
::
slotModifyCreateItem
);
auto
itemModifyJ
ob
=
new
Akonadi
::
ItemModifyJob
(
item
);
connect
(
itemModifyJ
ob
,
&
Akonadi
::
ContactSearchJob
::
result
,
this
,
&
SaveContactPreferenceJob
::
slotModifyCreateItem
);
}
}
...
...
messagecomposer/src/snippet/convertsnippetvariablesjob.cpp
View file @
6bc45dca
...
...
@@ -274,9 +274,9 @@ QString ConvertSnippetVariablesJob::getLastNameFromEmail(const QString &address)
const
QStringList
lst
=
address
.
split
(
QStringLiteral
(
", "
));
QStringList
resultName
;
for
(
const
QString
&
str
:
lst
)
{
KMime
::
Types
::
Mailbox
a
ddress
;
a
ddress
.
fromUnicodeString
(
KEmailAddress
::
normalizeAddressesAndEncodeIdn
(
str
));
const
QString
lastName
=
TemplateParser
::
Util
::
getLastNameFromEmail
(
a
ddress
.
name
());
KMime
::
Types
::
Mailbox
newA
ddress
;
newA
ddress
.
fromUnicodeString
(
KEmailAddress
::
normalizeAddressesAndEncodeIdn
(
str
));
const
QString
lastName
=
TemplateParser
::
Util
::
getLastNameFromEmail
(
newA
ddress
.
name
());
if
(
!
lastName
.
isEmpty
())
{
resultName
<<
lastName
;
}
...
...
messagecore/src/utils/stringutil.cpp
View file @
6bc45dca
...
...
@@ -549,7 +549,7 @@ QString smartQuote(const QString &msg, int maxLineLength)
if
(
lineStart
==
0
)
{
line
=
msg
;
needToContinue
=
false
;
}
else
if
(
lineStart
!=
0
&&
lineStart
!=
msg
.
length
())
{
}
else
if
(
lineStart
!=
msg
.
length
())
{
line
=
msg
.
mid
(
lineStart
,
msg
.
length
()
-
lineStart
);
needToContinue
=
false
;
}
else
{
...
...
@@ -650,13 +650,13 @@ QString formatQuotePrefix(const QString &wildString, const QString &fromDisplayS
}
int
j
=
0
;
const
int
strLength
(
fromDisplayString
.
length
());
for
(;
j
<
strLength
&&
fromDisplayString
[
j
]
>
QLatin1Char
(
' '
);
++
j
)
{
}
for
(;
j
<
strLength
&&
fromDisplayString
[
j
]
<=
QLatin1Char
(
' '
);
++
j
)
{
}
const
int
strLength
FromDisplayString
(
fromDisplayString
.
length
());
for
(;
j
<
strLength
FromDisplayString
&&
fromDisplayString
[
j
]
>
QLatin1Char
(
' '
);
++
j
)
{
}
for
(;
j
<
strLength
FromDisplayString
&&
fromDisplayString
[
j
]
<=
QLatin1Char
(
' '
);
++
j
)
{
}
result
+=
fromDisplayString
[
0
];
if
(
j
<
strLength
&&
fromDisplayString
[
j
]
>
QLatin1Char
(
' '
))
{
if
(
j
<
strLength
FromDisplayString
&&
fromDisplayString
[
j
]
>
QLatin1Char
(
' '
))
{
result
+=
fromDisplayString
[
j
];
}
else
if
(
strLength
>
1
)
{
}
else
if
(
strLength
FromDisplayString
>
1
)
{
if
(
fromDisplayString
[
1
]
>
QLatin1Char
(
' '
))
{
result
+=
fromDisplayString
[
1
];
}
...
...
messagelist/src/core/manager.cpp
View file @
6bc45dca
...
...
@@ -519,17 +519,17 @@ static Theme::Column *add_theme_simple_text_column(Theme *s,
c
->
addMessageRow
(
r
);
if
(
addGroupHeaderItem
)
{
auto
r
=
new
Theme
::
Row
();
auto
r
ow
=
new
Theme
::
Row
();
auto
i
=
new
Theme
::
ContentItem
(
type
);
auto
i
Row
=
new
Theme
::
ContentItem
(
type
);
if
(
alignRight
)
{
r
->
addRightItem
(
i
);
r
ow
->
addRightItem
(
i
Row
);
}
else
{
r
->
addLeftItem
(
i
);
r
ow
->
addLeftItem
(
i
Row
);
}
c
->
addGroupHeaderRow
(
r
);
c
->
addGroupHeaderRow
(
r
ow
);
}
s
->
addColumn
(
c
);
...
...
messagelist/src/core/widgets/quicksearchwarning.cpp
View file @
6bc45dca
...
...
@@ -33,8 +33,8 @@ void QuickSearchWarning::setSearchText(const QString &text)
if
(
!
MessageList
::
MessageListSettings
::
quickSearchWarningDoNotShowAgain
())
{
const
QStringList
lstText
=
text
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
bool
foundLessThanThreeCharacters
=
false
;
for
(
const
QString
&
t
ext
:
lstText
)
{
if
(
t
ext
.
trimmed
().
size
()
<
3
)
{
for
(
const
QString
&
splitT
ext
:
lstText
)
{
if
(
splitT
ext
.
trimmed
().
size
()
<
3
)
{
foundLessThanThreeCharacters
=
true
;
break
;
}
...
...
messageviewer/src/header/contactdisplaymessagememento.cpp
View file @
6bc45dca
...
...
@@ -69,11 +69,11 @@ void ContactDisplayMessageMemento::slotSearchJobFinished(KJob *job)
}
}
else
{
QByteArray
imageData
;
KIO
::
TransferJob
*
job
=
KIO
::
get
(
url
,
KIO
::
NoReload
);
QObject
::
connect
(
job
,
&
KIO
::
TransferJob
::
data
,
[
&
imageData
](
KIO
::
Job
*
,
const
QByteArray
&
data
)
{
KIO
::
TransferJob
*
job
Transfert
=
KIO
::
get
(
url
,
KIO
::
NoReload
);
QObject
::
connect
(
job
Transfert
,
&
KIO
::
TransferJob
::
data
,
[
&
imageData
](
KIO
::
Job
*
,
const
QByteArray
&
data
)
{
imageData
.
append
(
data
);
});
if
(
job
->
exec
())
{
if
(
job
Transfert
->
exec
())
{
if
(
image
.
loadFromData
(
imageData
))
{
ok
=
true
;
}
...
...
messageviewer/src/viewer/urlhandlermanager.cpp
View file @
6bc45dca
...
...
@@ -689,9 +689,9 @@ bool AttachmentURLHandler::handleShiftClick(const QUrl &url, ViewerPrivate *wind
item
.
setPayload
<
KMime
::
Message
::
Ptr
>
(
message
);
Akonadi
::
MessageFlags
::
copyMessageFlags
(
*
message
,
item
);
item
.
setMimeType
(
KMime
::
Message
::
mimeType
());
QUrl
u
rl
;
if
(
MessageViewer
::
Util
::
saveMessageInMboxAndGetUrl
(
u
rl
,
Akonadi
::
Item
::
List
()
<<
item
,
window
->
viewer
()))
{
window
->
viewer
()
->
showOpenAttachmentFolderWidget
(
QList
<
QUrl
>
()
<<
u
rl
);
QUrl
newU
rl
;
if
(
MessageViewer
::
Util
::
saveMessageInMboxAndGetUrl
(
newU
rl
,
Akonadi
::
Item
::
List
()
<<
item
,
window
->
viewer
()))
{
window
->
viewer
()
->
showOpenAttachmentFolderWidget
(
QList
<
QUrl
>
()
<<
newU
rl
);
}
}
else
{
QList
<
QUrl
>
urlList
;
...
...
messageviewer/src/viewer/viewer_p.cpp
View file @
6bc45dca
...
...
@@ -539,9 +539,7 @@ void ViewerPrivate::showAttachmentPopup(KMime::Content *node, const QString &nam
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
this
]()
{
slotHandleAttachment
(
Viewer
::
Open
);
});
if
(
!
deletedAttachment
)
{
createOpenWithMenu
(
&
menu
,
contentTypeStr
,
true
);
}
createOpenWithMenu
(
&
menu
,
contentTypeStr
,
true
);
QMimeDatabase
mimeDb
;
auto
mimetype
=
mimeDb
.
mimeTypeForName
(
contentTypeStr
);
...
...
webengineviewer/src/checkphishingurl/createphishingurldatabasejob.cpp
View file @
6bc45dca
...
...
@@ -286,10 +286,10 @@ QVector<Removal> CreatePhishingUrlDataBaseJobPrivate::parseRemovals(const QVaria
while
(
rawIndicesIt
.
hasNext
())
{
rawIndicesIt
.
next
();
if
(
rawIndicesIt
.
key
()
==
QLatin1String
(
"indices"
))
{
const
QVariantList
l
st
=
rawIndicesIt
.
value
().
toList
();
const
QVariantList
rawLi
st
=
rawIndicesIt
.
value
().
toList
();
QList
<
quint32
>
indexList
;
indexList
.
reserve
(
l
st
.
count
());
for
(
const
QVariant
&
var
:
l
st
)
{
indexList
.
reserve
(
rawLi
st
.
count
());
for
(
const
QVariant
&
var
:
rawLi
st
)
{
indexList
.
append
(
var
.
toUInt
());
}
tmp
.
indexes
=
indexList
;
...
...
Write
Preview
Supports
Markdown
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