From 507a7b4df918a091c45af35110fd2cdeff3713aa Mon Sep 17 00:00:00 2001 From: "Richard J. Moore" Date: Sun, 8 Sep 2013 10:23:17 +0100 Subject: Add missing notify signals for window title and icon changes. Adds signals for changes to the window title, window icon and window icon text. Change-Id: Ia0ddcb94dda2c9ea790edc061d487765024191cd Reviewed-by: Lars Knoll Reviewed-by: Marc Mutz --- src/widgets/kernel/qwidget.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/widgets/kernel/qwidget.cpp') diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 5532b04b22..eea44300e8 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5601,6 +5601,15 @@ void QWidgetPrivate::setWindowIconText_helper(const QString &title) setWindowIconText_sys(qt_setWindowTitle_helperHelper(title, q)); } +/*! + \fn void QWidget::windowIconTextChanged(const QString &iconText) + + This signal is emitted when the window's icon text has changed, with the + new \a iconText as an argument. + + \since 5.2 +*/ + void QWidget::setWindowIconText(const QString &iconText) { if (QWidget::windowIconText() == iconText) @@ -5612,8 +5621,19 @@ void QWidget::setWindowIconText(const QString &iconText) QEvent e(QEvent::IconTextChange); QApplication::sendEvent(this, &e); + + emit windowIconTextChanged(iconText); } +/*! + \fn void QWidget::windowTitleChanged(const QString &title) + + This signal is emitted when the window's title has changed, with the + new \a title as an argument. + + \since 5.2 +*/ + void QWidget::setWindowTitle(const QString &title) { if (QWidget::windowTitle() == title && !title.isEmpty() && !title.isNull()) @@ -5625,6 +5645,8 @@ void QWidget::setWindowTitle(const QString &title) QEvent e(QEvent::WindowTitleChange); QApplication::sendEvent(this, &e); + + emit windowTitleChanged(title); } @@ -5661,6 +5683,15 @@ void QWidgetPrivate::setWindowIcon_helper() } } +/*! + \fn void QWidget::windowIconChanged(const QIcon &icon) + + This signal is emitted when the window's icon has changed, with the + new \a icon as an argument. + + \since 5.2 +*/ + void QWidget::setWindowIcon(const QIcon &icon) { Q_D(QWidget); @@ -5674,6 +5705,8 @@ void QWidget::setWindowIcon(const QIcon &icon) d->setWindowIcon_sys(); d->setWindowIcon_helper(); + + emit windowIconChanged(icon); } -- cgit v1.2.3