mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-07 19:53:23 +00:00
desktop UI: always show errors when reported
Instead of waiting for a manual call to showError(), simply use the new callback to always immediately show the error in the notification widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eccd4b993a
commit
f088aa4c8b
1 changed files with 10 additions and 0 deletions
|
@ -86,6 +86,15 @@ extern "C" int updateProgress(const char *text)
|
||||||
|
|
||||||
MainWindow *MainWindow::m_Instance = NULL;
|
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(),
|
MainWindow::MainWindow() : QMainWindow(),
|
||||||
actionNextDive(0),
|
actionNextDive(0),
|
||||||
actionPreviousDive(0),
|
actionPreviousDive(0),
|
||||||
|
@ -244,6 +253,7 @@ MainWindow::MainWindow() : QMainWindow(),
|
||||||
|
|
||||||
setupSocialNetworkMenu();
|
setupSocialNetworkMenu();
|
||||||
set_git_update_cb(&updateProgress);
|
set_git_update_cb(&updateProgress);
|
||||||
|
set_error_cb(&showErrorFromC);
|
||||||
|
|
||||||
// Toolbar Connections related to the Profile Update
|
// Toolbar Connections related to the Profile Update
|
||||||
SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance();
|
SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance();
|
||||||
|
|
Loading…
Add table
Reference in a new issue