diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-01-10 14:44:52 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-12 15:15:30 +0100 |
commit | 0fda46932dbab64c092197c347c289c57488cb2a (patch) | |
tree | ba2625fb754d8038d9add93232db5dc10a14b600 /src/gui | |
parent | 1133c0dd2230499b24d7f92634531bb633ee00f6 (diff) |
Remove invokeMethod in favor of the recommended virtual_hook()
We don't remove the Method enum (yet), since there are functions in
dependent modules that still refer to it.
Unfortunately there is no way we can commit to several repos
"atomically".
Change-Id: Ia1923dc4bf0751a9ba67727d14da5a2e60bd4e74
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/accessible/qaccessible.cpp | 19 | ||||
-rw-r--r-- | src/gui/accessible/qaccessible.h | 16 |
2 files changed, 11 insertions, 24 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 41382c48b3..edd4616446 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -120,7 +120,6 @@ QT_BEGIN_NAMESPACE \sa QAccessibleInterface */ - /*! \enum QAccessible::StateFlag @@ -1159,17 +1158,17 @@ QWindow *QAccessibleInterface::window() const Returns an invalid QVariant if the object doesn't support the action. */ -QVariant QAccessibleInterface::invokeMethod(QAccessible::Method method, const QVariantList ¶ms) -{ - Q_UNUSED(method) - Q_UNUSED(params) - return QVariant(); -} -/*! \internal */ -QVariant QAccessibleInterface::virtual_hook(const QVariant &) +/*! + \internal + Method to allow extending this class without breaking binary compatibility. + The actual behavior and format of \a data depends on \a id argument + which must be defined if the class is to be extended with another virtual + function. + Currently, this is unused. +*/ +void QAccessibleInterface::virtual_hook(int /*id*/, void * /*data*/) { - return QVariant(); } /*! diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index e41898f045..38f52fb2fd 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -289,10 +289,6 @@ public: }; Q_DECLARE_FLAGS(Relation, RelationFlag) - enum Method { - ListSupportedMethods = 0 - }; - enum InterfaceType { TextInterface, @@ -334,9 +330,6 @@ private: Q_GUI_EXPORT bool operator==(const QAccessible::State &first, const QAccessible::State &second); Q_DECLARE_OPERATORS_FOR_FLAGS(QAccessible::Relation) -QT_END_NAMESPACE -Q_DECLARE_METATYPE(QSet<QAccessible::Method>) -QT_BEGIN_NAMESPACE class QAccessible2Interface; class QAccessibleTextInterface; @@ -379,11 +372,6 @@ public: virtual QColor foregroundColor() const; virtual QColor backgroundColor() const; - virtual QVariant invokeMethod(QAccessible::Method method, const QVariantList ¶ms = QVariantList()); - - inline QSet<QAccessible::Method> supportedMethods() - { return qvariant_cast<QSet<QAccessible::Method> >(invokeMethod(QAccessible::ListSupportedMethods)); } - inline QAccessibleTextInterface *textInterface() { return reinterpret_cast<QAccessibleTextInterface *>(interface_cast(QAccessible::TextInterface)); } @@ -405,8 +393,8 @@ public: inline QAccessibleTableCellInterface *tableCellInterface() { return reinterpret_cast<QAccessibleTableCellInterface *>(interface_cast(QAccessible::TableCellInterface)); } - // FIXME - virtual QVariant virtual_hook(const QVariant &data); + virtual void virtual_hook(int id, void *data); + virtual void *interface_cast(QAccessible::InterfaceType) { return 0; } private: |