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