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
Definition qfile.h:71
\inmodule QtCore
Combined button and popup list for selecting options.
#define QFILE_MAYBE_EXPLICIT
Definition qfile.h:65
static QString fromRawStringView(QStringView string)
static bool pathIsRelative(const QString &path)
void qDumpCPUFeatures()
Definition qsimd.cpp:683
#define SHARED_STRING
#define COMPILER_STRING
#define DEBUG_STRING
static QString qtPrefix()
static QString appPrefix()
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