diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2016-04-06 23:09:30 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-04-30 23:59:23 +0200 |
commit | 00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2 (patch) | |
tree | c930ca4f0edae9bb2bbd1a9ce2fddb2ca5a7bf32 /application/VersionProxyModel.cpp | |
parent | 5ae3b2c11416eb897a08b0d9531843d0357332f8 (diff) | |
download | MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar.gz MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar.lz MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.tar.xz MultiMC-00e5968bd28ab1df33b3a39dbac8cda99aa2a0d2.zip |
NOISSUE Add a skeleton of the wonko system
Diffstat (limited to 'application/VersionProxyModel.cpp')
-rw-r--r-- | application/VersionProxyModel.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/application/VersionProxyModel.cpp b/application/VersionProxyModel.cpp index 70894592..22df7e09 100644 --- a/application/VersionProxyModel.cpp +++ b/application/VersionProxyModel.cpp @@ -11,6 +11,8 @@ public: VersionFilterModel(VersionProxyModel *parent) : QSortFilterProxyModel(parent) { m_parent = parent; + setSortRole(BaseVersionList::SortRole); + sort(0, Qt::DescendingOrder); } bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const @@ -30,14 +32,11 @@ public: auto versionString = data.toString(); if(it.value().exact) { - if (versionString != it.value().string) - { - return false; - } + return versionString == it.value().string; } - else if (!versionIsInInterval(versionString, it.value().string)) + else { - return false; + return versionIsInInterval(versionString, it.value().string); } } default: |