From d5db1f2bb5d520277f5d3ddfa5a50c385aebc753 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 17 Sep 2009 19:56:18 +0200 Subject: Allow forcing an empty window title. When a user sets a window title on a window to an empty string we will not check if the value was an empty string before. This handles a special case on X11 and Windows when we set the window title to the application executable name by default if the user didn't provide the title, so if the user explicitely wants to remove the windowtitle completely and make it empty, he will be able to set it to an empty string. Reviewed-by: Olivier Goffart Reviewed-by: Prasanth Ullattil --- src/gui/kernel/qwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index c86012d..860b98b 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -5688,7 +5688,7 @@ void QWidget::setWindowIconText(const QString &iconText) void QWidget::setWindowTitle(const QString &title) { - if (QWidget::windowTitle() == title) + if (QWidget::windowTitle() == title && !title.isEmpty() && !title.isNull()) return; Q_D(QWidget); -- cgit v0.12