[PATCH] Clean up some typos

subsurface at henrik.synth.no subsurface at henrik.synth.no
Tue May 14 00:25:56 PDT 2013


From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>

Cosmetic commit to clean up some of the annoying typos in qt-ui

Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---


Use this patch instead of the one I just sent.  I forgot to commit one of the files.

Henrik



 qt-ui/divelistview.cpp    |  6 +++---
 qt-ui/maintab.cpp         |  4 ++--
 qt-ui/models.cpp          | 16 ++++++++--------
 qt-ui/models.h            |  8 ++++----
 qt-ui/profilegraphics.cpp |  4 ++--
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index a209118..d192d84 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -61,9 +61,9 @@ void DiveListView::selectionChanged(const QItemSelection& selected, const QItemS
 	Q_FOREACH(const QModelIndex& index, deselected.indexes()) {
 		const QAbstractItemModel *model = index.model();
 		struct dive *dive = (struct dive*) model->data(index, TreeItemDT::DIVE_ROLE).value<void*>();
-		if (!dive) { // is's a trip!
+		if (!dive) { // it's a trip!
 			if (model->rowCount(index)) {
-				expand(index);	// leave this - even if it looks like it shouldn't be here. looks like I'v found a Qt bug.
+				expand(index);	// leave this - even if it looks like it shouldn't be here. looks like I've found a Qt bug.
 						// the subselection is removed, but the painting is not. this cleans the area.
 			}
 		} else if (!parents.contains(index.parent())) {
@@ -74,7 +74,7 @@ void DiveListView::selectionChanged(const QItemSelection& selected, const QItemS
 	Q_FOREACH(const QModelIndex& index, selected.indexes()) {
 		const QAbstractItemModel *model = index.model();
 		struct dive *dive = (struct dive*) model->data(index, TreeItemDT::DIVE_ROLE).value<void*>();
-		if (!dive) { // is's a trip!
+		if (!dive) { // it's a trip!
 			if (model->rowCount(index)) {
 				QItemSelection selection;
 				selection.select(index.child(0,0), index.child(model->rowCount(index) -1 , 0));
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index d8a966a..70cb3ca 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -90,7 +90,7 @@ void MainTab::updateDiveInfo(int dive)
 	// it will be called whenever a new dive is selected
 	// I'm already populating the 'notes' box
 	// to show how it can be done.
-	// If you are unsure what's the name of anything,
+	// If you are unsure about the name of something,
 	// open the file maintab.ui on the designer
 	// click on the item and check its objectName,
 	// the access is ui->objectName from here on.
@@ -136,7 +136,7 @@ void MainTab::updateDiveInfo(int dive)
 		ui->airPressureText->clear();
 	}
 	/* statisticsTab*/
-	/* we can access the stats_selection struct but how to we ensure the relevant dives are selected
+	/* we can access the stats_selection struct, but how do we ensure the relevant dives are selected
 	 * if we don't use the gtk widget to drive this?
 	 * Maybe call process_selected_dives? Or re-write to query our Qt list view.
 	 */
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 68ab402..0b933ae 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -336,13 +336,13 @@ void TankInfoModel::update()
 
 TreeItemDT::~TreeItemDT()
 {
-	qDeleteAll(childs);
+	qDeleteAll(children);
 }
 
 int TreeItemDT::row() const
 {
 	if (parent)
-		return parent->childs.indexOf(const_cast<TreeItemDT*>(this));
+		return parent->children.indexOf(const_cast<TreeItemDT*>(this));
 
 	return 0;
 }
@@ -637,7 +637,7 @@ const
 
 	TreeItemDT* parentItem = (!parent.isValid()) ? rootItem : static_cast<TreeItemDT*>(parent.internalPointer());
 
-	TreeItemDT* childItem = parentItem->childs[row];
+	TreeItemDT* childItem = parentItem->children[row];
 
 	return (childItem) ? createIndex(row, column, childItem) : QModelIndex();
 }
@@ -665,7 +665,7 @@ int DiveTripModel::rowCount(const QModelIndex& parent) const
 	else
 		parentItem = static_cast<TreeItemDT*>(parent.internalPointer());
 
-	int amount = parentItem->childs.count();
+	int amount = parentItem->children.count();
 
 	return amount;
 }
@@ -684,19 +684,19 @@ void DiveTripModel::setupModelData()
 
 		if (!trip) {
 			diveItem->parent = rootItem;
-			rootItem->childs.push_back(diveItem);
+			rootItem->children.push_back(diveItem);
 			continue;
 		}
 		if (!trips.keys().contains(trip)) {
 			TripItem* tripItem  = new TripItem();
 			tripItem->trip = trip;
 			tripItem->parent = rootItem;
-			tripItem->childs.push_back(diveItem);
+			tripItem->children.push_back(diveItem);
 			trips[trip] = tripItem;
-			rootItem->childs.push_back(tripItem);
+			rootItem->children.push_back(tripItem);
 			continue;
 		}
 		TripItem* tripItem  = trips[trip];
-		tripItem->childs.push_back(diveItem);
+		tripItem->children.push_back(diveItem);
 	}
 }
diff --git a/qt-ui/models.h b/qt-ui/models.h
index 307cdf5..6752164 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -14,7 +14,7 @@
 #include "../divelist.h"
 
 /* Encapsulates the tank_info global variable
- * to show on Qt`s Model View System.*/
+ * to show on Qt's Model View System.*/
 class TankInfoModel : public QAbstractTableModel {
 Q_OBJECT
 public:
@@ -50,9 +50,9 @@ public:
 	void clear();
 	void update();
 private:
-	/* Since the dive doesn`t stores the number of cylinders that
-	 * it has ( max 8 ) and since I don`t want to make a
-	 * model-for-each-dive, let`s hack this here instead. */
+	/* Since the dive doesn't stores the number of cylinders that
+	 * it has (max 8) and since I don't want to make a
+	 * model-for-each-dive, let's hack this here instead. */
 	QMap<struct dive *, int> usedRows;
 };
 
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 571214f..8f25f19 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -663,7 +663,7 @@ void ProfileGraphicsView::plot_temperature_text()
 		/* don't print a temperature
 		 * if it's been less than 5min and less than a 2K change OR
 		 * if it's been less than 2min OR if the change from the
-		 * last print is less than .4K (and therefore less than 1F */
+		 * last print is less than .4K (and therefore less than 1F) */
 		if (((sec < last + 300) && (abs(mkelvin - last_printed_temp) < 2000)) ||
 			(sec < last + 120) ||
 			(abs(mkelvin - last_printed_temp) < 400))
@@ -806,7 +806,7 @@ void ProfileGraphicsView::plot_one_event(struct event *ev)
 	int i, depth = 0;
 	struct plot_info *pi = &gc.pi;
 
-	/* is plotting this event disabled? */
+	/* is plotting of this event disabled? */
 	if (ev->name) {
 		for (i = 0; i < evn_used; i++) {
 			if (! strcmp(ev->name, ev_namelist[i].ev_name)) {
-- 
1.8.2.2



More information about the subsurface mailing list