Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtenvironmentvariables.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QTENVIRONMENTVARIABLES_H
5#define QTENVIRONMENTVARIABLES_H
6
7#include <QtCore/qtconfigmacros.h>
8#include <QtCore/qtcoreexports.h>
9#include <QtCore/qtdeprecationmarkers.h>
10
11#if 0
12#pragma qt_class(QtEnvironmentVariables)
13#pragma qt_sync_stop_processing
14#endif
15
17
18class QByteArray;
19class QByteArrayView;
20class QString;
21
22Q_CORE_EXPORT QByteArray qgetenv(const char *varName);
23// need it as two functions because QString is only forward-declared here
24Q_CORE_EXPORT QString qEnvironmentVariable(const char *varName);
25Q_CORE_EXPORT QString qEnvironmentVariable(const char *varName, const QString &defaultValue);
26#if QT_CORE_REMOVED_SINCE(6, 5)
27Q_CORE_EXPORT bool qputenv(const char *varName, const QByteArray &value);
28#endif
29Q_CORE_EXPORT bool qputenv(const char *varName, QByteArrayView value);
30Q_CORE_EXPORT bool qunsetenv(const char *varName);
31
32Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) noexcept;
33Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept;
34Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept;
35
37
38#endif /* QTENVIRONMENTVARIABLES_H */
\inmodule QtCore
Definition qbytearray.h:57
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) noexcept
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
Q_CORE_EXPORT QString qEnvironmentVariable(const char *varName)
Q_CORE_EXPORT bool qputenv(const char *varName, QByteArrayView value)
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
Q_CORE_EXPORT bool qunsetenv(const char *varName)