[PATCH] Convert more TRUE/FALSE to stdbools true/false

Anton Lundin glance at acc.umu.se
Wed Feb 19 02:34:54 UTC 2014


In Qt5, Qt doesn't define TRUE/FALSE anymore, so we need to stick to
stdbools to have Qt5 builds working.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 qt-ui/profile/diveplotdatamodel.cpp | 2 +-
 qt-ui/simplewidgets.cpp             | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index 1111965..f799135 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -154,6 +154,6 @@ void DivePlotDataModel::calculateDecompression()
 		return;
 	struct divecomputer *dc = select_dc(&d->dc);
 	init_decompression(d);
-	calculate_deco_information(d, dc, &pInfo, FALSE);
+	calculate_deco_information(d, dc, &pInfo, false);
 	dataChanged(index(0, CEILING), index(pInfo.nr-1, TISSUE_16));
 }
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index e73b235..565df49 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -186,7 +186,7 @@ void ShiftImageTimesDialog::syncCameraClicked()
 		return;
 
 	picture.load(fileNames.at(0));
-	ui.displayDC->setEnabled(TRUE);
+	ui.displayDC->setEnabled(true);
 	QGraphicsScene *scene = new QGraphicsScene (this);
 
 	scene->addPixmap(picture.scaled(ui.DCImage->size()));
@@ -244,9 +244,9 @@ time_t ShiftImageTimesDialog::amount() const
 void ShiftImageTimesDialog::setOffset(time_t offset)
 {
 	if (offset >= 0) {
-		ui.forward->setChecked(TRUE);
+		ui.forward->setChecked(true);
 	} else {
-		ui.backwards->setChecked(TRUE);
+		ui.backwards->setChecked(true);
 		offset *= -1;
 	}
 	ui.timeEdit->setTime(QTime(offset / 3600, (offset % 3600) / 60, offset % 60));
-- 
1.8.3.2



More information about the subsurface mailing list