Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#include <qpa/qplatformintegrationplugin.h>
8
10
11using namespace Qt::StringLiterals;
12
13#ifdef DIRECTFB_GL_EGL
14#define QT_EGL_BACKEND_STRING(list) list << "directfbegl";
15#define QT_EGL_BACKEND_CREATE(list, out)
16 if (list.toLower() == "directfbegl")
17 out = new QDirectFbIntegrationEGL;
18#else
19#define QT_EGL_BACKEND_STRING(list)
20#define QT_EGL_BACKEND_CREATE(system, out)
21#endif
22
24{
25 Q_OBJECT
26 Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "directfb.json")
27public:
29};
30
31QPlatformIntegration * QDirectFbIntegrationPlugin::create(const QString& system, const QStringList& paramList)
32{
33 Q_UNUSED(paramList);
34 QDirectFbIntegration *integration = nullptr;
35
36 if (!system.compare("directfb"_L1, Qt::CaseInsensitive))
37 integration = new QDirectFbIntegration;
38 QT_EGL_BACKEND_CREATE(system, integration)
39
40 if (!integration)
41 return 0;
42
43 integration->connectToDirectFb();
44
45 return integration;
46}
47
48QT_END_NAMESPACE
49
50#include "main.moc"
#define QT_EGL_BACKEND_CREATE(system, out)
Definition main.cpp:20