Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Geyer <debfx@fobos.de>2011-12-25 22:47:41 +0400
committerFelix Geyer <debfx@fobos.de>2011-12-25 22:47:41 +0400
commit62e7ba6e55dc6044a97fbfb5bff0550e3f200b26 (patch)
tree30331ff73562065adc7a9e0d05c777be18192b01 /src
parent35066bca8b0c4a0cb391581c1991070fb2b846c0 (diff)
Fix tab names and add tab tooltips.
Diffstat (limited to 'src')
-rw-r--r--src/gui/DatabaseManager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/DatabaseManager.cpp b/src/gui/DatabaseManager.cpp
index ad0c8b609..1096982cd 100644
--- a/src/gui/DatabaseManager.cpp
+++ b/src/gui/DatabaseManager.cpp
@@ -191,22 +191,23 @@ void DatabaseManager::updateTabName(Database* db)
QString tabName;
if (dbStruct.file) {
-
- QString filename = QFileInfo(*dbStruct.file).completeBaseName();
+ QFileInfo fileInfo(*dbStruct.file);
if (db->metadata()->name().isEmpty()) {
- tabName = filename;
+ tabName = fileInfo.fileName();
}
else {
- tabName = QString("%1 [%2]").arg(db->metadata()->name().arg(filename));
+ tabName = db->metadata()->name();
}
+
+ m_tabWidget->setTabToolTip(index, fileInfo.absoluteFilePath());
}
else {
if (db->metadata()->name().isEmpty()) {
tabName = tr("New database");
}
else {
- tabName = QString("%1 [%2]").arg(db->metadata()->name().arg(tr("New database")));
+ tabName = QString("%1 [%2]").arg(db->metadata()->name(), tr("New database"));
}
}