diff --git a/src/ui/model/applistmodel.cpp b/src/ui/model/applistmodel.cpp index b6bab713..3402d968 100644 --- a/src/ui/model/applistmodel.cpp +++ b/src/ui/model/applistmodel.cpp @@ -286,7 +286,7 @@ SqliteDb *AppListModel::sqliteDb() const void AppListModel::initialize() { - setSortColumn(8); + setSortColumn(7); setSortOrder(Qt::DescendingOrder); connect(confManager(), &ConfManager::confChanged, this, &AppListModel::refresh); @@ -555,6 +555,9 @@ QString AppListModel::sqlOrderColumn() const nameColumn, // Creation Time ~ App ID }; + Q_ASSERT(sortColumn() >= 0 && sortColumn() < orderColumns.size() + && orderColumns.size() == postOrderColumns.size()); + const auto &columnsStr = orderColumns.at(sortColumn()); const auto &postColumnsStr = postOrderColumns.at(sortColumn());