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
qohosabilitylaunchparamstore.cpp
Go to the documentation of this file.
1// Copyright (C) 2026 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
7
8QOhosAbilityLaunchParamStore &QOhosAbilityLaunchParamStore::instance(QOhosJsState &jsState)
9{
10 return jsState.getAttachedObjectWithLazyCreate<QOhosAbilityLaunchParamStore>();
11}
12
13QOhosAbilityLaunchParamStore::QOhosAbilityLaunchParamStore()
14 : m_keyRef(QNapi::Reference<>::makePersistentFrom(
15 QNapi::Symbol::New(QOhosJsThreadOps::instance().jsState().env(), "_io_qt_abilityLaunchParam")))
16{
17}
18
19void QOhosAbilityLaunchParamStore::set(QNapi::Object ability, QNapi::Object launchParam)
20{
21 ability.set(m_keyRef.Value(), launchParam);
22}
23
24QNapi::Object QOhosAbilityLaunchParamStore::getOrEmpty(QNapi::Object ability)
25{
26 return QNapi::getOptionalPropOrEmpty<QNapi::Object>(ability, m_keyRef.Value());
27}
28
29QT_END_NAMESPACE
Combined button and popup list for selecting options.