summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-07 16:52:39 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-07 16:52:39 +0900
commitf2035bcd797cab0b6be180b160bca3e768ccb652 (patch)
tree0371585caf90d058594963e9c5f72806b6ffec33 /qt-ui/mainwindow.cpp
parentf11b2274ec8921235ff534a6f138a3f69b69531a (diff)
downloadsubsurface-f2035bcd797cab0b6be180b160bca3e768ccb652.tar.gz
Don't translate the fake DC models
Since the model name is written into the XML file it has to be a literal string that isn't translated. Otherwise a datafile written in one locale behaves differently when opened by Subsurface under a different locale. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 7709ff10b..4489569fb 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -280,8 +280,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 + gettimezoneoffset();
- const char* model = strdup(tr("manually added dive").toLocal8Bit().constData());
- dive->dc.model = model; // do not use tr here since it expects a char*.
+ dive->dc.model = "manually added dive"; // don't translate! this is stored in the XML file
record_dive(dive);
select_dive(get_divenr(dive));
ui.InfoWidget->updateDiveInfo(selected_dive);
@@ -826,7 +825,7 @@ void MainWindow::editCurrentDive()
struct dive *d = current_dive;
QString defaultDC(d->dc.model);
- if (defaultDC == tr("manually added dive")){
+ if (defaultDC == "manually added dive"){
disableDcShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(false);
ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner.
@@ -834,7 +833,7 @@ void MainWindow::editCurrentDive()
DivePlannerPointsModel::instance()->loadFromDive(d);
ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
}
- else if (defaultDC == tr("Simulated Dive")){
+ else if (defaultDC == "planned dive"){
// this looks like something is missing here
}
}