summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-16 10:01:29 +0100
committerKent Hansen <kent.hansen@nokia.com>2012-03-16 10:01:29 +0100
commit440f452aa3a5609e5f6006a03ac36d41462d5908 (patch)
tree598d682291945055e4f6feb08a228212648482c1 /src/widgets/kernel
parentcd1e62ffc121cc68c5a133a8095d431f04d966ce (diff)
parentd4959fa6376255ab4adf8adaeb2ee47ae6b679d2 (diff)
Merge master into api_changes
Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qiconloader.cpp4
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp6
-rw-r--r--src/widgets/kernel/qwidget.cpp37
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa.cpp4
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa_p.h2
5 files changed, 36 insertions, 17 deletions
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 <private/qt_cocoa_helpers_mac_p.h>
#endif
-#ifdef Q_WS_X11
-#include <private/qt_x11_p.h>
-#endif
-
#include <private/qhexstring_p.h>
QT_BEGIN_NAMESPACE
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 084d609730..ffb4b1fef5 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;
}
@@ -9229,6 +9240,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
@@ -10390,7 +10403,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
@@ -10412,7 +10426,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
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 <QtGui/qaccessible.h>
+#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: