summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-11-30 19:37:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-14 08:56:02 +0100
commit92bd9aecfb69ebe525ba88dc78ce85e3ca7ed9c2 (patch)
tree782443b776a374680e2e4ec87a4409fea027ea4d /src/gui
parent1a653225f6c73d7ca32aa6cdcde45ba9462a7b72 (diff)
Fix empty window title regression, add application display name to window title
This increases consistency a lot: all windows and dialogs from a Qt application will show the app display name in the caption, on Windows and X11. This helps identifying which app a dialog belongs to, which is especially useful when the dialog is very generic and shows up unexpectedly. For compatibility reasons, the app name is added to the caption only if setApplicationDisplayName() was called -- or if the caption would be completely empty. The standard Qt4 case (setWindowTitle + no display name) is unchanged. Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp
index 88dccdb6ce..82547b04ec 100644
--- a/src/gui/kernel/qplatformwindow.cpp
+++ b/src/gui/kernel/qplatformwindow.cpp
@@ -247,7 +247,12 @@ void QPlatformWindow::setParent(const QPlatformWindow *parent)
}
/*!
- Reimplement to set the window title to \a title
+ Reimplement to set the window title to \a title.
+
+ The implementation might want to append the application display name to
+ the window title, like Windows and Linux do.
+
+ \sa QGuiApplication::applicationDisplayName()
*/
void QPlatformWindow::setWindowTitle(const QString &title) { Q_UNUSED(title); }