Display more information in TT-RSS account root item tooltip.

This commit is contained in:
Martin Rotter 2015-12-14 13:28:40 +01:00
parent 1213c2e742
commit 480f78b1bf

View File

@ -111,9 +111,14 @@ QVariant TtRssServiceRoot::data(int column, int role) const {
switch (role) {
case Qt::ToolTipRole:
if (column == FDS_MODEL_TITLE_INDEX) {
return tr("Tiny Tiny RSS\n\nAccount ID: %3\nUsername: %1\nServer: %2").arg(m_network->username(),
m_network->url(),
QString::number(accountId()));
return tr("Tiny Tiny RSS\n\nAccount ID: %3\nUsername: %1\nServer: %2\n"
"Last error: %4\nLast login on: %5").arg(m_network->username(),
m_network->url(),
QString::number(accountId()),
NetworkFactory::networkErrorText(m_network->lastError()),
m_network->lastLoginTime().isValid() ?
m_network->lastLoginTime().toString(Qt::DefaultLocaleShortDate) :
QSL("-"));
}
else {
return ServiceRoot::data(column, role);