diff options
-rw-r--r-- | desktop-widgets/diveplanner.cpp | 2 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 2 | ||||
-rw-r--r-- | profile-widget/diveeventitem.cpp | 4 | ||||
-rw-r--r-- | profile-widget/profilewidget2.cpp | 8 | ||||
-rw-r--r-- | qt-models/diveplannermodel.cpp | 2 | ||||
-rw-r--r-- | qt-models/models.cpp | 2 | ||||
-rw-r--r-- | qt-models/tankinfomodel.cpp | 2 | ||||
-rw-r--r-- | qt-models/weightmodel.cpp | 8 | ||||
-rw-r--r-- | qt-models/weightsysteminfomodel.cpp | 6 |
9 files changed, 18 insertions, 18 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index ad48ba3d4..91f8e2aba 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -449,7 +449,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) // should be the same order as in dive_comp_type! for (int i=0; i < FREEDIVE; i++) - rebreather_modes.append(gettextFromC::instance()->tr(divemode_text_ui[i])); + rebreather_modes.append(gettextFromC::tr(divemode_text_ui[i])); ui.rebreathermode->insertItems(0, rebreather_modes); modeMapper = new QSignalMapper(this); diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 95fbb23c0..931f12862 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -112,7 +112,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), // This needs to be the same order as enum dive_comp_type in dive.h! QStringList types = QStringList(); for (int i = 0; i < NUM_DIVEMODE; i++) - types.append(gettextFromC::instance()->tr(divemode_text_ui[i])); + types.append(gettextFromC::tr(divemode_text_ui[i])); ui.DiveType->insertItems(0, types); connect(ui.DiveType, SIGNAL(currentIndexChanged(int)), this, SLOT(divetype_Changed(int))); diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index e106a3c26..13ab3770b 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -168,7 +168,7 @@ void DiveEventItem::setupPixmap(struct gasmix *lastgasmix) void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix) { // we display the event on screen - so translate - QString name = gettextFromC::instance()->tr(internalEvent->name); + QString name = gettextFromC::tr(internalEvent->name); int value = internalEvent->value; int type = internalEvent->type; @@ -194,7 +194,7 @@ void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix) } *lastgasmix = *mix; } else if (same_string(internalEvent->name, "modechange")) { - name += QString(": %1").arg(gettextFromC::instance()->tr(divemode_text_ui[internalEvent->value])); + name += QString(": %1").arg(gettextFromC::tr(divemode_text_ui[internalEvent->value])); } else if (value) { if (type == SAMPLE_EVENT_PO2 && same_string(internalEvent->name, "SP change")) { name += QString(": %1bar").arg((double)value / 1000, 0, 'f', 1); diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index a296c25da..4f86760d1 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1437,21 +1437,21 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event) QMenu *changeMode = m.addMenu(tr("Change divemode")); if (divemode != OC) { QAction *action = new QAction(&m); - action->setText(gettextFromC::instance()->tr(divemode_text_ui[OC])); + action->setText(gettextFromC::tr(divemode_text_ui[OC])); connect(action, SIGNAL(triggered(bool)), this, SLOT(addDivemodeSwitch())); action->setData(event->globalPos()); changeMode->addAction(action); } if (divemode != CCR) { QAction *action = new QAction(&m); - action->setText(gettextFromC::instance()->tr(divemode_text_ui[CCR])); + action->setText(gettextFromC::tr(divemode_text_ui[CCR])); connect(action, SIGNAL(triggered(bool)), this, SLOT(addDivemodeSwitch())); action->setData(event->globalPos()); changeMode->addAction(action); } if (divemode != PSCR) { QAction *action = new QAction(&m); - action->setText(gettextFromC::instance()->tr(divemode_text_ui[PSCR])); + action->setText(gettextFromC::tr(divemode_text_ui[PSCR])); connect(action, SIGNAL(triggered(bool)), this, SLOT(addDivemodeSwitch())); action->setData(event->globalPos()); changeMode->addAction(action); @@ -1623,7 +1623,7 @@ void ProfileWidget2::addDivemodeSwitch() QAction *action = qobject_cast<QAction *>(sender()); QPointF scenePos = mapToScene(mapFromGlobal(action->data().toPoint())); for (i = 0; i < UNDEF_COMP_TYPE; i++) - if (gettextFromC::instance()->tr(divemode_text_ui[i]) == action->text()) + if (gettextFromC::tr(divemode_text_ui[i]) == action->text()) add_event(current_dc, lrint(timeAxis->valueAt(scenePos)), 8, 0, i, QT_TRANSLATE_NOOP("gettextFromC", "modechange")); invalidate_dive_cache(current_dive); diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 1b24a816e..5791c3292 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -253,7 +253,7 @@ QVariant DivePlannerPointsModel::data(const QModelIndex &index, int role) const else return p.time / 60; case DIVEMODE: - return gettextFromC::instance()->tr(divemode_text_ui[p.divemode]); + return gettextFromC::tr(divemode_text_ui[p.divemode]); case GAS: /* Check if we have the same gasmix two or more times * If yes return more verbose string */ diff --git a/qt-models/models.cpp b/qt-models/models.cpp index 87dfe0cd5..5fa0c7c79 100644 --- a/qt-models/models.cpp +++ b/qt-models/models.cpp @@ -84,7 +84,7 @@ void DiveTypeSelectionModel::repopulate() { QStringList modes = QStringList(); for (int i = 0; i < FREEDIVE; i++) - modes.append(gettextFromC::instance()->tr(divemode_text_ui[i])); + modes.append(gettextFromC::tr(divemode_text_ui[i])); setStringList(modes); } diff --git a/qt-models/tankinfomodel.cpp b/qt-models/tankinfomodel.cpp index ee970e638..49e42830c 100644 --- a/qt-models/tankinfomodel.cpp +++ b/qt-models/tankinfomodel.cpp @@ -92,7 +92,7 @@ TankInfoModel::TankInfoModel() : rows(-1) setHeaderDataStrings(QStringList() << tr("Description") << tr("ml") << tr("bar")); struct tank_info_t *info = tank_info; for (info = tank_info; info->name; info++, rows++) { - QString infoName = gettextFromC::instance()->tr(info->name); + QString infoName = gettextFromC::tr(info->name); if (infoName.count() > biggerEntry.count()) biggerEntry = infoName; } diff --git a/qt-models/weightmodel.cpp b/qt-models/weightmodel.cpp index de2587adc..77114eaea 100644 --- a/qt-models/weightmodel.cpp +++ b/qt-models/weightmodel.cpp @@ -58,7 +58,7 @@ QVariant WeightModel::data(const QModelIndex &index, int role) const case Qt::EditRole: switch (index.column()) { case TYPE: - ret = gettextFromC::instance()->tr(ws->description); + ret = gettextFromC::tr(ws->description); break; case WEIGHT: ret = get_weight_string(ws->weight, true); @@ -104,11 +104,11 @@ bool WeightModel::setData(const QModelIndex &index, const QVariant &value, int r case TYPE: if (!value.isNull()) { //TODO: C-function weight_system_set_description ? - if (!ws->description || gettextFromC::instance()->tr(ws->description) != vString) { + if (!ws->description || gettextFromC::tr(ws->description) != vString) { // loop over translations to see if one matches int i = -1; while (ws_info[++i].name) { - if (gettextFromC::instance()->tr(ws_info[i].name) == vString) { + if (gettextFromC::tr(ws_info[i].name) == vString) { ws->description = copy_string(ws_info[i].name); break; } @@ -125,7 +125,7 @@ bool WeightModel::setData(const QModelIndex &index, const QVariant &value, int r // now update the ws_info changed = true; WSInfoModel *wsim = WSInfoModel::instance(); - QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, gettextFromC::instance()->tr(ws->description)); + QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, gettextFromC::tr(ws->description)); if (!matches.isEmpty()) wsim->setData(wsim->index(matches.first().row(), WSInfoModel::GR), ws->weight.grams); } diff --git a/qt-models/weightsysteminfomodel.cpp b/qt-models/weightsysteminfomodel.cpp index 14d268bcb..f843c8ef0 100644 --- a/qt-models/weightsysteminfomodel.cpp +++ b/qt-models/weightsysteminfomodel.cpp @@ -58,7 +58,7 @@ QVariant WSInfoModel::data(const QModelIndex &index, int role) const ret = gr; break; case DESCRIPTION: - ret = gettextFromC::instance()->tr(info->name); + ret = gettextFromC::tr(info->name); break; } break; @@ -81,7 +81,7 @@ WSInfoModel::WSInfoModel() : rows(-1) setHeaderDataStrings(QStringList() << tr("Description") << tr("kg")); struct ws_info_t *info = ws_info; for (info = ws_info; info->name; info++, rows++) { - QString wsInfoName = gettextFromC::instance()->tr(info->name); + QString wsInfoName = gettextFromC::tr(info->name); if (wsInfoName.count() > biggerEntry.count()) biggerEntry = wsInfoName; } @@ -99,7 +99,7 @@ void WSInfoModel::updateInfo() endRemoveRows(); rows = -1; for (info = ws_info; info->name; info++, rows++) { - QString wsInfoName = gettextFromC::instance()->tr(info->name); + QString wsInfoName = gettextFromC::tr(info->name); if (wsInfoName.count() > biggerEntry.count()) biggerEntry = wsInfoName; } |