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
KDE PIM Runtime
Commits
aee46b4d
Commit
aee46b4d
authored
Nov 18, 2021
by
Laurent Montel
😁
Browse files
Fix compile without deprecated methods
parent
79e423bd
Pipeline
#98700
failed with stage
in 25 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/newmailnotifier/newmailnotifiersettingswidget.cpp
View file @
aee46b4d
...
...
@@ -25,16 +25,27 @@
#include <QWhatsThis>
#include <KSharedConfig>
#include <ki18n_version.h>
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
#include <KLazyLocalizedString>
#undef I18N_NOOP
#define I18N_NOOP kli18n
#endif
static
const
char
*
textToSpeakMessage
=
I18N_NOOP
(
"<qt>"
"<p>Here you can define message. "
"You can use:</p>"
"<ul>"
"<li>%s set subject</li>"
"<li>%f set from</li>"
"</ul>"
"</qt>"
);
#if KI18N_VERSION < QT_VERSION_CHECK(5, 89, 0)
static
const
char
*
textToSpeakMessage
#else
static
KLazyLocalizedString
textToSpeakMessage
#endif
=
I18N_NOOP
(
"<qt>"
"<p>Here you can define message. "
"You can use:</p>"
"<ul>"
"<li>%s set subject</li>"
"<li>%f set from</li>"
"</ul>"
"</qt>"
);
NewMailNotifierSettingsWidget
::
NewMailNotifierSettingsWidget
(
const
KSharedConfigPtr
&
config
,
QWidget
*
parent
,
const
QVariantList
&
args
)
:
Akonadi
::
AgentConfigurationBase
(
config
,
parent
,
args
)
...
...
@@ -125,7 +136,12 @@ NewMailNotifierSettingsWidget::NewMailNotifierSettingsWidget(const KSharedConfig
mTextToSpeakSetting
=
new
QLineEdit
;
mTextToSpeakSetting
->
setObjectName
(
QStringLiteral
(
"mTextToSpeakSetting"
));
mTextToSpeakSetting
->
setClearButtonEnabled
(
true
);
#if KI18N_VERSION < QT_VERSION_CHECK(5, 89, 0)
mTextToSpeakSetting
->
setWhatsThis
(
i18n
(
textToSpeakMessage
));
#else
mTextToSpeakSetting
->
setWhatsThis
(
KLocalizedString
(
textToSpeakMessage
).
toString
());
#endif
textToSpeakLayout
->
addWidget
(
mTextToSpeakSetting
);
vbox
->
addLayout
(
textToSpeakLayout
);
vbox
->
addStretch
();
...
...
@@ -215,7 +231,11 @@ bool NewMailNotifierSettingsWidget::save() const
void
NewMailNotifierSettingsWidget
::
slotHelpLinkClicked
(
const
QString
&
)
{
#if KI18N_VERSION < QT_VERSION_CHECK(5, 89, 0)
const
QString
help
=
i18n
(
textToSpeakMessage
);
#else
const
QString
help
=
KLocalizedString
(
textToSpeakMessage
).
toString
();
#endif
QWhatsThis
::
showText
(
QCursor
::
pos
(),
help
);
}
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