Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Add-ons
Commits
ae01245d
Commit
ae01245d
authored
Jun 23, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Astyle kdelibs
parent
ac994eb3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
8 deletions
+5
-8
kmail/editorsendcheckplugins/checkbeforesend/autotests/checkbeforesendconfigurewidgettest.cpp
...foresend/autotests/checkbeforesendconfigurewidgettest.cpp
+0
-1
kmail/editorsendcheckplugins/checkbeforesend/autotests/checkduplicateemailsdialogtest.cpp
...ckbeforesend/autotests/checkduplicateemailsdialogtest.cpp
+1
-2
kmail/editorsendcheckplugins/checkbeforesend/autotests/checkduplicateemailsjobtest.cpp
...checkbeforesend/autotests/checkduplicateemailsjobtest.cpp
+0
-1
kmail/editorsendcheckplugins/checkbeforesend/checkduplicateemailsdialog.cpp
...eckplugins/checkbeforesend/checkduplicateemailsdialog.cpp
+1
-1
kmail/editorsendcheckplugins/checkbeforesend/checkduplicateemailsjob.cpp
...dcheckplugins/checkbeforesend/checkduplicateemailsjob.cpp
+3
-3
No files found.
kmail/editorsendcheckplugins/checkbeforesend/autotests/checkbeforesendconfigurewidgettest.cpp
View file @
ae01245d
...
...
@@ -50,7 +50,6 @@ void CheckBeforeSendConfigureWidgetTest::shouldHaveDefaultValue()
QVERIFY
(
!
mCheckMailTransport
->
text
().
isEmpty
());
QVERIFY
(
!
mCheckMailTransport
->
isChecked
());
QCheckBox
*
mCheckDuplicateEmails
=
w
.
findChild
<
QCheckBox
*>
(
QStringLiteral
(
"checkduplicatedemails"
));
QVERIFY
(
mCheckDuplicateEmails
);
QVERIFY
(
!
mCheckDuplicateEmails
->
text
().
isEmpty
());
...
...
kmail/editorsendcheckplugins/checkbeforesend/autotests/checkduplicateemailsdialogtest.cpp
View file @
ae01245d
...
...
@@ -45,8 +45,7 @@ void CheckDuplicateEmailsDialogTest::shouldHaveDefaultValue()
QDialogButtonBox
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
QLabel
*
lab
=
dlg
.
findChild
<
QLabel
*
>
(
QStringLiteral
(
"label"
));
QLabel
*
lab
=
dlg
.
findChild
<
QLabel
*
>
(
QStringLiteral
(
"label"
));
QVERIFY
(
lab
);
QVERIFY
(
!
lab
->
text
().
isEmpty
());
}
...
...
kmail/editorsendcheckplugins/checkbeforesend/autotests/checkduplicateemailsjobtest.cpp
View file @
ae01245d
...
...
@@ -89,7 +89,6 @@ void CheckDuplicateEmailsJobTest::shouldReturnEmails_data()
result
.
insert
(
QStringLiteral
(
"blo@kde.org"
),
2
);
QTest
::
newRow
(
"twoduplicateemailswithdifferentvalue"
)
<<
lst
<<
result
;
lst
.
clear
();
lst
.
append
(
QStringLiteral
(
"foo <foo@kde.org>"
));
lst
.
append
(
QStringLiteral
(
"foo@kde.org"
));
...
...
kmail/editorsendcheckplugins/checkbeforesend/checkduplicateemailsdialog.cpp
View file @
ae01245d
...
...
@@ -40,7 +40,7 @@ CheckDuplicateEmailsDialog::CheckDuplicateEmailsDialog(QWidget *parent)
mListWidget
->
setObjectName
(
QStringLiteral
(
"listwidget"
));
mainLayout
->
addWidget
(
mListWidget
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
buttonBox
->
setObjectName
(
QStringLiteral
(
"buttonbox"
));
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
CheckDuplicateEmailsDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
CheckDuplicateEmailsDialog
::
reject
);
...
...
kmail/editorsendcheckplugins/checkbeforesend/checkduplicateemailsjob.cpp
View file @
ae01245d
...
...
@@ -37,16 +37,16 @@ void CheckDuplicateEmailsJob::start()
return
;
}
QMap
<
QString
,
int
>
results
;
Q_FOREACH
(
const
QString
&
email
,
mEmails
)
{
Q_FOREACH
(
const
QString
&
email
,
mEmails
)
{
QString
tname
,
temail
;
KEmailAddress
::
extractEmailAddressAndName
(
email
,
temail
,
tname
);
// ignore return value
if
(
!
temail
.
isEmpty
())
{
const
int
val
=
results
.
value
(
temail
,
0
);
if
(
val
==
0
)
{
results
.
insert
(
temail
,
val
+
1
);
results
.
insert
(
temail
,
val
+
1
);
}
else
{
results
[
temail
]
=
val
+
1
;
results
[
temail
]
=
val
+
1
;
}
}
}
...
...
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