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
Kig
Commits
de72ade9
Commit
de72ade9
authored
Oct 16, 2022
by
Laurent Montel
Browse files
Adapt to new api (scripted)
parent
0be48a04
Pipeline
#248828
passed with stage
in 3 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kig/kig_part.cpp
View file @
de72ade9
...
...
@@ -53,6 +53,7 @@
#include
<KStandardAction>
#include
<KToggleAction>
#include
<KUndoActions>
#include
<kwidgetsaddons_version.h>
using
namespace
std
;
...
...
@@ -435,13 +436,22 @@ bool KigPart::saveFile()
const
QMimeType
mimeType
=
mimeDb
.
mimeTypeForFile
(
localFilePath
());
if
(
mimeType
.
name
()
!=
QLatin1String
(
"application/x-kig"
))
{
// we don't support this mime type...
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if
(
KMessageBox
::
warningTwoActions
(
widget
(),
#else
if
(
KMessageBox
::
warningYesNo
(
widget
(),
i18n
(
"Kig does not support saving to any other file format than "
"its own. Save to Kig's format instead?"
),
i18n
(
"Format Not Supported"
),
KGuiItem
(
i18n
(
"Save Kig Format"
)),
KStandardGuiItem
::
cancel
())
#endif
i18n
(
"Kig does not support saving to any other file format than "
"its own. Save to Kig's format instead?"
),
i18n
(
"Format Not Supported"
),
KGuiItem
(
i18n
(
"Save Kig Format"
)),
KStandardGuiItem
::
cancel
())
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
==
KMessageBox
::
ButtonCode
::
SecondaryAction
)
#else
==
KMessageBox
::
No
)
#endif
return
false
;
else
{
QFileInfo
save
(
url
().
toLocalFile
());
...
...
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