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
qtenvironmentvariables_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// Copyright (C) 2015 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QTENVIRONMENTVARIABLES_P_H
7#define QTENVIRONMENTVARIABLES_P_H
8// Nothing but (tests and) ../time/qlocaltime.cpp should access this.
9#if defined(__cplusplus)
10
11//
12// W A R N I N G
13// -------------
14//
15// This file is not part of the Qt API. It exists purely as an implementation
16// detail. This header file may change from version to version without notice,
17// or even be removed.
18//
19// We mean it.
20//
21
22#include "qglobal_p.h"
23
24#ifdef Q_CC_MINGW
25# include <unistd.h> // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r()
26#endif
27#include <time.h>
28
29QT_BEGIN_NAMESPACE
30
31// These (behave as if they) consult the environment, so need to share its locking:
32Q_CORE_EXPORT void qTzSet();
33Q_CORE_EXPORT time_t qMkTime(struct tm *when);
34Q_CORE_EXPORT bool qLocalTime(time_t utc, struct tm *local);
35Q_CORE_EXPORT QString qTzName(int dstIndex);
36
37QT_END_NAMESPACE
38
39#endif // defined(__cplusplus)
40#endif // QTENVIRONMENTVARIABLES_P_H
\inmodule QtCore
Definition qbytearray.h:58
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:177
Combined button and popup list for selecting options.
bool qLocalTime(time_t utc, struct tm *local)
QString qEnvironmentVariable(const char *varName, const QString &defaultValue)
bool qputenv(const char *varName, QByteArrayView raw)
time_t qMkTime(struct tm *when)
void qTzSet()
QString qTzName(int dstIndex)
QString qEnvironmentVariable(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) noexcept
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
Q_CORE_EXPORT bool qunsetenv(const char *varName)