Skip to content

Commit

Permalink
feat(registry): report docset version in Qt::ToolTipRole
Browse files Browse the repository at this point in the history
Fixes #1096.
  • Loading branch information
trollixx committed Oct 17, 2019
1 parent c4ad995 commit a8e4147
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libs/registry/listmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ QVariant ListModel::data(const QModelIndex &index, int role) const
default:
return QVariant();
}
case Qt::ToolTipRole:
switch (indexLevel(index)) {
case Level::DocsetLevel: {
const auto docset = itemInRow(index.row())->docset;
return tr("Version: %1r%2").arg(docset->version()).arg(docset->revision());
}
default:
return QVariant();
}
case ItemDataRole::UrlRole:
switch (indexLevel(index)) {
case Level::DocsetLevel:
Expand Down

0 comments on commit a8e4147

Please sign in to comment.