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{
16public:
17 static const char *build() noexcept;
18
19 [[nodiscard]] Q_DECL_CONST_FUNCTION static bool isDebugBuild() noexcept;
20 [[nodiscard]] Q_DECL_CONST_FUNCTION static bool isSharedBuild() noexcept;
21
22#ifndef QT_BOOTSTRAPPED
23 Q_DECL_CONST_FUNCTION static QVersionNumber version() noexcept;
24#endif
25
26 enum LibraryPath {
27 PrefixPath = 0,
28 DocumentationPath,
29 HeadersPath,
30 LibrariesPath,
31 LibraryExecutablesPath,
32 BinariesPath,
33 PluginsPath,
34 QmlImportsPath,
35 Qml2ImportsPath = QmlImportsPath,
36 ArchDataPath,
37 DataPath,
38 TranslationsPath,
39 ExamplesPath,
40 TestsPath,
41 // Insert new values above this line
42 // Please read the comments in qconfig.cpp.in before adding
43 SettingsPath = 100
44 };
45 static QString path(LibraryPath p);
46 static QStringList paths(LibraryPath p);
47#if QT_DEPRECATED_SINCE(6, 0)
48 using LibraryLocation = LibraryPath;
49 QT_DEPRECATED_VERSION_X_6_0("Use path()")
50 static QString location(LibraryLocation location)
51 { return path(location); }
52#endif
53 static QStringList platformPluginArguments(const QString &platformName);
54
55private:
56 QLibraryInfo();
57};
58
59#if QT_DEPRECATED_SINCE(6, 9)
60
61QT_DEPRECATED_VERSION_X_6_9("Use QLibraryInfo::isSharedBuild() instead.")
62Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept;
63
64#endif
65
66QT_END_NAMESPACE
67
68#endif // QLIBRARYINFO_H
#define ARCH_FULL
\inmodule QtCore
Definition qfile.h:71
\inmodule QtCore
Combined button and popup list for selecting options.
#define QFILE_MAYBE_EXPLICIT
Definition qfile.h:65
static const char * qt_build_string() noexcept
static bool pathIsRelative(const QString &path)
static QString getPrefix(QLibraryInfoPrivate::UsageMode usageMode)
void qDumpCPUFeatures()
Definition qsimd.cpp:682
static bool pathIsAbsolute(const QString &path)
static QString prefixFromAppDirHelper()
#define SHARED_STRING
static bool keepQtBuildDefaults()
#define COMPILER_STRING
#define DEBUG_STRING
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
qsizetype indexOf(const QString &str, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
bool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QStringList filter(const QLatin1StringMatcher &matcher) const
void sort(Qt::CaseSensitivity cs=Qt::CaseSensitive)
Definition qstringlist.h:88
QString join(const QString &sep) const
qsizetype indexOf(QStringView needle, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QStringList & replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs=Qt::CaseSensitive)
QString join(QStringView sep) const
Definition qstringlist.h:93
qsizetype lastIndexOf(QStringView str, qsizetype from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QStringList filter(QLatin1StringView needle, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QStringList filter(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QStringList & replaceInStrings(QStringView before, const QString &after, Qt::CaseSensitivity cs=Qt::CaseSensitive)
QStringList & replaceInStrings(QStringView before, QStringView after, Qt::CaseSensitivity cs=Qt::CaseSensitive)
QStringList & replaceInStrings(const QString &before, QStringView after, Qt::CaseSensitivity cs=Qt::CaseSensitive)
QStringList filter(const QStringMatcher &matcher) const
qsizetype lastIndexOf(const QString &str, qsizetype from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept