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
Akregator
Commits
86329a80
Commit
86329a80
authored
Oct 15, 2022
by
Laurent Montel
Browse files
Don't use deprecated methods
parent
83c30f77
Pipeline
#248365
passed with stage
in 2 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/articleviewer-ng/webengine/articleviewerwebengine.cpp
View file @
86329a80
...
...
@@ -12,6 +12,7 @@
#include
"articleviewerwebenginepage.h"
#include
"webengine/urlhandlerwebenginemanager.h"
#include
<kpimtextedit/kpimtextedit-texttospeech.h>
#include
<kwidgetsaddons_version.h>
#if KPIMTEXTEDIT_TEXT_TO_SPEECH
#include
<KPIMTextEdit/TextToSpeech>
#endif
...
...
@@ -378,16 +379,22 @@ void ArticleViewerWebEngine::resizeEvent(QResizeEvent *e)
void
ArticleViewerWebEngine
::
disableIntroduction
()
{
KGuiItem
yesButton
(
KStandardGuiItem
::
yes
());
yesButton
.
setText
(
i18n
(
"Disable"
));
KGuiItem
noButton
(
KStandardGuiItem
::
no
());
noButton
.
setText
(
i18n
(
"Keep Enabled"
));
KGuiItem
yesButton
(
i18n
(
"Disable"
));
KGuiItem
noButton
(
i18n
(
"Keep Enabled"
));
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if
(
KMessageBox
::
questionTwoActions
(
this
,
#else
if
(
KMessageBox
::
questionYesNo
(
this
,
i18n
(
"Are you sure you want to disable this introduction page?"
),
i18n
(
"Disable Introduction Page"
),
yesButton
,
noButton
)
#endif
i18n
(
"Are you sure you want to disable this introduction page?"
),
i18n
(
"Disable Introduction Page"
),
yesButton
,
noButton
)
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
==
KMessageBox
::
PrimaryAction
)
{
#else
==
KMessageBox
::
Yes
)
{
#endif
Settings
::
self
()
->
setDisableIntroduction
(
true
);
Settings
::
self
()
->
save
();
}
...
...
@@ -417,12 +424,17 @@ void ArticleViewerWebEngine::forwardMouseReleaseEvent(QMouseEvent *event)
bool
ArticleViewerWebEngine
::
urlIsAMalwareButContinue
()
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if
(
KMessageBox
::
SecondaryAction
==
KMessageBox
::
questionTwoActions
(
this
,
#else
if
(
KMessageBox
::
No
==
KMessageBox
::
warningYesNo
(
this
,
i18n
(
"This web site is a malware, do you want to continue to show it?"
),
i18n
(
"Malware"
),
KStandardGuiItem
::
cont
(),
KStandardGuiItem
::
cancel
()))
{
#endif
i18n
(
"This web site is a malware, do you want to continue to show it?"
),
i18n
(
"Malware"
),
KStandardGuiItem
::
cont
(),
KStandardGuiItem
::
cancel
()))
{
return
false
;
}
return
true
;
...
...
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