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
Network
KIO Extras
Commits
caa85f77
Commit
caa85f77
authored
Oct 21, 2022
by
Friedrich W. H. Kossebau
Browse files
Port away from deprecated KIO messageBox Yes/No API
NO_CHANGELOG
parent
e8f455ca
Pipeline
#252291
failed with stage
in 2 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fish/fish.cpp
View file @
caa85f77
...
...
@@ -55,6 +55,7 @@
#include
<errno.h>
#endif
#include
<kio_version.h>
#include
<KLocalizedString>
#include
<KRemoteEncoding>
...
...
@@ -665,8 +666,13 @@ int fishProtocol::establishConnection(const QByteArray &buffer) {
#else
return
0
;
}
else
if
(
buf
.
endsWith
(
'?'
))
{
#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
int
rc
=
messageBox
(
QuestionTwoActions
,
thisFn
+
buf
,
QString
(),
i18nc
(
"@action:button"
,
"Yes"
),
i18nc
(
"@action:button"
,
"No"
));
if
(
rc
==
KIO
::
SlaveBase
::
PrimaryAction
)
{
#else
int
rc
=
messageBox
(
QuestionYesNo
,
thisFn
+
buf
);
if
(
rc
==
KIO
::
SlaveBase
::
Yes
)
{
#endif
writeChild
(
"yes
\n
"
,
4
);
}
else
{
writeChild
(
"no
\n
"
,
3
);
...
...
@@ -680,8 +686,13 @@ int fishProtocol::establishConnection(const QByteArray &buffer) {
}
#ifdef Q_OS_WIN
if
(
buf
.
endsWith
(
QLatin1String
(
"(y/n)"
)))
{
#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
int
rc
=
messageBox
(
QuestionTwoActions
,
thisFn
+
buf
,
QString
(),
i18nc
(
"@action:button"
,
"Yes"
),
i18nc
(
"@action:button"
,
"No"
));
if
(
rc
==
KIO
::
SlaveBase
::
PrimaryAction
)
{
#else
int
rc
=
messageBox
(
QuestionYesNo
,
thisFn
+
buf
);
if
(
rc
==
KIO
::
SlaveBase
::
Yes
)
{
#endif
writeChild
(
"y
\n
"
,
2
);
}
else
{
writeChild
(
"n
\n
"
,
2
);
...
...
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