From 370c12e78aa5f1666390a7e001232605b44a5de9 Mon Sep 17 00:00:00 2001 From: FedeWar Date: Tue, 21 Feb 2017 11:15:53 +0100 Subject: [PATCH 1/4] Verification results are ordered by Type in alphabetical order. --- apps/opencs/model/tools/reportmodel.cpp | 8 ++++++-- apps/opencs/view/tools/reporttable.cpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/opencs/model/tools/reportmodel.cpp b/apps/opencs/model/tools/reportmodel.cpp index 49de1d651..57f892b6b 100644 --- a/apps/opencs/model/tools/reportmodel.cpp +++ b/apps/opencs/model/tools/reportmodel.cpp @@ -37,14 +37,18 @@ int CSMTools::ReportModel::columnCount (const QModelIndex & parent) const QVariant CSMTools::ReportModel::data (const QModelIndex & index, int role) const { - if (role!=Qt::DisplayRole) + if (role!=Qt::DisplayRole && role!=Qt::UserRole) return QVariant(); switch (index.column()) { case Column_Type: - return static_cast (mRows.at (index.row()).mId.getType()); + if(role == Qt::UserRole) + return QString::fromUtf8 ( + mRows.at (index.row()).mId.getTypeName().c_str()); + else + return static_cast (mRows.at (index.row()).mId.getType()); case Column_Id: { diff --git a/apps/opencs/view/tools/reporttable.cpp b/apps/opencs/view/tools/reporttable.cpp index 58feda7c9..4d1456cd9 100644 --- a/apps/opencs/view/tools/reporttable.cpp +++ b/apps/opencs/view/tools/reporttable.cpp @@ -157,6 +157,7 @@ CSVTools::ReportTable::ReportTable (CSMDoc::Document& document, mProxyModel = new QSortFilterProxyModel (this); mProxyModel->setSourceModel (mModel); + mProxyModel->setSortRole(Qt::UserRole); setModel (mProxyModel); setColumnHidden (2, true); From 4e7f7cf84f339d8c1933649e43ddbc91bbb871dc Mon Sep 17 00:00:00 2001 From: FedeWar Date: Tue, 21 Feb 2017 11:49:04 +0100 Subject: [PATCH 2/4] Fixed tabs --- apps/opencs/model/tools/reportmodel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/opencs/model/tools/reportmodel.cpp b/apps/opencs/model/tools/reportmodel.cpp index 57f892b6b..867cb7595 100644 --- a/apps/opencs/model/tools/reportmodel.cpp +++ b/apps/opencs/model/tools/reportmodel.cpp @@ -44,11 +44,11 @@ QVariant CSMTools::ReportModel::data (const QModelIndex & index, int role) const { case Column_Type: - if(role == Qt::UserRole) - return QString::fromUtf8 ( - mRows.at (index.row()).mId.getTypeName().c_str()); - else - return static_cast (mRows.at (index.row()).mId.getType()); + if(role == Qt::UserRole) + return QString::fromUtf8 ( + mRows.at (index.row()).mId.getTypeName().c_str()); + else + return static_cast (mRows.at (index.row()).mId.getType()); case Column_Id: { From e9076088cae7973101a6e6d0fcb0de78394c4580 Mon Sep 17 00:00:00 2001 From: FedeWar Date: Tue, 21 Feb 2017 11:51:11 +0100 Subject: [PATCH 3/4] Another tab fix --- apps/opencs/model/tools/reportmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/opencs/model/tools/reportmodel.cpp b/apps/opencs/model/tools/reportmodel.cpp index 867cb7595..f9a1fdb0c 100644 --- a/apps/opencs/model/tools/reportmodel.cpp +++ b/apps/opencs/model/tools/reportmodel.cpp @@ -37,7 +37,7 @@ int CSMTools::ReportModel::columnCount (const QModelIndex & parent) const QVariant CSMTools::ReportModel::data (const QModelIndex & index, int role) const { - if (role!=Qt::DisplayRole && role!=Qt::UserRole) + if (role!=Qt::DisplayRole && role!=Qt::UserRole) return QVariant(); switch (index.column()) From 8e82c161c665a4ee9f34942604bfeea7193ddaea Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 23 Feb 2017 09:11:36 +0100 Subject: [PATCH 4/4] updated credits file --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 432b3ee1c..d7e011cd8 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -53,6 +53,7 @@ Programmers eroen escondida Evgeniy Mineev (sandstranger) + Federico Guerra (FedeWar) Fil Krynicki (filkry) Gašper Sedej gugus/gus