Commit 0f18cc5f authored by Łukasz Wojniłowicz's avatar Łukasz Wojniłowicz
Browse files

Ensure that length columns can be properly sorted

This fixes the case where entries sorted by source length look like
this:
1
10
2
instead of like this:
1
2
10
parent 13d6dc27
......@@ -242,9 +242,9 @@ QVariant CatalogTreeModel::data(const QModelIndex& index, int role) const
case CatalogModelColumns::Files:
return m_catalog->sourceFiles(index.row()).join('|');
case CatalogModelColumns::SourceLength:
return QString::number(m_catalog->msgidWithPlurals(index.row(), true).length());
return m_catalog->msgidWithPlurals(index.row(), true).length();
case CatalogModelColumns::TargetLength:
return QString::number(m_catalog->msgstrWithPlurals(index.row(), true).length());
return m_catalog->msgstrWithPlurals(index.row(), true).length();
default:
return {};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment