aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-05 23:52:39 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-06 00:01:30 +0100
commitd567859e87983f89859576e745f2678806875ecb (patch)
treeb652c08538062a3a4777463cd5bc49308a378076 /qt-ui
parent05f4f9b5336412a222672f460d87740f8ce7866c (diff)
downloadsubsurface-d567859e87983f89859576e745f2678806875ecb.tar.gz
Show error messages during start up as soon as the main window is shown
When the user has setup cloud storage as their default file but didn't store the cloud storage password an error is created but not shown until another error happens - that's very confusing for the user. This patch fixes that. Fixes #938 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp5
-rw-r--r--qt-ui/mainwindow.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 104dfee04..8f2f7cd23 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1511,6 +1511,11 @@ NotificationWidget *MainWindow::getNotificationWidget()
return ui.mainErrorMessage;
}
+void MainWindow::showError()
+{
+ getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
+}
+
QString MainWindow::displayedFilename(QString fullFilename)
{
QFile f(fullFilename);
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 25c9b3eba..14aa22f0e 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -98,6 +98,7 @@ public:
QUndoStack *undoStack;
NotificationWidget *getNotificationWidget();
void enableDisableCloudActions();
+ void showError();
private
slots:
/* file menu action */