Commit eaa811c7 authored by Méven Car's avatar Méven Car Committed by Nate Graham

Display an inline error message when a screenshot fails

Currently when this happens, the GUI does not inform the user.
parent ed1e156c
......@@ -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"))) {
......
......@@ -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:
......
......@@ -370,6 +370,7 @@ void SpectacleCore::screenshotFailed()
emit allDone();
return;
case StartMode::Gui:
mMainWindow->screenshotFailed();
mMainWindow->setScreenshotAndShow(QPixmap());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment