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
PIM Messagelib
Commits
f93e168e
Commit
f93e168e
authored
Jun 21, 2020
by
Laurent Montel
Browse files
Minor fix
parent
5dabe045
Pipeline
#24601
passed with stage
in 33 minutes and 9 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messagecomposer/src/composer/composerviewbase.cpp
View file @
f93e168e
...
...
@@ -683,9 +683,8 @@ QVector< MessageComposer::Composer * > ComposerViewBase::generateCryptoMessages(
}
}
QStringList
recipients
(
mExpandedTo
)
;
const
QStringList
recipients
=
mExpandedTo
+
mExpandedCc
;
const
QStringList
bcc
(
mExpandedBcc
);
recipients
.
append
(
mExpandedCc
);
keyResolver
->
setPrimaryRecipients
(
recipients
);
keyResolver
->
setSecondaryRecipients
(
bcc
);
...
...
messagecomposer/src/recipient/distributionlistdialog.cpp
View file @
f93e168e
...
...
@@ -70,17 +70,17 @@ public:
setText
(
1
,
mEmail
);
}
KContacts
::
Addressee
addressee
()
const
Q_REQUIRED_RESULT
KContacts
::
Addressee
addressee
()
const
{
return
mAddressee
;
}
QString
email
()
const
Q_REQUIRED_RESULT
QString
email
()
const
{
return
mEmail
;
}
bool
isTransient
()
const
Q_REQUIRED_RESULT
bool
isTransient
()
const
{
return
mId
==
-
1
;
}
...
...
@@ -90,7 +90,7 @@ public:
mId
=
id
;
}
Akonadi
::
Item
::
Id
id
()
const
Q_REQUIRED_RESULT
Akonadi
::
Item
::
Id
id
()
const
{
return
mId
;
}
...
...
messagecomposer/src/recipient/recipientline.cpp
View file @
f93e168e
...
...
@@ -68,8 +68,6 @@ void RecipientLineEdit::keyPressEvent(QKeyEvent *ev)
RecipientLineNG
::
RecipientLineNG
(
QWidget
*
parent
)
:
MultiplyingLine
(
parent
)
,
mRecipientsCount
(
0
)
,
mModified
(
false
)
,
mData
(
new
Recipient
)
{
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Fixed
);
...
...
messagecomposer/src/recipient/recipientline.h
View file @
f93e168e
...
...
@@ -136,8 +136,8 @@ private:
void
slotAddRecipient
(
const
QString
&
);
RecipientComboBox
*
mCombo
=
nullptr
;
RecipientLineEdit
*
mEdit
=
nullptr
;
int
mRecipientsCount
;
bool
mModified
;
int
mRecipientsCount
=
0
;
bool
mModified
=
false
;
QSharedPointer
<
Recipient
>
mData
;
};
}
...
...
messagecomposer/src/recipient/recipientseditor.cpp
View file @
f93e168e
...
...
@@ -181,7 +181,7 @@ void RecipientsEditor::removeRecipient(const QString &recipient, Recipient::Type
MultiplyingLine
*
line
=
nullptr
;
while
(
it
.
hasNext
())
{
line
=
it
.
next
();
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*
>
(
line
);
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*>
(
line
);
if
(
rec
)
{
if
((
rec
->
recipient
()
->
email
()
==
recipient
)
&&
(
rec
->
recipientType
()
==
type
))
{
...
...
@@ -212,7 +212,7 @@ void MessageComposer::RecipientsEditor::setRecentAddressConfig(KConfig *config)
if
(
config
)
{
MultiplyingLine
*
line
;
foreach
(
line
,
lines
())
{
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*
>
(
line
);
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*>
(
line
);
if
(
rec
)
{
rec
->
setRecentAddressConfig
(
config
);
}
...
...
@@ -248,14 +248,14 @@ void RecipientsEditor::slotLineAdded(MultiplyingLine *line)
if
(
count
>
0
)
{
if
(
count
==
1
)
{
RecipientLineNG
*
last_rec
=
qobject_cast
<
RecipientLineNG
*
>
(
lines
().
constFirst
());
RecipientLineNG
*
last_rec
=
qobject_cast
<
RecipientLineNG
*>
(
lines
().
constFirst
());
if
(
last_rec
&&
(
last_rec
->
recipientType
()
==
Recipient
::
Bcc
||
last_rec
->
recipientType
()
==
Recipient
::
ReplyTo
))
{
rec
->
setRecipientType
(
Recipient
::
To
);
}
else
{
rec
->
setRecipientType
(
Recipient
::
Cc
);
}
}
else
{
RecipientLineNG
*
last_rec
=
qobject_cast
<
RecipientLineNG
*
>
(
lines
().
at
(
lines
().
count
()
-
2
));
RecipientLineNG
*
last_rec
=
qobject_cast
<
RecipientLineNG
*>
(
lines
().
at
(
lines
().
count
()
-
2
));
if
(
last_rec
)
{
if
(
last_rec
->
recipientType
()
==
Recipient
::
ReplyTo
)
{
rec
->
setRecipientType
(
Recipient
::
To
);
...
...
@@ -275,7 +275,7 @@ void RecipientsEditor::slotLineDeleted(int pos)
int
firstCC
=
-
1
;
for
(
int
i
=
pos
,
total
=
lines
().
count
();
i
<
total
;
++
i
)
{
MultiplyingLine
*
line
=
lines
().
at
(
i
);
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*
>
(
line
);
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*>
(
line
);
if
(
rec
)
{
if
(
rec
->
recipientType
()
==
Recipient
::
To
)
{
atLeastOneToLine
=
true
;
...
...
@@ -286,7 +286,7 @@ void RecipientsEditor::slotLineDeleted(int pos)
}
if
(
!
atLeastOneToLine
&&
(
firstCC
>=
0
))
{
RecipientLineNG
*
firstCCLine
=
qobject_cast
<
RecipientLineNG
*
>
(
lines
().
at
(
firstCC
));
RecipientLineNG
*
firstCCLine
=
qobject_cast
<
RecipientLineNG
*>
(
lines
().
at
(
firstCC
));
if
(
firstCCLine
)
{
firstCCLine
->
setRecipientType
(
Recipient
::
To
);
}
...
...
@@ -326,7 +326,7 @@ void RecipientsEditor::slotCalculateTotal()
int
empty
=
0
;
MultiplyingLine
*
line
=
nullptr
;
foreach
(
line
,
lines
())
{
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*
>
(
line
);
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*>
(
line
);
if
(
rec
)
{
if
(
rec
->
isEmpty
())
{
++
empty
;
...
...
@@ -361,7 +361,7 @@ void RecipientsEditor::slotCalculateTotal()
}
int
count
=
0
;
foreach
(
line
,
lines
())
{
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*
>
(
line
);
RecipientLineNG
*
rec
=
qobject_cast
<
RecipientLineNG
*>
(
line
);
if
(
rec
)
{
if
(
!
rec
->
isEmpty
())
{
count
++
;
...
...
@@ -375,5 +375,5 @@ void RecipientsEditor::slotCalculateTotal()
RecipientLineNG
*
RecipientsEditor
::
activeLine
()
const
{
MultiplyingLine
*
line
=
MultiplyingLineEditor
::
activeLine
();
return
qobject_cast
<
RecipientLineNG
*
>
(
line
);
return
qobject_cast
<
RecipientLineNG
*>
(
line
);
}
messagecomposer/src/recipient/recipientseditorsidewidget.cpp
View file @
f93e168e
...
...
@@ -130,7 +130,7 @@ void RecipientsEditorSideWidget::updateTotalToolTip()
Recipient
::
List
::
ConstIterator
it
;
Recipient
::
List
::
ConstIterator
end
(
recipients
.
constEnd
());
for
(
it
=
recipients
.
constBegin
();
it
!=
end
;
++
it
)
{
QString
emailLine
=
QLatin1String
(
" "
)
+
(
*
it
)
->
email
().
toHtmlEscaped
()
+
QLatin1String
(
"<br/>"
);
const
QString
emailLine
=
QLatin1String
(
" "
)
+
(
*
it
)
->
email
().
toHtmlEscaped
()
+
QLatin1String
(
"<br/>"
);
switch
((
*
it
)
->
type
())
{
case
Recipient
::
To
:
to
+=
emailLine
;
...
...
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