aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-11 11:16:59 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-11 12:38:11 -0800
commite7b2f04bec19c70bff2324b43c337728f2420aca (patch)
tree77e9337b9cc1d0297b861aefc83a4cf0ce14a458 /qt-mobile/qmlmanager.cpp
parent9195f247c4b05a0cb849cf998355dc3ec3b65641 (diff)
downloadsubsurface-e7b2f04bec19c70bff2324b43c337728f2420aca.tar.gz
Location service: consistent way to output information
qDebug is nice when testing on the desktop, but it has to go to the message area on an Android device to make things easy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r--qt-mobile/qmlmanager.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index dd038c6e2..e0c621542 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -9,7 +9,7 @@
#include "qthelper.h"
#include "qt-gui.h"
-static void showMessage(const char *errorString)
+void qmlUiShowMessage(const char *errorString)
{
if (qqWindowObject && !qqWindowObject->setProperty("messageText", QVariant(errorString)))
qDebug() << "couldn't set property messageText to" << errorString;
@@ -55,11 +55,11 @@ void QMLManager::savePreferences()
void QMLManager::loadDives()
{
- showMessage("Loading dives...");
+ qmlUiShowMessage("Loading dives...");
appendTextToLog("Loading dives...");
QString url;
if (getCloudURL(url)) {
- showMessage(get_error_string());
+ qmlUiShowMessage(get_error_string());
appendTextToLog(get_error_string());
return;
}
@@ -69,12 +69,12 @@ void QMLManager::loadDives()
int error = parse_file(fileNamePrt.data());
if (!error) {
report_error("filename is now %s", fileNamePrt.data());
- showMessage(get_error_string());
+ qmlUiShowMessage(get_error_string());
appendTextToLog(get_error_string());
set_filename(fileNamePrt.data(), true);
appendTextToLog(fileNamePrt.data());
} else {
- showMessage(get_error_string());
+ qmlUiShowMessage(get_error_string());
appendTextToLog(get_error_string());
}
process_dives(false, false);
@@ -116,21 +116,21 @@ void QMLManager::commitChanges(QString diveId, QString suit, QString buddy, QStr
void QMLManager::saveChanges()
{
- showMessage("Saving dives.");
+ qmlUiShowMessage("Saving dives.");
QString fileName;
if (getCloudURL(fileName)) {
- showMessage(get_error_string());
+ qmlUiShowMessage(get_error_string());
appendTextToLog(get_error_string());
return;
}
if (save_dives(fileName.toUtf8().data())) {
- showMessage(get_error_string());
+ qmlUiShowMessage(get_error_string());
appendTextToLog(get_error_string());
return;
}
- showMessage("Dives saved.");
+ qmlUiShowMessage("Dives saved.");
appendTextToLog("Dive saved.");
set_filename(fileName.toUtf8().data(), true);
mark_divelist_changed(false);
@@ -138,7 +138,7 @@ void QMLManager::saveChanges()
void QMLManager::addDive()
{
- showMessage("Adding new dive.");
+ qmlUiShowMessage("Adding new dive.");
appendTextToLog("Adding new dive.");
DiveListModel::instance()->startAddDive();
}