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
Graphics
KolourPaint
Commits
4207fd4c
Commit
4207fd4c
authored
Aug 05, 2022
by
Laurent Montel
Browse files
Port KMessageBox::sorry deprecated method
parent
b5116cfc
Pipeline
#213509
passed with stage
in 4 minutes and 21 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dialogs/imagelib/kpDocumentMetaInfoDialog.cpp
View file @
4207fd4c
...
...
@@ -743,7 +743,7 @@ void kpDocumentMetaInfoDialog::accept ()
(
void
)
metaInfo
(
&
errorMessage
);
if
(
!
errorMessage
.
isEmpty
())
{
KMessageBox
::
sorry
(
this
,
errorMessage
,
i18nc
(
"@title:window"
,
"Invalid Text Fields"
));
KMessageBox
::
error
(
this
,
errorMessage
,
i18nc
(
"@title:window"
,
"Invalid Text Fields"
));
return
;
}
...
...
document/kpDocument_Open.cpp
View file @
4207fd4c
...
...
@@ -110,7 +110,7 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
// Or at least choose one consistently.
//
// TODO: Have captions for all dialogs in KolourPaint.
KMessageBox
::
sorry
(
parent
,
KMessageBox
::
error
(
parent
,
i18n
(
"Could not open
\"
%1
\"
."
,
kpUrlFormatter
::
PrettyFilename
(
url
)));
}
...
...
@@ -146,7 +146,7 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
if
(
image
.
isNull
())
{
KMessageBox
::
sorry
(
parent
,
KMessageBox
::
error
(
parent
,
i18n
(
"Could not open
\"
%1
\"
- unsupported image format.
\n
"
"The file may be corrupt."
,
kpUrlFormatter
::
PrettyFilename
(
url
)));
...
...
lgpl/generic/kpColorCollection.cpp
View file @
4207fd4c
...
...
@@ -117,7 +117,7 @@ kpColorCollection::~kpColorCollection()
static
void
CouldNotOpenDialog
(
const
QUrl
&
url
,
QWidget
*
parent
)
{
KMessageBox
::
sorry
(
parent
,
KMessageBox
::
error
(
parent
,
i18n
(
"Could not open color palette
\"
%1
\"
."
,
kpUrlFormatter
::
PrettyFilename
(
url
)));
}
...
...
@@ -150,7 +150,7 @@ kpColorCollection::open(const QUrl &url, QWidget *parent)
QString
line
=
stream
.
readLine
();
if
(
line
.
indexOf
(
QLatin1String
(
" Palette"
))
==
-
1
)
{
KMessageBox
::
sorry
(
parent
,
KMessageBox
::
error
(
parent
,
i18n
(
"Could not open color palette
\"
%1
\"
- unsupported format.
\n
"
"The file may be corrupt."
,
kpUrlFormatter
::
PrettyFilename
(
url
)));
...
...
@@ -210,7 +210,7 @@ kpColorCollection::open(const QUrl &url, QWidget *parent)
static
void
CouldNotOpenKDEDialog
(
const
QString
&
name
,
QWidget
*
parent
)
{
KMessageBox
::
sorry
(
parent
,
KMessageBox
::
error
(
parent
,
i18n
(
"Could not open KDE color palette
\"
%1
\"
."
,
name
));
}
...
...
mainWindow/kpMainWindow_Edit.cpp
View file @
4207fd4c
...
...
@@ -606,7 +606,7 @@ void kpMainWindow::slotPaste()
{
kpSetOverrideCursorSaver
cursorSaver
(
Qt
::
ArrowCursor
);
KMessageBox
::
sorry
(
this
,
KMessageBox
::
error
(
this
,
i18n
(
"<qt>KolourPaint cannot paste the contents of"
" the clipboard as it has an unknown format.</qt>"
),
i18n
(
"Cannot Paste"
));
...
...
mainWindow/kpMainWindow_File.cpp
View file @
4207fd4c
...
...
@@ -543,7 +543,7 @@ void kpMainWindow::slotScan ()
// No scanning support (kdegraphics/libkscan) installed?
if
(
!
d
->
scanDialog
)
{
KMessageBox
::
sorry
(
this
,
KMessageBox
::
error
(
this
,
i18n
(
"Failed to open scanning dialog."
),
i18nc
(
"@title:window"
,
"Scanning Failed"
));
return
;
...
...
scan/sanedialog.cpp
View file @
4207fd4c
...
...
@@ -70,7 +70,7 @@ bool SaneDialog::setup()
}
if
(
!
m_ksanew
->
openDevice
(
m_openDev
))
{
// could not open the scanner
KMessageBox
::
sorry
(
nullptr
,
i18n
(
"Opening the selected scanner failed."
));
KMessageBox
::
error
(
nullptr
,
i18n
(
"Opening the selected scanner failed."
));
m_openDev
=
QString
();
return
false
;
}
...
...
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