summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-06 08:55:58 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-06 10:42:32 -0700
commit4d3e74a23676a33ffdc04a4a8b83c05f63b2693c (patch)
tree23cff2046459ab33f32499e71e7caeb5892dbcd6 /qt-ui
parent2c4ccc04bd384090917d7d17221012611426edb3 (diff)
downloadsubsurface-4d3e74a23676a33ffdc04a4a8b83c05f63b2693c.tar.gz
Trying to switch to Qt translation
This compiles and looks about right, but it doesn't appear to work, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp4
-rw-r--r--qt-ui/mainwindow.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index d183b4a15..e1dcc3d9e 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1184,7 +1184,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
#endif
char *cache = NULL;
tempDive = NULL;
- char *errorString = NULL;
+ const char *errorString = NULL;
plan(&diveplan, &cache, &tempDive, isPlanner(), &errorString);
if (mode == ADD)
copy_samples(tempDive, current_dive);
@@ -1216,7 +1216,7 @@ void DivePlannerPointsModel::createPlan()
// to not delete it later. mumble. ;p
char *cache = NULL;
tempDive = NULL;
- char *errorString = NULL;
+ const char *errorString = NULL;
createTemporaryPlan();
plan(&diveplan, &cache, &tempDive, isPlanner(), &errorString);
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index bd2d9d0fb..247cfdf2f 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -268,7 +268,7 @@ void MainWindow::on_actionAddDive_triggered()
// now cheat - create one dive that we use to store the info tab data in
struct dive *dive = alloc_dive();
dive->when = QDateTime::currentMSecsSinceEpoch() / 1000L;
- dive->dc.model = _("manually added dive"); // do not use tr here since it expects a char*.
+ dive->dc.model = tr("manually added dive").toLocal8Bit().constData(); // do not use tr here since it expects a char*.
record_dive(dive);
select_dive(get_divenr(dive));
ui.InfoWidget->updateDiveInfo(selected_dive);