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
Education
Kiten
Commits
49e9ca34
Commit
49e9ca34
authored
Jul 25, 2022
by
Nicolas Fella
Browse files
Port away from deprecated KMessageBox::sorry
parent
30d55af6
Pipeline
#208879
passed with stage
in 2 minutes and 4 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
app/dictionaryupdatemanager.cpp
View file @
49e9ca34
...
...
@@ -77,7 +77,7 @@ void DictionaryUpdateManager::checkInfoFile( KJob *job )
// Check if we have valid data to work with.
if
(
data
.
isNull
()
||
data
.
isEmpty
()
)
{
KMessageBox
::
sorry
(
nullptr
,
i18n
(
"Update canceled.
\n
Could not read file."
)
);
KMessageBox
::
error
(
nullptr
,
i18n
(
"Update canceled.
\n
Could not read file."
)
);
job
->
deleteLater
();
return
;
}
...
...
@@ -87,7 +87,7 @@ void DictionaryUpdateManager::checkInfoFile( KJob *job )
QTemporaryFile
tempFile
;
if
(
!
tempFile
.
open
()
)
{
KMessageBox
::
sorry
(
nullptr
,
i18n
(
"Update canceled.
\n
Could not open file."
)
);
KMessageBox
::
error
(
nullptr
,
i18n
(
"Update canceled.
\n
Could not open file."
)
);
qDebug
()
<<
"Could not open tempFile."
;
tempFile
.
deleteLater
();
job
->
deleteLater
();
...
...
@@ -104,7 +104,7 @@ void DictionaryUpdateManager::checkInfoFile( KJob *job )
// Maybe the format/content of (one or both) the files changed?
// or maybe one or both of the files could not be opened in the
// getFileDate function that would return an invalid empty date.
KMessageBox
::
sorry
(
nullptr
,
i18n
(
"Update canceled.
\n
The update information file has an invalid date."
)
);
KMessageBox
::
error
(
nullptr
,
i18n
(
"Update canceled.
\n
The update information file has an invalid date."
)
);
tempFile
.
deleteLater
();
job
->
deleteLater
();
return
;
...
...
@@ -318,7 +318,7 @@ void DictionaryUpdateManager::showUpdateResults()
}
else
if
(
_succeeded
.
isEmpty
()
&&
!
_failed
.
isEmpty
()
)
{
KMessageBox
::
sorry
(
nullptr
,
i18n
(
"Failed to update:
\n
%1"
KMessageBox
::
error
(
nullptr
,
i18n
(
"Failed to update:
\n
%1"
,
_failed
.
join
(
"
\n
"
)
)
);
}
...
...
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