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
9f70ff5d
Commit
9f70ff5d
authored
Oct 29, 2018
by
Laurent Montel
😁
Browse files
Fix generate tooltips
parent
f6ead8e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
messagecomposer/src/recipient/recipientseditorsidewidget.cpp
View file @
9f70ff5d
...
...
@@ -46,7 +46,7 @@ RecipientsEditorSideWidget::RecipientsEditorSideWidget(RecipientsEditor *view, Q
mTotalLabel
=
new
QLabel
(
this
);
mTotalLabel
->
setAlignment
(
Qt
::
AlignCenter
);
mTotalLabel
->
setTextFormat
(
Qt
::
Rich
Text
);
mTotalLabel
->
setTextFormat
(
Qt
::
Plain
Text
);
topLayout
->
addWidget
(
mTotalLabel
);
mTotalLabel
->
hide
();
...
...
@@ -119,7 +119,7 @@ void RecipientsEditorSideWidget::setTotal(int recipients, int lines)
void
RecipientsEditorSideWidget
::
updateTotalToolTip
()
{
QString
text
=
QStringLiteral
(
"<qt>"
)
;
QString
text
;
QString
to
;
QString
cc
;
...
...
@@ -129,7 +129,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/>
"
);
QString
emailLine
=
(
*
it
)
->
email
().
toHtmlEscaped
()
+
QLatin1String
(
"
\n
"
);
switch
((
*
it
)
->
type
())
{
case
Recipient
::
To
:
to
+=
emailLine
;
...
...
@@ -145,15 +145,14 @@ void RecipientsEditorSideWidget::updateTotalToolTip()
}
}
text
+=
x
i18nc
(
"@info:tooltip %1 list of emails"
,
"
<interface>To:</interface><nl/>
%1"
,
to
);
text
+=
i18nc
(
"@info:tooltip %1 list of emails"
,
"
To:
%1"
,
to
);
if
(
!
cc
.
isEmpty
())
{
text
+=
x
i18nc
(
"@info:tooltip %1 list of emails"
,
"
<interface>CC:</interface><nl/>
%1"
,
cc
);
text
+=
i18nc
(
"@info:tooltip %1 list of emails"
,
"
CC:
%1"
,
cc
);
}
if
(
!
bcc
.
isEmpty
())
{
text
+=
x
i18nc
(
"@info:tooltip %1 list of emails"
,
"
<interface>BCC:</interface><nl/>
%1"
,
bcc
);
text
+=
i18nc
(
"@info:tooltip %1 list of emails"
,
"
BCC:
%1"
,
bcc
);
}
text
.
append
(
QLatin1String
(
"</qt>"
));
mTotalLabel
->
setToolTip
(
text
);
}
...
...
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