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
qohosappcontext.cpp
Go to the documentation of this file.
1// Copyright (C) 2025 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
5#include <QtCore/qglobalstatic.h>
6#include <utility>
7
8QT_BEGIN_NAMESPACE
9
11{
13 Q_GLOBAL_STATIC(AppContextType, s_appContext)
14
15 void init(QMap<Type, QString> appcontext)
16 {
17 *s_appContext = std::move(appcontext);
18 }
19
21 {
22 return s_appContext->value(prop);
23 }
24
26 {
27 return *s_appContext;
28 }
29}
30
31QT_END_NAMESPACE
QMap< Type, QString > getAllProperties()
void init(QMap< Type, QString > appcontext)
QString getProperty(Type prop)