better formatting of tooltip valies in article list
This commit is contained in:
parent
b35c977545
commit
2a172bf3ef
2 changed files with 7 additions and 9 deletions
|
@ -26,7 +26,7 @@
|
||||||
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
<url type="donation">https://github.com/sponsors/martinrotter</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="4.0.3" date="2021-09-30"/>
|
<release version="4.0.3" date="2021-10-01"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
|
|
@ -344,14 +344,12 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QVariant dta = m_cache->containsData(idx.row())
|
if (idx.column() == MSG_DB_SCORE_INDEX) {
|
||||||
? m_cache->data(idx)
|
return data(idx, Qt::ItemDataRole::EditRole);
|
||||||
: QSqlQueryModel::data(idx);
|
}
|
||||||
QString txt = dta.toString().size() > 300
|
else {
|
||||||
? (dta.toString().left(300) + QSL("..."))
|
return data(idx, Qt::ItemDataRole::DisplayRole);
|
||||||
: dta.toString().left(300);
|
}
|
||||||
|
|
||||||
return txt;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue