1 | // Copyright (C) 2016 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 <QtGui/qgenericplugin.h> |
5 | #include <QtInputSupport/private/qlibinputhandler_p.h> |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | class QLibInputPlugin : public QGenericPlugin |
10 | { |
11 | Q_OBJECT |
12 | Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "libinput.json") |
13 | |
14 | public: |
15 | QObject *create(const QString &key, const QString &specification) override; |
16 | }; |
17 | |
18 | QObject *QLibInputPlugin::create(const QString &key, const QString &specification) |
19 | { |
20 | if (!key.compare(other: QLatin1String("libinput"), cs: Qt::CaseInsensitive)) |
21 | return new QLibInputHandler(key, specification); |
22 | |
23 | return nullptr; |
24 | } |
25 | |
26 | QT_END_NAMESPACE |
27 | |
28 | #include "main.moc" |
29 |