Handle entry/group title with %1 etc. correctly.

This commit is contained in:
Florian Geyer 2012-11-02 10:31:06 +01:00
parent 64394c0b15
commit 848abfc1a7

View File

@ -258,21 +258,14 @@ void EditEntryWidget::loadEntry(Entry* entry, bool create, bool history, const Q
m_history = history;
if (history) {
setHeadline(QString("%1 > %2")
.arg(parentName)
.arg(tr("Entry history")));
setHeadline(QString("%1 > %2").arg(parentName, tr("Entry history")));
}
else {
if (create) {
setHeadline(QString("%1 > %2")
.arg(parentName)
.arg(tr("Add entry")));
setHeadline(QString("%1 > %2").arg(parentName, tr("Add entry")));
}
else {
setHeadline(QString("%1 > %2 > %3")
.arg(parentName)
.arg(entry->title())
.arg(tr("Edit entry")));
setHeadline(QString("%1 > %2 > %3").arg(parentName, entry->title(), tr("Edit entry")));
}
}