diff options
author | Henrik Brautaset Aronsen <subsurface@henrik.synth.no> | 2013-05-14 09:28:30 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-14 05:24:28 -0400 |
commit | f9598f062cf8684dd92ac56530c3758e3b1a6d9d (patch) | |
tree | 32937d06e1caf37b8693fb899f10226b15ab0e71 | |
parent | c07e183f1f313316a411cfa4aac09379092add7d (diff) | |
download | subsurface-f9598f062cf8684dd92ac56530c3758e3b1a6d9d.tar.gz |
Clean up some typos
Cosmetic commit to clean up some of the annoying typos in qt-ui
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/divelistview.cpp | 6 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 4 | ||||
-rw-r--r-- | qt-ui/models.cpp | 16 | ||||
-rw-r--r-- | qt-ui/models.h | 10 | ||||
-rw-r--r-- | qt-ui/profilegraphics.cpp | 4 |
5 files changed, 20 insertions, 20 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index a209118e0..d192d84aa 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 d8a966ae1..70cb3caea 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 68ab402cd..0b933aeb1 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 307cdf5c3..ac533fd71 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; }; @@ -94,7 +94,7 @@ public: virtual QVariant data ( int column, int role ) const; int row() const; - QList<TreeItemDT *> childs; + QList<TreeItemDT *> children; TreeItemDT *parent; }; diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index 571214f6f..8f25f1932 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)) { |