diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-12-28 06:01:43 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-12-28 06:01:43 -0500 |
| commit | 9b3e91b53e769aec2622eb79509945c09fca8897 (patch) | |
| tree | 1f619884298e51bba99ec26bd41b8f2568119c01 | |
| parent | c2c0f7c98d4b61314c679e0fed7fac914f4f1284 (diff) | |
renamed DownloadList::lessThan to lessThanPredicate and added a comment that it's used with the filter widget
| -rw-r--r-- | src/downloadlist.cpp | 2 | ||||
| -rw-r--r-- | src/downloadlist.h | 4 | ||||
| -rw-r--r-- | src/downloadstab.cpp | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index 3cfc1fea..a5c284e6 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -209,7 +209,7 @@ void DownloadList::update(int row) log::error("invalid row {} in download list, update failed", row);
}
-bool DownloadList::lessThan(const QModelIndex &left, const QModelIndex &right)
+bool DownloadList::lessThanPredicate(const QModelIndex &left, const QModelIndex &right)
{
int leftIndex = left.row();
int rightIndex = right.row();
diff --git a/src/downloadlist.h b/src/downloadlist.h index c40bbac5..2171c013 100644 --- a/src/downloadlist.h +++ b/src/downloadlist.h @@ -85,7 +85,9 @@ public: **/
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- bool lessThan(const QModelIndex &left, const QModelIndex &right);
+ // used in DownloadsTab as the sorting predicate for the filter widget
+ //
+ bool lessThanPredicate(const QModelIndex &left, const QModelIndex &right);
public slots:
diff --git a/src/downloadstab.cpp b/src/downloadstab.cpp index f5258724..a0602ede 100644 --- a/src/downloadstab.cpp +++ b/src/downloadstab.cpp @@ -22,7 +22,7 @@ DownloadsTab::DownloadsTab(OrganizerCore& core, Ui::MainWindow* mwui) m_filter.setEdit(ui.filter); m_filter.setList(ui.list); m_filter.setSortPredicate([sourceModel](auto&& left, auto&& right) { - return sourceModel->lessThan(left, right); + return sourceModel->lessThanPredicate(left, right); }); connect(ui.refresh, &QPushButton::clicked, [&]{ refresh(); }); |
