Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qplatformthemefactory.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
/
qplatformthemefactory_p
.
h
>
6
#
include
<
qpa
/
qplatformthemeplugin
.
h
>
7
#
include
<
QDir
>
8
#
include
"private/qfactoryloader_p.h"
9
#
include
"qmutex.h"
10
11
#
include
"qguiapplication.h"
12
#
include
"qplatformtheme.h"
13
#
include
"qplatformtheme_p.h"
14
#
include
"qdebug.h"
15
16
QT_BEGIN_NAMESPACE
17
18
using
namespace
Qt::StringLiterals;
19
20
Q_GLOBAL_STATIC_WITH_ARGS
(QFactoryLoader, ptLoader,
21
(QPlatformThemeFactoryInterface_iid,
"/platformthemes"_L1
, Qt::CaseInsensitive))
22
23
QPlatformTheme *QPlatformThemeFactory::create(
const
QString& key,
const
QString &platformPluginPath)
24
{
25
QStringList paramList = key.split(u':');
26
const
QString platform = paramList.takeFirst().toLower();
27
ptLoader->setExtraSearchPath(platformPluginPath);
28
QPlatformTheme *theme = qLoadPlugin<QPlatformTheme, QPlatformThemePlugin>(ptLoader(), platform, paramList);
29
if
(theme)
30
theme->d_func()->name = key;
31
return
theme;
32
}
33
34
/*!
35
\internal
36
Returns the list of valid keys, i.e. the keys this factory can
37
create styles for.
38
39
\sa create()
40
*/
41
QStringList QPlatformThemeFactory::keys(
const
QString &platformPluginPath)
42
{
43
ptLoader->setExtraSearchPath(platformPluginPath);
44
return
ptLoader->keyMap().values();
45
}
46
47
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Q_GLOBAL_STATIC_WITH_ARGS
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 } }))
qtbase
src
gui
kernel
qplatformthemefactory.cpp
Generated on
for Qt by
1.18.0