diff options
-rw-r--r-- | qt-ui/divelistview.cpp | 18 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 2 | ||||
-rw-r--r-- | qt-ui/diveplanner.cpp | 2 | ||||
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 2 | ||||
-rw-r--r-- | qt-ui/globe.cpp | 2 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 44 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 24 | ||||
-rw-r--r-- | qt-ui/models.cpp | 28 | ||||
-rw-r--r-- | qt-ui/profilegraphics.cpp | 34 | ||||
-rw-r--r-- | qt-ui/profilegraphics.h | 6 | ||||
-rw-r--r-- | qt-ui/simplewidgets.cpp | 2 | ||||
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 8 |
12 files changed, 86 insertions, 86 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 607f8783c..1b01a1cf7 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -534,7 +534,7 @@ void DiveListView::merge_trip(const QModelIndex &a, int offset) reload(currentLayout, false); fixMessyQtModelBehaviour(); restoreSelection(); - mark_divelist_changed(TRUE); + mark_divelist_changed(true); } void DiveListView::mergeTripAbove() @@ -553,13 +553,13 @@ void DiveListView::removeFromTrip() struct dive *d; for_each_dive(i, d) { if (d->selected) - remove_dive_from_trip(d, FALSE); + remove_dive_from_trip(d, false); } rememberSelection(); reload(currentLayout, false); fixMessyQtModelBehaviour(); restoreSelection(); - mark_divelist_changed(TRUE); + mark_divelist_changed(true); } void DiveListView::newTripAbove() @@ -578,7 +578,7 @@ void DiveListView::newTripAbove() trip->expanded = 1; reload(currentLayout, false); fixMessyQtModelBehaviour(); - mark_divelist_changed(TRUE); + mark_divelist_changed(true); restoreSelection(); } @@ -621,7 +621,7 @@ void DiveListView::addToTripAbove() } } trip->expanded = 1; - mark_divelist_changed(TRUE); + mark_divelist_changed(true); reload(currentLayout, false); restoreSelection(); fixMessyQtModelBehaviour(); @@ -642,9 +642,9 @@ void DiveListView::markDiveInvalid() if (amount_selected == 0) { mainWindow()->cleanUpEmpty(); } - mark_divelist_changed(TRUE); + mark_divelist_changed(true); mainWindow()->refreshDisplay(); - if(prefs.display_invalid_dives == FALSE) { + if(prefs.display_invalid_dives == false) { clearSelection(); // select top dive that isn't marked invalid rememberSelection(); @@ -673,7 +673,7 @@ void DiveListView::deleteDive() if (amount_selected == 0) { mainWindow()->cleanUpEmpty(); } - mark_divelist_changed(TRUE); + mark_divelist_changed(true); mainWindow()->refreshDisplay(); if(lastDiveNr != -1){ clearSelection(); @@ -771,7 +771,7 @@ void DiveListView::saveSelectedDivesAs() settings.endGroup(); QByteArray bt = QFile::encodeName(fileName); - save_dives_logic(bt.data(), TRUE); + save_dives_logic(bt.data(), true); } void DiveListView::exportSelectedDivesAsUDDF() diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 79349027d..e37b9a8d7 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -64,7 +64,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() error = NULL; } } - process_dives(TRUE, FALSE); + process_dives(true, false); mainWindow()->refreshDisplay(); } diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 6d5390b07..672cf9d59 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -1490,7 +1490,7 @@ void DivePlannerPointsModel::createPlan() cyl->end.mbar = cyl->start.mbar - consumption; } - mark_divelist_changed(TRUE); + mark_divelist_changed(true); // Remove and clean the diveplan, so we don't delete // the dive by mistake. diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index a43a06bc2..483149c8f 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -350,7 +350,7 @@ void DownloadFromDCWidget::onDownloadThreadFinished() for (int i = dive_table.nr - 1; i >= previousLast; i--) delete_single_dive(i); } else { - process_dives(TRUE, preferDownloaded()); + process_dives(true, preferDownloaded()); } } else { updateState(CANCELLED); diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index bbd103432..19a1f53be 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -266,7 +266,7 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U } centerOn(lon, lat, true); editingDiveLocation = false; - mark_divelist_changed(TRUE); + mark_divelist_changed(true); mainWindow()->refreshDisplay(); } diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 1de4b6df7..be25ea1b3 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -358,7 +358,7 @@ void MainTab::clearStats() if (!d || d->field.mkelvin == 0) \ ui.field->setText(""); \ else \ - ui.field->setText(get_temperature_string(d->field, TRUE)) + ui.field->setText(get_temperature_string(d->field, true)) bool MainTab::isEditing() { @@ -461,29 +461,29 @@ void MainTab::updateDiveInfo(int dive) taglist_get_tagstring(d->tag_list, buf, 1024); ui.tagWidget->setText(QString(buf)); } - ui.maximumDepthText->setText(get_depth_string(d->maxdepth, TRUE)); - ui.averageDepthText->setText(get_depth_string(d->meandepth, TRUE)); + ui.maximumDepthText->setText(get_depth_string(d->maxdepth, true)); + ui.averageDepthText->setText(get_depth_string(d->meandepth, true)); ui.otuText->setText(QString("%1").arg(d->otu)); - ui.waterTemperatureText->setText(get_temperature_string(d->watertemp, TRUE)); - ui.airTemperatureText->setText(get_temperature_string(d->airtemp, TRUE)); + ui.waterTemperatureText->setText(get_temperature_string(d->watertemp, true)); + ui.airTemperatureText->setText(get_temperature_string(d->airtemp, true)); volume_t gases[MAX_CYLINDERS] = {}; get_gas_used(d, gases); - QString volumes = get_volume_string(gases[0], TRUE); + QString volumes = get_volume_string(gases[0], true); int mean[MAX_CYLINDERS], duration[MAX_CYLINDERS]; per_cylinder_mean_depth(d, select_dc(&d->dc), mean, duration); volume_t sac; QString SACs; if (mean[0] && duration[0]) { sac.mliter = gases[0].mliter * 1000.0 / (depth_to_mbar(mean[0], d) * duration[0] / 60.0); - SACs = get_volume_string(sac, TRUE).append(tr("/min")); + SACs = get_volume_string(sac, true).append(tr("/min")); } else { SACs = QString(tr("unknown")); } for(int i=1; i < MAX_CYLINDERS && gases[i].mliter != 0; i++) { - volumes.append("\n" + get_volume_string(gases[i], TRUE)); + volumes.append("\n" + get_volume_string(gases[i], true)); if (duration[i]) { sac.mliter = gases[i].mliter * 1000.0 / (depth_to_mbar(mean[i], d) * duration[i] / 60); - SACs.append("\n" + get_volume_string(sac, TRUE).append(tr("/min"))); + SACs.append("\n" + get_volume_string(sac, true).append(tr("/min"))); } else { SACs.append("\n"); } @@ -509,17 +509,17 @@ void MainTab::updateDiveInfo(int dive) ui.salinityText->setText(QString("%1g/l").arg(d->salinity/10.0)); else ui.salinityText->clear(); - ui.depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, TRUE)); - ui.depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, TRUE)); - ui.depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, TRUE)); - ui.sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, TRUE).append(tr("/min"))); - ui.sacLimits->setMinimum(get_volume_string(stats_selection.min_sac, TRUE).append(tr("/min"))); - ui.sacLimits->setAverage(get_volume_string(stats_selection.avg_sac, TRUE).append(tr("/min"))); + ui.depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true)); + ui.depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true)); + ui.depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, true)); + ui.sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, true).append(tr("/min"))); + ui.sacLimits->setMinimum(get_volume_string(stats_selection.min_sac, true).append(tr("/min"))); + ui.sacLimits->setAverage(get_volume_string(stats_selection.avg_sac, true).append(tr("/min"))); ui.divesAllText->setText(QString::number(stats_selection.selection_size)); temp.mkelvin = stats_selection.max_temp; - ui.tempLimits->setMaximum(get_temperature_string(temp, TRUE)); + ui.tempLimits->setMaximum(get_temperature_string(temp, true)); temp.mkelvin = stats_selection.min_temp; - ui.tempLimits->setMinimum(get_temperature_string(temp, TRUE)); + ui.tempLimits->setMinimum(get_temperature_string(temp, true)); if (stats_selection.combined_temp && stats_selection.combined_count) { const char *unit; get_temp_units(0, &unit); @@ -580,7 +580,7 @@ void MainTab::acceptChanges() if (mainWindow() && mainWindow()->dive_list()->selectedTrips().count() == 1) { if (notesBackup[NULL].notes != ui.notes->toPlainText() || notesBackup[NULL].location != ui.location->text()) - mark_divelist_changed(TRUE); + mark_divelist_changed(true); } else { struct dive *curr = current_dive; //Reset coordinates field, in case it contains garbage. @@ -597,7 +597,7 @@ void MainTab::acceptChanges() notesBackup[curr].datetime != ui.dateTimeEdit->dateTime().toString() || notesBackup[curr].visibility != ui.rating->currentStars() || notesBackup[curr].tags != ui.tagWidget->text()) { - mark_divelist_changed(TRUE); + mark_divelist_changed(true); } if (notesBackup[curr].location != ui.location->text() || notesBackup[curr].coordinates != ui.coordinates->text()) { @@ -609,7 +609,7 @@ void MainTab::acceptChanges() if (editMode == MANUALLY_ADDED_DIVE) { DivePlannerPointsModel::instance()->copyCylinders(curr); } else if (editMode != ADD && cylindersModel->changed) { - mark_divelist_changed(TRUE); + mark_divelist_changed(true); Q_FOREACH (dive *d, notesBackup.keys()) { for (int i = 0; i < MAX_CYLINDERS; i++) { if (notesBackup.keys().count() > 1) @@ -622,7 +622,7 @@ void MainTab::acceptChanges() } if (weightModel->changed) { - mark_divelist_changed(TRUE); + mark_divelist_changed(true); Q_FOREACH (dive *d, notesBackup.keys()) { for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++) { d->weightsystem[i] = multiEditEquipmentPlaceholder.weightsystem[i]; @@ -644,7 +644,7 @@ void MainTab::acceptChanges() current_dive->number = get_dive(dive_table.nr - 2)->number + 1; DivePlannerPointsModel::instance()->cancelPlan(); mainWindow()->showProfile(); - mark_divelist_changed(TRUE); + mark_divelist_changed(true); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING); } // each dive that was selected might have had the temperatures in its active divecomputer changed diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index a3cb5d4a8..a7a6346ad 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -149,7 +149,7 @@ void MainWindow::on_actionClose_triggered() QMessageBox::warning(this, tr("Warning"), tr("Please save or cancel the current dive edit before closing the file.")); return; } - if (unsaved_changes() && (askSaveChanges() == FALSE)) + if (unsaved_changes() && (askSaveChanges() == false)) return; /* free the dives and trips */ @@ -162,7 +162,7 @@ void MainWindow::on_actionClose_triggered() existing_filename = NULL; cleanUpEmpty(); - mark_divelist_changed(FALSE); + mark_divelist_changed(false); clear_events(); } @@ -246,7 +246,7 @@ void MainWindow::on_actionQuit_triggered() QMessageBox::warning(this, tr("Warning"), tr("Please save or cancel the current dive edit before closing the file.")); return; } - if (unsaved_changes() && (askSaveChanges() == FALSE)) + if (unsaved_changes() && (askSaveChanges() == false)) return; writeSettings(); QApplication::quit(); @@ -560,7 +560,7 @@ bool MainWindow::askSaveChanges() #define GET_BOOL(name, field) \ v = s.value(QString(name)); \ if (v.isValid()) \ - prefs.field = v.toInt() ? TRUE : FALSE; \ + prefs.field = v.toInt() ? true : false; \ else \ prefs.field = default_prefs.field @@ -704,7 +704,7 @@ void MainWindow::closeEvent(QCloseEvent *event) helpView->deleteLater(); } - if (unsaved_changes() && (askSaveChanges() == FALSE)) { + if (unsaved_changes() && (askSaveChanges() == false)) { event->ignore(); return; } @@ -749,9 +749,9 @@ void MainWindow::file_save_as(void) ui.InfoWidget->acceptChanges(); save_dives(filename.toUtf8().data()); - set_filename(filename.toUtf8().data(), TRUE); + set_filename(filename.toUtf8().data(), true); setTitle(MWTF_FILENAME); - mark_divelist_changed(FALSE); + mark_divelist_changed(false); } } @@ -774,7 +774,7 @@ void MainWindow::file_save(void) current_def_dir.mkpath(current_def_dir.absolutePath()); } save_dives(existing_filename); - mark_divelist_changed(FALSE); + mark_divelist_changed(false); } void MainWindow::showError(QString message) @@ -822,7 +822,7 @@ void MainWindow::importFiles(const QStringList fileNames) error = NULL; } } - process_dives(TRUE, FALSE); + process_dives(true, false); refreshDisplay(); } @@ -837,7 +837,7 @@ void MainWindow::loadFiles(const QStringList fileNames) for (int i = 0; i < fileNames.size(); ++i) { fileNamePtr = QFile::encodeName(fileNames.at(i)); parse_file(fileNamePtr.data(), &error); - set_filename(fileNamePtr.data(), TRUE); + set_filename(fileNamePtr.data(), true); setTitle(MWTF_FILENAME); if (error != NULL) { @@ -846,7 +846,7 @@ void MainWindow::loadFiles(const QStringList fileNames) } } - process_dives(FALSE, FALSE); + process_dives(false, false); refreshDisplay(); ui.actionAutoGroup->setChecked(autogroup); @@ -869,7 +869,7 @@ void MainWindow::on_actionImportDiveLog_triggered() if (csvFiles.size()) { DiveLogImportDialog *diveLogImport = new DiveLogImportDialog(&csvFiles); diveLogImport->show(); - process_dives(TRUE, FALSE); + process_dives(true, false); refreshDisplay(); } } diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 1e22f7da0..82aa3126d 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -112,23 +112,23 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const break; case SIZE: if (cyl->type.size.mliter) - ret = get_volume_string(cyl->type.size, TRUE, cyl->type.workingpressure.mbar); + ret = get_volume_string(cyl->type.size, true, cyl->type.workingpressure.mbar); break; case WORKINGPRESS: if (cyl->type.workingpressure.mbar) - ret = get_pressure_string(cyl->type.workingpressure, TRUE); + ret = get_pressure_string(cyl->type.workingpressure, true); break; case START: if (cyl->start.mbar) - ret = get_pressure_string(cyl->start, TRUE); + ret = get_pressure_string(cyl->start, true); else if (cyl->sample_start.mbar) - ret = get_pressure_string(cyl->sample_start, TRUE); + ret = get_pressure_string(cyl->sample_start, true); break; case END: if (cyl->end.mbar) - ret = get_pressure_string(cyl->end, TRUE); + ret = get_pressure_string(cyl->end, true); else if (cyl->sample_end.mbar) - ret = get_pressure_string(cyl->sample_end, TRUE); + ret = get_pressure_string(cyl->sample_end, true); break; case O2: ret = percent_string(cyl->gasmix.o2); @@ -137,7 +137,7 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const ret = percent_string(cyl->gasmix.he); break; case DEPTH: - ret = get_depth_string(cyl->depth, TRUE); + ret = get_depth_string(cyl->depth, true); break; } break; @@ -211,7 +211,7 @@ bool CylindersModel::setData(const QModelIndex& index, const QVariant& value, in QModelIndexList matches = tanks->match(tanks->index(0,0), Qt::DisplayRole, cyl->type.description); cyl->type.size = string_to_volume(vString.toUtf8().data(), cyl->type.workingpressure); - mark_divelist_changed(TRUE); + mark_divelist_changed(true); if (!matches.isEmpty()) tanks->setData(tanks->index(matches.first().row(), TankInfoModel::ML), cyl->type.size.mliter); changed = true; @@ -394,7 +394,7 @@ QVariant WeightModel::data(const QModelIndex& index, int role) const ret = gettextFromC::instance()->tr(ws->description); break; case WEIGHT: - ret = get_weight_string(ws->weight, TRUE); + ret = get_weight_string(ws->weight, true); break; } break; @@ -647,7 +647,7 @@ bool WSInfoModel::setData(const QModelIndex& index, const QVariant& value, int r break; } emit dataChanged(index, index); - return TRUE; + return true; } void WSInfoModel::clear() @@ -776,7 +776,7 @@ bool TankInfoModel::setData(const QModelIndex& index, const QVariant& value, int break; } emit dataChanged(index, index); - return TRUE; + return true; } void TankInfoModel::clear() @@ -1107,7 +1107,7 @@ bool DiveItem::setData(const QModelIndex& index, const QVariant& value, int role d = getDiveById(diveId); Q_ASSERT(d != NULL); d->number = value.toInt(); - mark_divelist_changed(TRUE); + mark_divelist_changed(true); return true; } @@ -1400,7 +1400,7 @@ void DiveComputerModel::dropWorkingList() void DiveComputerModel::keepWorkingList() { if (dcList.dcMap != dcWorkingMap) - mark_divelist_changed(TRUE); + mark_divelist_changed(true); dcList.dcMap = dcWorkingMap; } @@ -1530,7 +1530,7 @@ void YearlyStatisticsModel::update_yearly_stats() } - if (stats_by_trip != NULL && stats_by_trip[0].is_trip == TRUE) { + if (stats_by_trip != NULL && stats_by_trip[0].is_trip == true) { YearStatisticsItem *item = new YearStatisticsItem(stats_by_trip[0]); for (i = 1; stats_by_trip != NULL && stats_by_trip[i].is_trip; ++i) { YearStatisticsItem *iChild = new YearStatisticsItem(stats_by_trip[i]); diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index 5bb55d11b..5334d4565 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -183,8 +183,8 @@ void ProfileGraphicsView::addBookmark() QPointF scenePos = mapToScene(viewPos); int seconds = scenePos.x() / gc.maxx * (gc.rightx - gc.leftx) + gc.leftx; add_event(current_dc, seconds, SAMPLE_EVENT_BOOKMARK, 0, 0, "bookmark"); - mark_divelist_changed(TRUE); - plot(current_dive, TRUE); + mark_divelist_changed(true); + plot(current_dive, true); } void ProfileGraphicsView::changeGas() @@ -198,8 +198,8 @@ void ProfileGraphicsView::changeGas() validate_gas(gas.toUtf8().constData(), &o2, &he); int seconds = scenePos.x() / gc.maxx * (gc.rightx - gc.leftx) + gc.leftx; add_gas_switch_event(current_dive, current_dc, seconds, get_gasidx(current_dive, o2, he)); - mark_divelist_changed(TRUE); - plot(current_dive, TRUE); + mark_divelist_changed(true); + plot(current_dive, true); } void ProfileGraphicsView::hideEvents() @@ -220,7 +220,7 @@ void ProfileGraphicsView::hideEvents() } } } - plot(current_dive, TRUE); + plot(current_dive, true); } } @@ -229,7 +229,7 @@ void ProfileGraphicsView::unhideEvents() for (int i = 0; i < evn_used; i++) { ev_namelist[i].plot_ev = true; } - plot(current_dive, TRUE); + plot(current_dive, true); } void ProfileGraphicsView::removeEvent() @@ -251,8 +251,8 @@ void ProfileGraphicsView::removeEvent() *ep = event->next; free(event); } - mark_divelist_changed(TRUE); - plot(current_dive, TRUE); + mark_divelist_changed(true); + plot(current_dive, true); } } @@ -348,7 +348,7 @@ void ProfileGraphicsView::clear() void ProfileGraphicsView::refresh() { clear(); - plot(current_dive, TRUE); + plot(current_dive, true); } void ProfileGraphicsView::setPrintMode(bool mode, bool grayscale) @@ -715,7 +715,7 @@ void ProfileGraphicsView::plot_cylinder_pressure_text() { int i; int mbar, cyl; - int seen_cyl[MAX_CYLINDERS] = { FALSE, }; + int seen_cyl[MAX_CYLINDERS] = { false, }; int last_pressure[MAX_CYLINDERS] = { 0, }; int last_time[MAX_CYLINDERS] = { 0, }; struct plot_data *entry; @@ -740,7 +740,7 @@ void ProfileGraphicsView::plot_cylinder_pressure_text() plot_gas_value(mbar, entry->sec, LEFT, TOP, get_o2(&dive->cylinder[cyl].gasmix), get_he(&dive->cylinder[cyl].gasmix)); - seen_cyl[cyl] = TRUE; + seen_cyl[cyl] = true; } } last_pressure[cyl] = mbar; @@ -884,8 +884,8 @@ void ProfileGraphicsView::plot_cylinder_pressure() { int i; int last_index = -1; - int lift_pen = FALSE; - int first_plot = TRUE; + int lift_pen = false; + int first_plot = true; if (!get_cylinder_pressure_range(&gc)) return; @@ -899,10 +899,10 @@ void ProfileGraphicsView::plot_cylinder_pressure() mbar = GET_PRESSURE(entry); if (entry->cylinderindex != last_index) { - lift_pen = TRUE; + lift_pen = true; } if (!mbar) { - lift_pen = TRUE; + lift_pen = true; continue; } @@ -921,10 +921,10 @@ void ProfileGraphicsView::plot_cylinder_pressure() item->setPen(pen); scene()->addItem(item); } else { - first_plot = FALSE; + first_plot = false; from = QPointF(SCALEGC(entry->sec, mbar)); } - lift_pen = FALSE; + lift_pen = false; } else { to = QPointF(SCALEGC(entry->sec, mbar)); QGraphicsLineItem *item = new QGraphicsLineItem(from.x(), from.y(), to.x(), to.y()); diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h index b8e939ff8..1be02bcb1 100644 --- a/qt-ui/profilegraphics.h +++ b/qt-ui/profilegraphics.h @@ -100,7 +100,7 @@ private: class EventItem : public QGraphicsPixmapItem { public: - explicit EventItem(struct event *ev, QGraphicsItem* parent = 0, bool grayscale = FALSE); + explicit EventItem(struct event *ev, QGraphicsItem* parent = 0, bool grayscale = false); struct event* ev; private: @@ -131,10 +131,10 @@ public: enum Mode{DIVE, PLAN}; ProfileGraphicsView(QWidget* parent = 0); - void plot(struct dive *d, bool forceRedraw = FALSE); + void plot(struct dive *d, bool forceRedraw = false); bool eventFilter(QObject* obj, QEvent* event); void clear(); - void setPrintMode(bool mode, bool grayscale = FALSE); + void setPrintMode(bool mode, bool grayscale = false); protected: void resizeEvent(QResizeEvent *event); diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 4f2b27702..6fd88f5af 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -142,7 +142,7 @@ void ShiftTimesDialog::buttonClicked(QAbstractButton* button) // DANGER, DANGER - this could get our dive_table unsorted... shift_times(amount); sort_table(&dive_table); - mark_divelist_changed(TRUE); + mark_divelist_changed(true); mainWindow()->dive_list()->rememberSelection(); mainWindow()->refreshDisplay(); mainWindow()->dive_list()->restoreSelection(); diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 583000ff0..6e1992a4d 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -34,8 +34,8 @@ static bool is_automatic_fix(struct dive *gpsfix) if (gpsfix && gpsfix->location && (!strcmp(gpsfix->location, "automatic fix") || !strcmp(gpsfix->location, "Auto-created dive"))) - return TRUE; - return FALSE; + return true; + return false; } #define SAME_GROUP 6 * 3600 // six hours @@ -339,7 +339,7 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton* button) /* now merge the data in the gps_location table into the dive_table */ if (merge_locations_into_dives()) { - mark_divelist_changed(TRUE); + mark_divelist_changed(true); mainWindow()->globe()->repopulateLabels(); mainWindow()->globe()->centerOn(current_dive); mainWindow()->information()->updateDiveInfo(selected_dive); @@ -866,7 +866,7 @@ void DivelogsDeWebServices::buttonClicked(QAbstractButton* button) mainWindow()->showError(error); free(error); } - process_dives(TRUE, FALSE); + process_dives(true, false); mainWindow()->refreshDisplay(); /* store last entered user/pass in config */ |