From 8856417b2fb783ad3e8dcf95ddc9292cc1c5ba52 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 17 Nov 2014 14:15:19 +0000 Subject: Allow translation of the cylinder use strings for the UI Signed-off-by: Dirk Hohndel --- qt-ui/modeldelegates.cpp | 7 ++++--- qt-ui/models.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index 85be9ba62..9720e3f9e 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -1,10 +1,11 @@ #include "modeldelegates.h" -#include "../dive.h" -#include "../divelist.h" +#include "dive.h" +#include "divelist.h" #include "starwidget.h" #include "models.h" #include "diveplanner.h" #include "simplewidgets.h" +#include "gettextfromc.h" #include #include @@ -286,7 +287,7 @@ QWidget *TankUseDelegate::createEditor(QWidget * parent, const QStyleOptionViewI { QComboBox *comboBox = new QComboBox(parent); for (int i = 0; i < NUM_GAS_USE; i++) - comboBox->addItem(QString(cylinderuse_text[i])); + comboBox->addItem(gettextFromC::instance()->trGettext(cylinderuse_text[i])); return comboBox; } diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 9464d6c37..f22a1f6c9 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -173,7 +173,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const ret = get_depth_string(cyl->depth, true); break; case USE: - ret = QString(cylinderuse_text[cyl->cylinder_use]); + ret = gettextFromC::instance()->trGettext(cylinderuse_text[cyl->cylinder_use]); break; } break; -- cgit v1.2.3-70-g09d2