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
qlibraryinfo.h
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#ifndef QLIBRARYINFO_H
6#define QLIBRARYINFO_H
7
8#include <QtCore/qstring.h>
9#include <QtCore/qdatetime.h>
10#include <QtCore/qversionnumber.h>
11
13
14class Q_CORE_EXPORT QLibraryInfo
15{
16 Q_GADGET
17
18public:
19 static const char *build() noexcept;
20
21 [[nodiscard]] Q_DECL_CONST_FUNCTION static bool isDebugBuild() noexcept;
22 [[nodiscard]] Q_DECL_CONST_FUNCTION static bool isSharedBuild() noexcept;
23
24#ifndef QT_BOOTSTRAPPED
25 Q_DECL_CONST_FUNCTION static QVersionNumber version() noexcept;
26#endif
27
28 enum LibraryPath {
29 PrefixPath = 0,
30 DocumentationPath,
31 HeadersPath,
32 LibrariesPath,
33 LibraryExecutablesPath,
34 BinariesPath,
35 PluginsPath,
36 QmlImportsPath,
37 Qml2ImportsPath = QmlImportsPath,
38 ArchDataPath,
39 DataPath,
40 TranslationsPath,
41 ExamplesPath,
42 TestsPath,
43 // Insert new values above this line
44 // Please read the comments in qconfig.cpp.in before adding
45 SettingsPath = 100
46 };
47 Q_ENUM(LibraryPath)
48
49 static QString path(LibraryPath p);
50 static QStringList paths(LibraryPath p);
51#if QT_DEPRECATED_SINCE(6, 0)
52 using LibraryLocation = LibraryPath;
53 QT_DEPRECATED_VERSION_X_6_0("Use path()")
54 static QString location(LibraryLocation location)
55 { return path(location); }
56#endif
57 static QStringList platformPluginArguments(const QString &platformName);
58
59private:
60 QLibraryInfo();
61};
62
63#if QT_DEPRECATED_SINCE(6, 9)
64
65QT_DEPRECATED_VERSION_X_6_9("Use QLibraryInfo::isSharedBuild() instead.")
66Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept;
67
68#endif
69
70QT_END_NAMESPACE
71
72#endif // QLIBRARYINFO_H
#define ARCH_FULL
\inmodule QtCore
Combined button and popup list for selecting options.
static QString fromRawStringView(QStringView string)
static bool pathIsRelative(const QString &path)
void qDumpCPUFeatures()
Definition qsimd.cpp:687
#define SHARED_STRING
#define COMPILER_STRING
#define DEBUG_STRING
static QString qtPrefix()
static QString appPrefix()