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
qohosappbundleinfo.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
8namespace QtOhosAppKit {
9
10using namespace Private;
11
12namespace {
13
14class QOhosBundleInfoImpl : public BundleInfo
15{
16public:
17 QOhosBundleInfoImpl(int versionCode);
18
19 int versionCode() const override;
20
21private:
22 int m_versionCode;
23};
24
25QOhosBundleInfoImpl::QOhosBundleInfoImpl(int versionCode)
26 : BundleInfo()
27 , m_versionCode(versionCode)
28{
29}
30
31/*!
32 \fn int QtOhosAppKit::BundleInfo::versionCode() const
33
34 Returns application's version code.
35 See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/js-apis-bundlemanager-bundleinfo}
36 {BundleInfo's versionCode}
37*/
38int QOhosBundleInfoImpl::versionCode() const
39{
40 return m_versionCode;
41}
42
43}
44
45/*!
46 \class QtOhosAppKit::BundleInfo
47 \inmodule QtOhosAppKit
48 \since 5.12.12
49 \brief The BundleInfo class contains API to provide native application bundle info.
50
51 To learn more about bundle info in HarmonyOS, see
52 \l{https://developer.huawei.com/consumer/en/doc/harmonyos-references/js-apis-bundlemanager-bundleinfo}
53 {Bundle Info}.
54*/
55
56BundleInfo::BundleInfo() = default;
57BundleInfo::~BundleInfo() = default;
58
60{
61 return std::make_shared<QOhosBundleInfoImpl>(versionCode);
62}
63
64}
65
66QT_END_NAMESPACE
Combined button and popup list for selecting options.
std::shared_ptr< BundleInfo > createBundleInfo(int versionCode)