Skip to content

Commit

Permalink
Apply clang-tidy suggestion.
Browse files Browse the repository at this point in the history
  • Loading branch information
horacekj committed Dec 24, 2019
1 parent 1552edc commit b0e877a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/q-tree-num-widget-item.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
#include <QTreeWidgetItem>

class FirstNumTreeWidgetItem : public QTreeWidgetItem {
public:
FirstNumTreeWidgetItem(QTreeWidget* parent): QTreeWidgetItem(parent) {}
private:
bool operator<(const QTreeWidgetItem &other) const {
int column = treeWidget()->sortColumn();
if (column == 0)
return text(column).toInt() < other.text(column).toInt();
return text(column) < other.text(column);
}
public:
FirstNumTreeWidgetItem(QTreeWidget* parent): QTreeWidgetItem(parent) {}
private:
bool operator<(const QTreeWidgetItem &other) const override {
int column = treeWidget()->sortColumn();
if (column == 0)
return text(column).toInt() < other.text(column).toInt();
return text(column) < other.text(column);
}
};

#endif // QTREENUMWIDGETITEM_H

0 comments on commit b0e877a

Please sign in to comment.