1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qtquicktemplates2global_p.h"
5
6#include <QtGui/qtguiglobal.h>
7
8#if QT_CONFIG(accessibility)
9#include "qquickpage_p.h"
10#include "accessible/qaccessiblequickpage_p.h"
11#endif
12
13QT_BEGIN_NAMESPACE
14
15#if QT_CONFIG(accessibility)
16static QAccessibleInterface *qQuickAccessibleFactory(const QString &classname, QObject *object)
17{
18 if (classname == u"QQuickPage") {
19 return new QAccessibleQuickPage(qobject_cast<QQuickPage *>(object));
20 }
21 return nullptr;
22}
23#endif
24
25void QQuickTemplates_initializeModule()
26{
27#if QT_CONFIG(accessibility)
28 QAccessible::installFactory(&qQuickAccessibleFactory);
29#endif
30}
31
32Q_CONSTRUCTOR_FUNCTION(QQuickTemplates_initializeModule)
33
34QT_END_NAMESPACE
35

source code of qtdeclarative/src/quicktemplates/qtquicktemplates2global.cpp