diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-03-08 16:10:10 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-15 11:40:50 +0100 |
commit | a17907829e6b180f2bb4af9a8594996b2a0e531a (patch) | |
tree | f3a3e4aaeb699125732f4fd6139f1894e14c7dd2 /src/widgets/dialogs | |
parent | 8cec8a4f68a5af76f9f1ee11e1f4b10603a1916c (diff) |
Use pointers for QAccessibleEvent.
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 <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qdialog.cpp | 9 | ||||
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index f1a6a294d2..5d36bc07e8 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -754,7 +754,8 @@ void QDialog::setVisible(bool visible) } #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DialogStart, this)); + QAccessibleEvent event(QAccessible::DialogStart, this); + QAccessible::updateAccessibility(&event); #endif } else { @@ -762,8 +763,10 @@ void QDialog::setVisible(bool visible) return; #ifndef QT_NO_ACCESSIBILITY - if (isVisible()) - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DialogEnd, this)); + if (isVisible()) { + QAccessibleEvent event(QAccessible::DialogEnd, this); + QAccessible::updateAccessibility(&event); + } #endif // Reimplemented to exit a modal event loop when the dialog is hidden. diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index e1b134ee48..040f61dfc5 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1463,7 +1463,8 @@ void QMessageBox::showEvent(QShowEvent *e) d->updateSize(); #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Alert, this)); + QAccessibleEvent event(QAccessible::Alert, this); + QAccessible::updateAccessibility(&event); #endif #ifdef Q_OS_WIN if (const HMENU systemMenu = qt_getWindowsSystemMenu(this)) { |