aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-09 16:07:48 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-09 16:07:48 -0700
commit9111ce01e7b8b06d70ddf93be3c1be1406d1ba94 (patch)
treef7b63e37d619dccfae98e8178e7f78dabccacbab /mobile-widgets/qmlmanager.cpp
parent8e0895e429d6df04dd160b425fd52ae28ef7df46 (diff)
downloadsubsurface-9111ce01e7b8b06d70ddf93be3c1be1406d1ba94.tar.gz
QML UI: show progress messages on the download page
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 9e8ee226f..c46832fcd 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -33,6 +33,15 @@ QMLManager *QMLManager::m_instance = NULL;
#define NOCLOUD_LOCALSTORAGE format_string("%s/cloudstorage/localrepo[master]", system_default_directory())
+static void progressCallback(const char *text)
+{
+ QMLManager *self = QMLManager::instance();
+ if (self) {
+ self->appendTextToLog(QString(text));
+ self->setProgressMessage(QString(text));
+ }
+}
+
static void appendTextToLogStandalone(const char *text)
{
QMLManager *self = QMLManager::instance();
@@ -93,7 +102,7 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
setShowPin(false);
// create location manager service
locationProvider = new GpsLocation(&appendTextToLogStandalone, this);
- progress_callback = &appendTextToLogStandalone;
+ progress_callback = &progressCallback;
connect(locationProvider, SIGNAL(haveSourceChanged()), this, SLOT(hasLocationSourceChanged()));
setLocationServiceAvailable(locationProvider->hasLocationsSource());
set_git_update_cb(&gitProgressCB);