From a6d9f274454c09b39d79a6300de85b4c99722770 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 13 May 2013 15:28:55 -0300 Subject: Change setText(QString()) to clear() Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 84 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index a43ae563d..d8a966ae1 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -43,37 +43,37 @@ void MainTab::clearEquipment() void MainTab::clearInfo() { - ui->sacText->setText(QString()); - ui->otuText->setText(QString()); - ui->oxygenHeliumText->setText(QString()); - ui->gasUsedText->setText(QString()); - ui->dateText->setText(QString()); - ui->diveTimeText->setText(QString()); - ui->surfaceIntervalText->setText(QString()); - ui->maximumDepthText->setText(QString()); - ui->averageDepthText->setText(QString()); - ui->visibilityText->setText(QString()); - ui->waterTemperatureText->setText(QString()); - ui->airTemperatureText->setText(QString()); - ui->airPressureText->setText(QString()); + ui->sacText->clear(); + ui->otuText->clear(); + ui->oxygenHeliumText->clear(); + ui->gasUsedText->clear(); + ui->dateText->clear(); + ui->diveTimeText->clear(); + ui->surfaceIntervalText->clear(); + ui->maximumDepthText->clear(); + ui->averageDepthText->clear(); + ui->visibilityText->clear(); + ui->waterTemperatureText->clear(); + ui->airTemperatureText->clear(); + ui->airPressureText->clear(); } void MainTab::clearStats() { - ui->maximumDepthAllText->setText(QString()); - ui->minimumDepthAllText->setText(QString()); - ui->averageDepthAllText->setText(QString()); - ui->maximumSacAllText->setText(QString()); - ui->minimumSacAllText->setText(QString()); - ui->averageSacAllText->setText(QString()); - ui->divesAllText->setText(QString()); - ui->maximumTemperatureAllText->setText(QString()); - ui->minimumTemperatureAllText->setText(QString()); - ui->averageTemperatureAllText->setText(QString()); - ui->totalTimeAllText->setText(QString()); - ui->averageTimeAllText->setText(QString()); - ui->longestAllText->setText(QString()); - ui->shortestAllText->setText(QString()); + ui->maximumDepthAllText->clear(); + ui->minimumDepthAllText->clear(); + ui->averageDepthAllText->clear(); + ui->maximumSacAllText->clear(); + ui->minimumSacAllText->clear(); + ui->averageSacAllText->clear(); + ui->divesAllText->clear(); + ui->maximumTemperatureAllText->clear(); + ui->minimumTemperatureAllText->clear(); + ui->averageTemperatureAllText->clear(); + ui->totalTimeAllText->clear(); + ui->averageTimeAllText->clear(); + ui->longestAllText->clear(); + ui->shortestAllText->clear(); } #define UPDATE_TEXT(d, field) \ @@ -113,27 +113,27 @@ void MainTab::updateDiveInfo(int dive) if ((sacVal.mliter = d->sac) > 0) ui->sacText->setText(get_volume_string(sacVal, TRUE).append("/min")); else - ui->sacText->setText(QString()); + ui->sacText->clear(); if (d->surface_pressure.mbar) /* this is ALWAYS displayed in mbar */ ui->airPressureText->setText(QString("%1mbar").arg(d->surface_pressure.mbar)); else - ui->airPressureText->setText(QString()); + ui->airPressureText->clear(); } else { ui->rating->setCurrentStars(0); - ui->sacText->setText(QString()); - ui->otuText->setText(QString()); - ui->oxygenHeliumText->setText(QString()); - ui->dateText->setText(QString()); - ui->diveTimeText->setText(QString()); - ui->surfaceIntervalText->setText(QString()); - ui->maximumDepthText->setText(QString()); - ui->averageDepthText->setText(QString()); - ui->visibilityText->setText(QString()); - ui->waterTemperatureText->setText(QString()); - ui->airTemperatureText->setText(QString()); - ui->gasUsedText->setText(QString()); - ui->airPressureText->setText(QString()); + ui->sacText->clear(); + ui->otuText->clear(); + ui->oxygenHeliumText->clear(); + ui->dateText->clear(); + ui->diveTimeText->clear(); + ui->surfaceIntervalText->clear(); + ui->maximumDepthText->clear(); + ui->averageDepthText->clear(); + ui->visibilityText->clear(); + ui->waterTemperatureText->clear(); + ui->airTemperatureText->clear(); + ui->gasUsedText->clear(); + ui->airPressureText->clear(); } /* statisticsTab*/ /* we can access the stats_selection struct but how to we ensure the relevant dives are selected -- cgit v1.2.3-70-g09d2