summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-12-14 18:25:03 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-06 18:39:32 +0100
commitca19cba2ac3cf9785b9a2211c4ba7d1e14d87bf2 (patch)
tree68d008d03971e2a98699ccf1128f59043e22d058 /src/plugins/platforms/windows
parent132ba92ec2d672c44c3fc26b43b0293045d36586 (diff)
Factorize code for formatting window titles into QPlatformWindow.
Change-Id: I0dcccd08916fc2ea1b795681e9b98a9550ef51b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 5d6d4620b7..2708d7d428 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1216,18 +1216,7 @@ void QWindowsWindow::setWindowTitle(const QString &title)
if (QWindowsContext::verboseWindows)
qDebug() << __FUNCTION__ << this << window() <<title;
if (m_data.hwnd) {
-
- QString fullTitle = title;
- if (QGuiApplicationPrivate::displayName) {
- // Append display name, if set.
- if (!fullTitle.isEmpty())
- fullTitle += QStringLiteral(" - ");
- fullTitle += *QGuiApplicationPrivate::displayName;
- } else if (fullTitle.isEmpty()) {
- // Don't let the window title be completely empty, use the app name as fallback.
- fullTitle = QCoreApplication::applicationName();
- }
-
+ const QString fullTitle = formatWindowTitle(title, QStringLiteral(" - "));
SetWindowText(m_data.hwnd, (const wchar_t*)fullTitle.utf16());
}
}