diff options
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index accf0b267..7a99611bf 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -86,6 +86,15 @@ extern "C" int updateProgress(const char *text) MainWindow *MainWindow::m_Instance = NULL; +extern "C" void showErrorFromC() +{ + MainWindow *mainwindow = MainWindow::instance(); + if (mainwindow) { + mainwindow->getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error); + } +} + + MainWindow::MainWindow() : QMainWindow(), actionNextDive(0), actionPreviousDive(0), @@ -244,6 +253,7 @@ MainWindow::MainWindow() : QMainWindow(), setupSocialNetworkMenu(); set_git_update_cb(&updateProgress); + set_error_cb(&showErrorFromC); // Toolbar Connections related to the Profile Update SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance(); |