[PATCH] Clean up some typos

Tomaz Canabrava tcanabrava at kde.org
Tue May 14 05:05:35 PDT 2013


:)
Appreciate - not my first language.


2013/5/14 <subsurface at henrik.synth.no>

> 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>
> ---
>
>
>
> ARRRGH, the TWO previous patches are bogus.  Try this one instead.  Bah.
>
> Henrik
>
>
>
>  qt-ui/divelistview.cpp    |  6 +++---
>  qt-ui/maintab.cpp         |  4 ++--
>  qt-ui/models.cpp          | 16 ++++++++--------
>  qt-ui/models.h            | 10 +++++-----
>  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 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..ac533fd 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 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
>
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130514/c1bbd56f/attachment.html>


More information about the subsurface mailing list