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
qxcbmain.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>
7
9
10using namespace Qt::StringLiterals;
11
13{
14 Q_OBJECT
15 Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "xcb.json")
16public:
17 QPlatformIntegration *create(const QString&, const QStringList&, int &, char **) override;
18};
19
20QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const QStringList& parameters, int &argc, char **argv)
21{
22 if (!system.compare("xcb"_L1, Qt::CaseInsensitive)) {
23 auto xcbIntegration = new QXcbIntegration(parameters, argc, argv);
24 if (!xcbIntegration->hasConnection()) {
25 delete xcbIntegration;
26 return nullptr;
27 }
28 return xcbIntegration;
29 }
30
31 return nullptr;
32}
33
34QT_END_NAMESPACE
35
36#include "qxcbmain.moc"