From 8c3e5700a14ff52c2dfff5ab1b1fb47d7240aa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Sat, 10 Mar 2012 14:31:15 +0100 Subject: Add two (forgotten) since 5.0 SHA for QWidget::hasHeightForWidth change: 466107107a85e7211c4b7f77b36ec50625657061 SHA for QAbstractItemDelegate::destoryeditor change 15f253a46aa45e2a9fa1055799fa2768ba49b9a3 Change-Id: Ic7e38c15f62eef22ab95414fad6e7b6c9c7d4f59 Reviewed-by: Girish Ramakrishnan Reviewed-by: Stephen Kelly --- src/widgets/kernel/qwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 1493f61972..be1782bc4d 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -9228,6 +9228,8 @@ int QWidget::heightForWidth(int w) const /*! + \Since 5.0 + Returns true if the widget's preferred height depends on its width; otherwise returns false. */ bool QWidget::hasHeightForWidth() const -- cgit v1.2.3 From a17907829e6b180f2bb4af9a8594996b2a0e531a Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 8 Mar 2012 16:10:10 +0100 Subject: Use pointers for QAccessibleEvent. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At least on mac g++ badly wants to copy the event and cannot use the copy ctor. The sensible solution is thus to use pointers. This is in line with QCoreApplication::sendEvent. Change-Id: Icb58852be351ab04ffa17069989d7a07d4b377da Reviewed-by: Jan-Arve Sæther --- src/widgets/kernel/qwhatsthis.cpp | 6 ++++-- src/widgets/kernel/qwidget.cpp | 35 ++++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 13 deletions(-) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp index 1c20b98139..114cde59e9 100644 --- a/src/widgets/kernel/qwhatsthis.cpp +++ b/src/widgets/kernel/qwhatsthis.cpp @@ -412,7 +412,8 @@ QWhatsThisPrivate::QWhatsThisPrivate() #endif } #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ContextHelpStart, this)); + QAccessibleEvent event(QAccessible::ContextHelpStart, this); + QAccessible::updateAccessibility(&event); #endif } @@ -424,7 +425,8 @@ QWhatsThisPrivate::~QWhatsThisPrivate() QApplication::restoreOverrideCursor(); #endif #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ContextHelpEnd, this)); + QAccessibleEvent event(QAccessible::ContextHelpEnd, this); + QAccessible::updateAccessibility(&event); #endif instance = 0; } diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index be1782bc4d..a4bb205b76 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5965,7 +5965,10 @@ void QWidget::setFocus(Qt::FocusReason reason) // menus update the focus manually and this would create bogus events if (!(f->inherits("QMenuBar") || f->inherits("QMenu") || f->inherits("QMenuItem"))) # endif - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, f)); + { + QAccessibleEvent event(QAccessible::Focus, f); + QAccessible::updateAccessibility(&event); + } #endif #ifndef QT_NO_GRAPHICSVIEW if (QWExtra *topData = window()->d_func()->extra) { @@ -6045,7 +6048,8 @@ void QWidget::clearFocus() #endif { #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this)); + QAccessibleEvent event(QAccessible::Focus, this); + QAccessible::updateAccessibility(&event); #endif } } @@ -7051,8 +7055,10 @@ void QWidgetPrivate::show_helper() qApp->d_func()->openPopup(q); #ifndef QT_NO_ACCESSIBILITY - if (q->windowType() != Qt::ToolTip) // Tooltips are read aloud twice in MS narrator. - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectShow, q)); + if (q->windowType() != Qt::ToolTip) { // Tooltips are read aloud twice in MS narrator. + QAccessibleEvent event(QAccessible::ObjectShow, q); + QAccessible::updateAccessibility(&event); + } #endif if (QApplicationPrivate::hidden_focus_widget == q) { @@ -7142,8 +7148,10 @@ void QWidgetPrivate::hide_helper() bs->removeDirtyWidget(q); #ifndef QT_NO_ACCESSIBILITY - if (wasVisible) - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectHide, q)); + if (wasVisible) { + QAccessibleEvent event(QAccessible::ObjectHide, q); + QAccessible::updateAccessibility(&event); + } #endif } @@ -7374,8 +7382,10 @@ void QWidgetPrivate::hideChildren(bool spontaneous) } qApp->d_func()->sendSyntheticEnterLeave(widget); #ifndef QT_NO_ACCESSIBILITY - if (!spontaneous) - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectHide, widget)); + if (!spontaneous) { + QAccessibleEvent event(QAccessible::ObjectHide, widget); + QAccessible::updateAccessibility(&event); + } #endif } } @@ -8250,7 +8260,8 @@ void QWidget::changeEvent(QEvent * event) #ifndef QT_NO_ACCESSIBILITY QAccessible::State s; s.disabled = true; - QAccessible::updateAccessibility(QAccessibleStateChangeEvent(s, this)); + QAccessibleStateChangeEvent event(s, this); + QAccessible::updateAccessibility(&event); #endif break; } @@ -10391,7 +10402,8 @@ void QWidget::setAccessibleName(const QString &name) { Q_D(QWidget); d->accessibleName = name; - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this)); + QAccessibleEvent event(QAccessible::NameChanged, this); + QAccessible::updateAccessibility(&event); } QString QWidget::accessibleName() const @@ -10413,7 +10425,8 @@ void QWidget::setAccessibleDescription(const QString &description) { Q_D(QWidget); d->accessibleDescription = description; - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, this)); + QAccessibleEvent event(QAccessible::DescriptionChanged, this); + QAccessible::updateAccessibility(&event); } QString QWidget::accessibleDescription() const -- cgit v1.2.3 From 006a49b19ac100df587f23eb76dc4ba8855047a0 Mon Sep 17 00:00:00 2001 From: Jerome Leclanche Date: Thu, 15 Mar 2012 00:41:15 +0000 Subject: Fix compiling with --no-accessibility Adds missing QT_NO_ACCESSIBILITY checks where required to build without accessibility support. Change-Id: Id98ecdcb9b351289b21dc2d382100d0b63857db9 Reviewed-by: Frederik Gladhorn --- src/widgets/kernel/qwidgetwindow_qpa.cpp | 4 ++++ src/widgets/kernel/qwidgetwindow_qpa_p.h | 2 ++ 2 files changed, 6 insertions(+) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp index 4d5e9d5774..f58dddb70f 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa.cpp +++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp @@ -43,7 +43,9 @@ #include "private/qwidget_p.h" #include "private/qapplication_p.h" +#ifndef QT_NO_ACCESSIBILITY #include +#endif QT_BEGIN_NAMESPACE @@ -60,12 +62,14 @@ QWidgetWindow::QWidgetWindow(QWidget *widget) { } +#ifndef QT_NO_ACCESSIBILITY QAccessibleInterface *QWidgetWindow::accessibleRoot() const { if (m_widget) return QAccessible::queryAccessibleInterface(m_widget); return 0; } +#endif QObject *QWidgetWindow::focusObject() const { diff --git a/src/widgets/kernel/qwidgetwindow_qpa_p.h b/src/widgets/kernel/qwidgetwindow_qpa_p.h index 1e8813fddc..e5c07a2d3a 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa_p.h +++ b/src/widgets/kernel/qwidgetwindow_qpa_p.h @@ -62,7 +62,9 @@ public: QWidgetWindow(QWidget *widget); QWidget *widget() const { return m_widget; } +#ifndef QT_NO_ACCESSIBILITY QAccessibleInterface *accessibleRoot() const; +#endif QObject *focusObject() const; protected: -- cgit v1.2.3 From e2b6bebbed0d905c6461a65518de010d9db57176 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 15 Mar 2012 15:15:07 +0100 Subject: Remove Q_WS_X11 The define is removed and only added an include. Change-Id: I85090023cb9eb33f83ccc7fe2ab69556b4ff89fb Reviewed-by: Robin Burchell --- src/widgets/kernel/qiconloader.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qiconloader.cpp b/src/widgets/kernel/qiconloader.cpp index 2f9576f864..a0ee95c80c 100644 --- a/src/widgets/kernel/qiconloader.cpp +++ b/src/widgets/kernel/qiconloader.cpp @@ -61,10 +61,6 @@ #include #endif -#ifdef Q_WS_X11 -#include -#endif - #include QT_BEGIN_NAMESPACE -- cgit v1.2.3