diff --git a/vcl/CustomTarget_qt5_moc.mk b/vcl/CustomTarget_qt5_moc.mk index 7e04d5756fbc..4a10cfd2b0f5 100644 --- a/vcl/CustomTarget_qt5_moc.mk +++ b/vcl/CustomTarget_qt5_moc.mk @@ -10,6 +10,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,vcl/qt5)) $(call gb_CustomTarget_get_target,vcl/qt5) : \ + $(gb_CustomTarget_workdir)/vcl/qt5/QtAccessibleWidget.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtClipboard.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtDoubleSpinBox.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtExpander.moc \ diff --git a/vcl/CustomTarget_qt6_moc.mk b/vcl/CustomTarget_qt6_moc.mk index 79b203ea70a1..9dee1cbb298e 100644 --- a/vcl/CustomTarget_qt6_moc.mk +++ b/vcl/CustomTarget_qt6_moc.mk @@ -10,6 +10,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,vcl/qt6)) $(call gb_CustomTarget_get_target,vcl/qt6) : \ + $(gb_CustomTarget_workdir)/vcl/qt6/QtAccessibleWidget.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtClipboard.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtDoubleSpinBox.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtExpander.moc \ diff --git a/vcl/inc/qt5/QtAccessibleWidget.hxx b/vcl/inc/qt5/QtAccessibleWidget.hxx index c02411ba2556..bc1ab406fe70 100644 --- a/vcl/inc/qt5/QtAccessibleWidget.hxx +++ b/vcl/inc/qt5/QtAccessibleWidget.hxx @@ -36,20 +36,27 @@ class XAccessibleTable; class QtFrame; class QtWidget; -class QtAccessibleWidget final : public QAccessibleInterface, +class QtAccessibleWidget final : public QObject, + public QAccessibleInterface, public QAccessibleActionInterface, +#ifndef Q_MOC_RUN #if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) public QAccessibleAttributesInterface, +#endif #endif public QAccessibleTextInterface, public QAccessibleEditableTextInterface, +#ifndef Q_MOC_RUN #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) public QAccessibleSelectionInterface, +#endif #endif public QAccessibleTableCellInterface, public QAccessibleTableInterface, public QAccessibleValueInterface { + Q_OBJECT + public: QtAccessibleWidget(const css::uno::Reference& xAccessible, QObject* pObject); @@ -88,6 +95,7 @@ public: void doAction(const QString& actionName) override; QStringList keyBindingsForAction(const QString& actionName) const override; +#ifndef Q_MOC_RUN #if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) // helper method for QAccessibleAttributesInterface QHash attributes() const; @@ -95,6 +103,7 @@ public: // QAccessibleAttributesInterface QList attributeKeys() const override; QVariant attributeValue(QAccessible::Attribute key) const override; +#endif #endif // QAccessibleTextInterface diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 03feffda5794..d5febb36aaeb 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -18,6 +18,7 @@ */ #include +#include #include