Correct window title when database name contains %1.

This commit is contained in:
Florian Geyer 2012-11-02 10:15:37 +01:00
parent 8748c76de2
commit 64394c0b15

View File

@ -341,7 +341,7 @@ void MainWindow::updateWindowTitle()
if (stackedWidgetIndex == 0 && tabWidgetIndex != -1) {
customWindowTitlePart = m_ui->tabWidget->tabText(tabWidgetIndex);
if (m_ui->tabWidget->readOnly(tabWidgetIndex)) {
customWindowTitlePart.append(" [%1]").arg(tr("read-only"));
customWindowTitlePart.append(QString(" [%1]").arg(tr("read-only")));
}
} else if (stackedWidgetIndex == 1) {
customWindowTitlePart = tr("Settings");
@ -351,7 +351,7 @@ void MainWindow::updateWindowTitle()
if (customWindowTitlePart.isEmpty()) {
windowTitle = BaseWindowTitle;
} else {
windowTitle = QString("%1 - %2").arg(customWindowTitlePart).arg(BaseWindowTitle);
windowTitle = QString("%1 - %2").arg(customWindowTitlePart, BaseWindowTitle);
}
setWindowTitle(windowTitle);