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
qplatformintegrationfactory.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
4#include <qpa/qplatformintegrationfactory_p.h>
5#include <qpa/qplatformintegrationplugin.h>
6#include "private/qfactoryloader_p.h"
7#include "qmutex.h"
8#include "qdir.h"
9
11#include "qdebug.h"
12
14
15using namespace Qt::StringLiterals;
16
17Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, piLoader,
18 (QPlatformIntegrationFactoryInterface_iid, "/platforms"_L1, Qt::CaseInsensitive))
19
20QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platform, const QStringList &paramList, int &argc, char **argv, const QString &platformPluginPath)
21{
22 piLoader->setExtraSearchPath(platformPluginPath);
23 return qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(piLoader(), platform, paramList, argc, argv);
24}
25
26/*!
27 Returns the list of valid keys, i.e. the keys this factory can
28 create styles for.
29
30 \sa create()
31*/
32
33QStringList QPlatformIntegrationFactory::keys(const QString &platformPluginPath)
34{
35 piLoader->setExtraSearchPath(platformPluginPath);
36 return piLoader->keyMap().values();
37}
38
39QT_END_NAMESPACE
Combined button and popup list for selecting options.
Q_GLOBAL_STATIC_WITH_ARGS(PermissionStatusHash, g_permissionStatusHash,({ { qMetaTypeId< QCameraPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QMicrophonePermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QBluetoothPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QContactsPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QCalendarPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QLocationPermission >(), Qt::PermissionStatus::Undetermined } }))