mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
Verification results are ordered by Type in alphabetical order.
This commit is contained in:
parent
b9740fd2a1
commit
370c12e78a
2 changed files with 7 additions and 2 deletions
|
@ -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<int> (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<int> (mRows.at (index.row()).mId.getType());
|
||||
|
||||
case Column_Id:
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue