mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-30 01:58:41 -04:00
Display database path in root group tooltip
When mousing over the root group entry, show the file path for the current database. Fixes #4038
This commit is contained in:
parent
50e52df04b
commit
ca471e9986
1 changed files with 7 additions and 0 deletions
|
@ -142,6 +142,13 @@ QVariant GroupModel::data(const QModelIndex& index, int role) const
|
||||||
font.setStrikeOut(true);
|
font.setStrikeOut(true);
|
||||||
}
|
}
|
||||||
return font;
|
return font;
|
||||||
|
} else if (role == Qt::ToolTipRole) {
|
||||||
|
QString tooltip;
|
||||||
|
if (!group->parentGroup()) {
|
||||||
|
// only show a tooltip for the root group
|
||||||
|
tooltip = m_db->filePath();
|
||||||
|
}
|
||||||
|
return tooltip;
|
||||||
} else {
|
} else {
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue