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 MailCommon
Commits
e7010762
Commit
e7010762
authored
Aug 05, 2020
by
Laurent Montel
😁
Browse files
Fix clazy warning
parent
a3d5a052
Pipeline
#29694
passed with stage
in 38 minutes and 18 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/filter/autotests/filteractionaddheadertest.cpp
View file @
e7010762
...
...
@@ -97,7 +97,7 @@ void FilterActionAddHeaderTest::shouldNotExecuteActionWhenParameterIsEmpty()
item
.
setPayload
<
KMime
::
Message
::
Ptr
>
(
msgPtr
);
MailCommon
::
ItemContext
context
(
item
,
true
);
filter
.
argsFromString
(
QString
Literal
(
""
));
filter
.
argsFromString
(
Q
Latin1
String
(
""
));
QCOMPARE
(
filter
.
process
(
context
,
false
),
MailCommon
::
FilterAction
::
ErrorButGoOn
);
QCOMPARE
(
context
.
needsPayloadStore
(),
false
);
QCOMPARE
(
context
.
deleteItem
(),
false
);
...
...
src/filter/autotests/filteractiondecrypttest.cpp
View file @
e7010762
...
...
@@ -22,7 +22,7 @@
void
FilterActionDecryptTest
::
initTestCase
()
{
mGpg
=
new
GPGHelper
(
QString
::
fromUtf8
(
TEST_PATH
)
+
QStringLiteral
(
"/gpghome"
));
mGpg
=
new
GPGHelper
(
Q
Latin1
String
(
TEST_PATH
)
+
QStringLiteral
(
"/gpghome"
));
QVERIFY
(
mGpg
->
isValid
());
}
...
...
src/filter/autotests/filteractionencrypttest.cpp
View file @
e7010762
...
...
@@ -22,7 +22,7 @@
void
FilterActionEncryptTest
::
initTestCase
()
{
mGpg
=
new
GPGHelper
(
QString
::
fromUtf8
(
TEST_PATH
)
+
QStringLiteral
(
"/gpghome"
));
mGpg
=
new
GPGHelper
(
QString
Literal
(
TEST_PATH
)
+
QStringLiteral
(
"/gpghome"
));
QVERIFY
(
mGpg
->
isValid
());
}
...
...
@@ -40,7 +40,7 @@ void FilterActionEncryptTest::shouldEncrypt_data()
const
auto
smimeKey
=
QStringLiteral
(
"SMIME:%1:0FDD972BCEFB5735DC7E8EE57DB7BA4E5FDBE218"
);
const
auto
pgpKey
=
QStringLiteral
(
"PGP:%1:818AE8DA30F81B0CEA4403BA358732559B8659B2"
);
QDir
testDir
(
QString
::
fromUtf8
(
TEST_PATH
)
+
QStringLiteral
(
"/gpgdata"
));
QDir
testDir
(
QString
Literal
(
TEST_PATH
)
+
QStringLiteral
(
"/gpgdata"
));
const
auto
tests
=
testDir
.
entryInfoList
({
QStringLiteral
(
"*.msg"
)
},
QDir
::
Files
,
QDir
::
Name
);
for
(
const
auto
&
test
:
tests
)
{
QFile
plain
(
test
.
absoluteFilePath
());
...
...
src/filter/autotests/filteractionpipethroughtest.cpp
View file @
e7010762
...
...
@@ -44,7 +44,7 @@ void FilterActionPipeThroughTest::testWithNoCommand()
item
.
setPayload
<
KMime
::
Message
::
Ptr
>
(
msgPtr
);
ItemContext
context
(
item
,
true
);
filter
.
argsFromString
(
QString
Literal
(
""
));
filter
.
argsFromString
(
Q
Latin1
String
(
""
));
QCOMPARE
(
filter
.
process
(
context
,
false
),
FilterAction
::
ErrorButGoOn
);
QCOMPARE
(
context
.
needsPayloadStore
(),
false
);
}
...
...
src/filter/kmfilterlistbox.cpp
View file @
e7010762
...
...
@@ -323,8 +323,7 @@ void KMFilterListBox::slotUpdateFilterName()
// auto-naming of patterns
if
(
!
p
->
isEmpty
()
&&
p
->
first
()
&&
!
p
->
first
()
->
field
().
trimmed
().
isEmpty
())
{
shouldBeName
=
QStringLiteral
(
"<%1>: %2"
).
arg
(
QString
::
fromLatin1
(
p
->
first
()
->
field
())).
arg
(
p
->
first
()
->
contents
());
arg
(
QString
::
fromLatin1
(
p
->
first
()
->
field
()),
p
->
first
()
->
contents
());
}
else
{
shouldBeName
=
QLatin1Char
(
'<'
)
+
i18n
(
"unnamed"
)
+
QLatin1Char
(
'>'
);
}
...
...
src/search/searchpattern.cpp
View file @
e7010762
...
...
@@ -366,7 +366,7 @@ QDataStream &SearchPattern::operator>>(QDataStream &s) const
break
;
}
for
(
const
SearchRule
::
Ptr
rule
:
qAsConst
(
*
this
))
{
for
(
const
SearchRule
::
Ptr
&
rule
:
qAsConst
(
*
this
))
{
*
rule
>>
s
;
}
return
s
;
...
...
src/search/searchrule/searchruledate.cpp
View file @
e7010762
...
...
@@ -60,7 +60,7 @@ bool SearchRuleDate::matches(const Akonadi::Item &item) const
return
rc
;
}
bool
SearchRuleDate
::
matchesInternal
(
const
QDate
&
dateValue
,
const
QDate
&
msgDate
)
const
bool
SearchRuleDate
::
matchesInternal
(
QDate
dateValue
,
QDate
msgDate
)
const
{
switch
(
function
())
{
case
SearchRule
::
FuncEquals
:
...
...
src/search/searchrule/searchruledate.h
View file @
e7010762
...
...
@@ -56,7 +56,7 @@ public:
* A helper method for the main matches() method.
* Does the actual comparing.
*/
bool
matchesInternal
(
const
QDate
&
dateValue
,
const
QDate
&
msgDate
)
const
;
bool
matchesInternal
(
QDate
dateValue
,
QDate
msgDate
)
const
;
/**
* @copydoc SearchRule::addQueryTerms()
...
...
src/snippets/snippetsmodel.cpp
View file @
e7010762
...
...
@@ -735,7 +735,8 @@ void SnippetsModel::save(const QString &filename)
KSharedConfig
::
Ptr
config
=
KSharedConfig
::
openConfig
(
filename
.
isEmpty
()
?
QStringLiteral
(
"kmailsnippetrc"
)
:
filename
,
KConfig
::
NoGlobals
);
// clear everything
for
(
const
QString
&
group
:
config
->
groupList
())
{
const
QStringList
lst
=
config
->
groupList
();
for
(
const
QString
&
group
:
lst
)
{
config
->
deleteGroup
(
group
);
}
...
...
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