Fix compilation of the Windows accessibility code for MinGW.
Temporarily disable the code for MinGW. Change-Id: I435305167e06af05b9a78901e6e3a35347c5c3f5 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
This commit is contained in:
parent
259332e655
commit
087d6c21b8
@ -1,15 +1,19 @@
|
|||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/qwindowsmsaaaccessible.cpp \
|
$$PWD/qwindowsaccessibility.cpp
|
||||||
$$PWD/qwindowsaccessibility.cpp \
|
|
||||||
$$PWD/iaccessible2.cpp \
|
|
||||||
$$PWD/comutils.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/qwindowsmsaaaccessible.h \
|
$$PWD/qwindowsaccessibility.h
|
||||||
$$PWD/qwindowsaccessibility.h \
|
|
||||||
$$PWD/iaccessible2.h \
|
|
||||||
$$PWD/comutils.h
|
|
||||||
|
|
||||||
|
!*g++* {
|
||||||
|
SOURCES += \
|
||||||
|
$$PWD/qwindowsmsaaaccessible.cpp \
|
||||||
|
$$PWD/iaccessible2.cpp \
|
||||||
|
$$PWD/comutils.cpp
|
||||||
|
|
||||||
include(../../../../3rdparty/iaccessible2/iaccessible2.pri)
|
HEADERS += \
|
||||||
|
$$PWD/qwindowsmsaaaccessible.h \
|
||||||
|
$$PWD/iaccessible2.h \
|
||||||
|
$$PWD/comutils.h
|
||||||
|
|
||||||
|
include(../../../../3rdparty/iaccessible2/iaccessible2.pri)
|
||||||
|
} # !g++
|
||||||
|
@ -66,6 +66,10 @@
|
|||||||
#include "AccessibleRole.h"
|
#include "AccessibleRole.h"
|
||||||
#include "AccessibleStates.h"
|
#include "AccessibleStates.h"
|
||||||
|
|
||||||
|
#ifdef Q_CC_MINGW
|
||||||
|
# include <servprov.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QWindowsIA2Accessible : public QWindowsMsaaAccessible,
|
class QWindowsIA2Accessible : public QWindowsMsaaAccessible,
|
||||||
|
@ -54,13 +54,13 @@
|
|||||||
#include <QtGui/qplatformnativeinterface_qpa.h>
|
#include <QtGui/qplatformnativeinterface_qpa.h>
|
||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
#include <QtGui/qguiapplication.h>
|
#include <QtGui/qguiapplication.h>
|
||||||
#include <QtWidgets/qapplication.h>
|
|
||||||
#include <QtWidgets/qgraphicsitem.h>
|
|
||||||
#include <QtWidgets/qgraphicsview.h>
|
|
||||||
#include <QtWidgets/qmessagebox.h>
|
|
||||||
|
|
||||||
#include "qwindowsaccessibility.h"
|
#include "qwindowsaccessibility.h"
|
||||||
#include "iaccessible2.h"
|
|
||||||
|
#ifndef Q_CC_MINGW
|
||||||
|
# include "iaccessible2.h"
|
||||||
|
#endif // !Q_CC_MINGW
|
||||||
|
|
||||||
#include "comutils.h"
|
#include "comutils.h"
|
||||||
|
|
||||||
#include <oleacc.h>
|
#include <oleacc.h>
|
||||||
@ -185,7 +185,7 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev
|
|||||||
// An event has to be associated with a window,
|
// An event has to be associated with a window,
|
||||||
// so find the first parent that is a widget and that has a WId
|
// so find the first parent that is a widget and that has a WId
|
||||||
QAccessibleInterface *iface = event.accessibleInterface();
|
QAccessibleInterface *iface = event.accessibleInterface();
|
||||||
QWindow *window = iface ? window_helper(iface) : 0;
|
QWindow *window = iface ? QWindowsAccessibility::windowHelper(iface) : 0;
|
||||||
delete iface;
|
delete iface;
|
||||||
|
|
||||||
if (!window) {
|
if (!window) {
|
||||||
@ -211,6 +211,20 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev
|
|||||||
#endif // Q_OS_WINCE
|
#endif // Q_OS_WINCE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWindow *QWindowsAccessibility::windowHelper(const QAccessibleInterface *iface)
|
||||||
|
{
|
||||||
|
QWindow *window = iface->window();
|
||||||
|
if (!window) {
|
||||||
|
QAccessibleInterface *acc = iface->parent();
|
||||||
|
while (acc && !window) {
|
||||||
|
window = acc->window();
|
||||||
|
QAccessibleInterface *par = acc->parent();
|
||||||
|
delete acc;
|
||||||
|
acc = par;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return window;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\internal
|
\internal
|
||||||
@ -218,12 +232,16 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(const QAccessibleEvent &ev
|
|||||||
*/
|
*/
|
||||||
IAccessible *QWindowsAccessibility::wrap(QAccessibleInterface *acc)
|
IAccessible *QWindowsAccessibility::wrap(QAccessibleInterface *acc)
|
||||||
{
|
{
|
||||||
|
#ifdef Q_CC_MINGW
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
if (!acc)
|
if (!acc)
|
||||||
return 0;
|
return 0;
|
||||||
QWindowsIA2Accessible *wacc = new QWindowsIA2Accessible(acc);
|
QWindowsIA2Accessible *wacc = new QWindowsIA2Accessible(acc);
|
||||||
IAccessible *iacc = 0;
|
IAccessible *iacc = 0;
|
||||||
wacc->QueryInterface(IID_IAccessible, (void**)&iacc);
|
wacc->QueryInterface(IID_IAccessible, (void**)&iacc);
|
||||||
return iacc;
|
return iacc;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -260,7 +278,7 @@ bool QWindowsAccessibility::handleAccessibleObjectFromWindowRequest(HWND hwnd, W
|
|||||||
#if 1
|
#if 1
|
||||||
// Ignoring all requests while starting up
|
// Ignoring all requests while starting up
|
||||||
// ### Maybe QPA takes care of this???
|
// ### Maybe QPA takes care of this???
|
||||||
if (QApplication::startingUp() || QApplication::closingDown())
|
if (QCoreApplication::startingUp() || QCoreApplication::closingDown())
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ public:
|
|||||||
virtual void cleanup();
|
virtual void cleanup();
|
||||||
*/
|
*/
|
||||||
static IAccessible *wrap(QAccessibleInterface *acc);
|
static IAccessible *wrap(QAccessibleInterface *acc);
|
||||||
|
static QWindow *windowHelper(const QAccessibleInterface *iface);
|
||||||
|
|
||||||
static QPair<QObject*, int> getCachedObject(int entryId);
|
static QPair<QObject*, int> getCachedObject(int entryId);
|
||||||
};
|
};
|
||||||
|
@ -1180,21 +1180,6 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accSelection(VARIANT *pvar
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
QWindow *window_helper(const QAccessibleInterface *iface)
|
|
||||||
{
|
|
||||||
QWindow *window = iface->window();
|
|
||||||
if (!window) {
|
|
||||||
QAccessibleInterface *acc = iface->parent();
|
|
||||||
while (acc && !window) {
|
|
||||||
window = acc->window();
|
|
||||||
QAccessibleInterface *par = acc->parent();
|
|
||||||
delete acc;
|
|
||||||
acc = par;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return window;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**************************************************************\
|
/**************************************************************\
|
||||||
* IOleWindow *
|
* IOleWindow *
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
@ -1207,7 +1192,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::GetWindow(HWND *phwnd)
|
|||||||
if (!accessible->isValid())
|
if (!accessible->isValid())
|
||||||
return E_UNEXPECTED;
|
return E_UNEXPECTED;
|
||||||
|
|
||||||
QWindow *window = window_helper(accessible);
|
QWindow *window = QWindowsAccessibility::windowHelper(accessible);
|
||||||
if (!window)
|
if (!window)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include <QtCore/QtConfig>
|
#include <QtCore/QtConfig>
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
|
|
||||||
|
#include "../qtwindows_additional.h"
|
||||||
#include <oleacc.h>
|
#include <oleacc.h>
|
||||||
#include "Accessible2.h"
|
#include "Accessible2.h"
|
||||||
#include <QtCore/qsharedpointer.h>
|
#include <QtCore/qsharedpointer.h>
|
||||||
@ -55,7 +56,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
bool debug_accessibility();
|
bool debug_accessibility();
|
||||||
# define accessibleDebug !debug_accessibility() ? (void)0 : qDebug
|
# define accessibleDebug !debug_accessibility() ? (void)0 : qDebug
|
||||||
#else
|
#else
|
||||||
# define accessibleDebug()
|
# define accessibleDebug
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG_SHOW_ATCLIENT_COMMANDS
|
#define DEBUG_SHOW_ATCLIENT_COMMANDS
|
||||||
|
@ -71,6 +71,16 @@
|
|||||||
#define IFACEMETHODIMP STDMETHODIMP
|
#define IFACEMETHODIMP STDMETHODIMP
|
||||||
#define IFACEMETHODIMP_(type) STDMETHODIMP_(type)
|
#define IFACEMETHODIMP_(type) STDMETHODIMP_(type)
|
||||||
|
|
||||||
|
// For accessibility:
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define EXTERN_C extern "C"
|
||||||
|
#else
|
||||||
|
#define EXTERN_C extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CHILDID_SELF 0
|
||||||
|
#define WM_GETOBJECT 0x003D
|
||||||
|
|
||||||
#if !defined(__MINGW64_VERSION_MAJOR)
|
#if !defined(__MINGW64_VERSION_MAJOR)
|
||||||
|
|
||||||
#define STATE_SYSTEM_HASPOPUP 0x40000000
|
#define STATE_SYSTEM_HASPOPUP 0x40000000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user