Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2017-10-12 15:38:13 +0300
committerckamm <mail@ckamm.de>2017-10-17 10:47:57 +0300
commit17b1c83ae55504b1b0c91626a420ad855704d1db (patch)
tree781702baeb19a963129e87ff944ab20cc9845cee /src/gui/protocolwidget.h
parentb2a8ffc577a093cec3eb447834e5fe987d646a5f (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.h15
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
*/