diff options
-rw-r--r-- | git-access.c | 5 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 6 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 10 |
3 files changed, 18 insertions, 3 deletions
diff --git a/git-access.c b/git-access.c index b86805994..2d914ebfe 100644 --- a/git-access.c +++ b/git-access.c @@ -262,8 +262,11 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc return 0; } - if (rt == RT_HTTPS && !canReachCloudServer()) + if (rt == RT_HTTPS && !canReachCloudServer()) { + // this is not an error, just a warning message, so return 0 + report_error("Cannot connect to cloud server, working with local copy"); return 0; + } #if USE_LIBGIT23_API git_fetch_options opts = GIT_FETCH_OPTIONS_INIT; if (rt == RT_SSH) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 5cbf182d7..3f72fc11a 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -237,7 +237,11 @@ void MainTab::enableGeoLookupEdition() { ui.waitingSpinner->stop(); ui.addDiveSite->show(); - MainWindow::instance()->getNotificationWidget()->hideNotification(); + // if we showed an informational text about loading the files, hide it, but don't + // hide the message area if it contains other warnings + if (MainWindow::instance()->getNotificationWidget()->getNotificationText() == + tr("Please Wait, Importing your files...")) + MainWindow::instance()->getNotificationWidget()->hideNotification(); } void MainTab::disableGeoLookupEdition() diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 4e35ad9ee..16a58b321 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1515,6 +1515,7 @@ void MainWindow::showV2Dialog() void MainWindow::loadFiles(const QStringList fileNames) { + bool showWarning = false; if (fileNames.isEmpty()) return; @@ -1529,6 +1530,12 @@ void MainWindow::loadFiles(const QStringList fileNames) if (!error) { set_filename(fileNamePtr.data(), true); setTitle(MWTF_FILENAME); + // if there were any messages, show them + QString warning = get_error_string(); + if (!warning.isEmpty()) { + showWarning = true; + getNotificationWidget()->showNotification(warning , KMessageWidget::Information); + } } else { if (!v2_question_shown && abort_read_of_old_file) { v2_question_shown = true; @@ -1541,7 +1548,8 @@ void MainWindow::loadFiles(const QStringList fileNames) failedParses.append(fileNames.at(i)); } } - getNotificationWidget()->hideNotification(); + if (!showWarning) + getNotificationWidget()->hideNotification(); process_dives(false, false); addRecentFile(fileNames); removeRecentFile(failedParses); |