summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-02-27 14:12:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-27 18:27:42 +0100
commitd2cb81f8d9469e72d9c682c5f8832fbef31bed13 (patch)
treed38d6ac1c3558732b6409b951ec249c0e09cc193 /src/gui/kernel/qwindow.cpp
parent01a1f87368c8d1f1866790aa6ab3fb4964d93309 (diff)
Add missing notify signal for the QWindow::title property
Similary to QWidget's windowTitleChanged, QWindow should also have a windowTitleChanges signal that's emitted when the title changed and declared as notify signal for the title property, so that QML bindings can be written against it. Change-Id: I6f107c6f0b43d6a959bc2ef96492e1f3e4c28bfe Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 51548aa371..04a2615c81 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -727,9 +727,15 @@ Qt::WindowType QWindow::type() const
void QWindow::setTitle(const QString &title)
{
Q_D(QWindow);
- d->windowTitle = title;
+ bool changed = false;
+ if (d->windowTitle != title) {
+ d->windowTitle = title;
+ changed = true;
+ }
if (d->platformWindow)
d->platformWindow->setWindowTitle(title);
+ if (changed)
+ emit windowTitleChanged(title);
}
QString QWindow::title() const