diff options
author | Christian Kamm <mail@ckamm.de> | 2017-10-12 15:38:13 +0300 |
---|---|---|
committer | ckamm <mail@ckamm.de> | 2017-10-17 10:47:57 +0300 |
commit | 17b1c83ae55504b1b0c91626a420ad855704d1db (patch) | |
tree | 781702baeb19a963129e87ff944ab20cc9845cee /src/gui/protocolwidget.h | |
parent | b2a8ffc577a093cec3eb447834e5fe987d646a5f (diff) |
Activity: Allow sorting of issues and protocol #6086
The issues tab uses custom ordering where overall and summary sync
issues are displayed first. This ordering is preserved by creating
special sorting logic for the "time" column.
It needed special handling anyway, since sorting by time-string would
have yielded incorrect results.
Diffstat (limited to 'src/gui/protocolwidget.h')
-rw-r--r-- | src/gui/protocolwidget.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/protocolwidget.h b/src/gui/protocolwidget.h index 7e3a154a5..77bb641b4 100644 --- a/src/gui/protocolwidget.h +++ b/src/gui/protocolwidget.h @@ -35,6 +35,21 @@ namespace Ui { class Application; /** + * A QTreeWidgetItem with special sorting. + * + * It allows items for global entries to be moved to the top if the + * sorting section is the "Time" column. + */ +class SortedTreeWidgetItem : public QTreeWidgetItem +{ +public: + using QTreeWidgetItem::QTreeWidgetItem; + +private: + bool operator<(const QTreeWidgetItem &other) const override; +}; + +/** * @brief The ProtocolWidget class * @ingroup gui */ |