Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Graphics
Spectacle
Commits
eaa811c7
Commit
eaa811c7
authored
Oct 06, 2020
by
Méven Car
Committed by
Nate Graham
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display an inline error message when a screenshot fails
Currently when this happens, the GUI does not inform the user.
parent
ed1e156c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
src/Gui/KSMainWindow.cpp
src/Gui/KSMainWindow.cpp
+6
-0
src/Gui/KSMainWindow.h
src/Gui/KSMainWindow.h
+1
-0
src/SpectacleCore.cpp
src/SpectacleCore.cpp
+1
-0
No files found.
src/Gui/KSMainWindow.cpp
View file @
eaa811c7
...
...
@@ -487,6 +487,12 @@ void KSMainWindow::imageCopied()
KMessageWidget
::
Information
);
}
void
KSMainWindow
::
screenshotFailed
()
{
showInlineMessage
(
i18n
(
"Could not take a screenshot. Please report this bug here: <a href=
\"
https://bugs.kde.org/enter_bug.cgi?product=Spectacle
\"
>create a spectacle bug</a>"
),
KMessageWidget
::
Warning
);
}
void
KSMainWindow
::
showPreferencesDialog
()
{
if
(
KConfigDialog
::
showDialog
(
QStringLiteral
(
"settings"
)))
{
...
...
src/Gui/KSMainWindow.h
View file @
eaa811c7
...
...
@@ -86,6 +86,7 @@ class KSMainWindow: public QDialog
void
setScreenshotAndShow
(
const
QPixmap
&
pixmap
);
void
imageSaved
(
const
QUrl
&
location
);
void
imageSavedAndCopied
(
const
QUrl
&
location
);
void
screenshotFailed
();
Q_SIGNALS:
...
...
src/SpectacleCore.cpp
View file @
eaa811c7
...
...
@@ -370,6 +370,7 @@ void SpectacleCore::screenshotFailed()
emit
allDone
();
return
;
case
StartMode
::
Gui
:
mMainWindow
->
screenshotFailed
();
mMainWindow
->
setScreenshotAndShow
(
QPixmap
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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