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.cpp File Reference

(eedb715ece5beabd1db731d0d003cf8112360f7c)

#include "qtenvironmentvariables.h"
#include "qtenvironmentvariables_p.h"
#include <qplatformdefs.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qmutex.h>
#include <QtCore/qstring.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/private/qlocking_p.h>
+ Include dependency graph for qtenvironmentvariables.cpp:

Go to the source code of this file.

Functions

QString qEnvironmentVariable (const char *varName, const QString &defaultValue)
 
QString qEnvironmentVariable (const char *varName)
 
bool qputenv (const char *varName, QByteArrayView raw)
 
void qTzSet ()
 
time_t qMkTime (struct tm *when)
 
bool qLocalTime (time_t utc, struct tm *local)
 
QString qTzName (int dstIndex)
 

Variables

QT_BEGIN_NAMESPACE static Q_CONSTINIT QBasicMutex environmentMutex
 

Function Documentation

◆ qEnvironmentVariable() [1/2]

QString qEnvironmentVariable ( const char * varName)

Definition at line 141 of file qtenvironmentvariables.cpp.

References qEnvironmentVariable().

+ Here is the call graph for this function:

◆ qEnvironmentVariable() [2/2]

QString qEnvironmentVariable ( const char * varName,
const QString & defaultValue )

Definition at line 109 of file qtenvironmentvariables.cpp.

References environmentMutex, QString::fromLocal8Bit(), QString::fromUtf8(), i, QString::NormalizationForm_C, Q_ASSERT, qgetenv(), and Qt::Uninitialized.

Referenced by QAndroidPlatformIconEngine::QAndroidPlatformIconEngine(), QCtfLibImpl::QCtfLibImpl(), QQmlImportDatabase::QQmlImportDatabase(), QQuickGraphicsConfigurationPrivate::QQuickGraphicsConfigurationPrivate(), QQuickTextArea::QQuickTextArea(), QQuickTextField::QQuickTextField(), bluetoothdVersion(), QmlLsp::QQmlCodeModel::buildPathsForFileUrl(), QBackingStoreRhiSupport::checkForceRhi(), contextFactory(), QKmsDevice::createScreenForConnector(), QQmlToolingUtils::getAndWarnForInvalidDirsFromEnv(), iconTempPath(), QCoreApplicationPrivate::initConsole(), QWaylandTextureSharingExtension::initialize(), QtQuickControls2NativeStylePlugin::initializeEngine(), loadLib(), QtWaylandClient::QWaylandScreen::logicalDpi(), machineName(), mouseCursorTheme(), openZoneInfo(), parseOptions(), parseOptions(), QGtk3Storage::populateMap(), qEnvironmentVariable(), qEnvironmentVariableOptionalReal(), qEnvironmentVariableOptionalString(), QtWaylandClient::QWaylandDisplay::registry_global(), QtWaylandClient::QWaylandXdgSurface::requestActivate(), QQuickShapePrivate::selectRendererType(), and QQuickFileDialogImplPrivate::updateSelectedFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qLocalTime()

bool qLocalTime ( time_t utc,
struct tm * local )

Definition at line 367 of file qtenvironmentvariables.cpp.

References environmentMutex, Q_ASSERT, and Q_UNUSED.

Referenced by QLocalTime::utcToLocal().

+ Here is the caller graph for this function:

◆ qMkTime()

time_t qMkTime ( struct tm * when)

Definition at line 353 of file qtenvironmentvariables.cpp.

References environmentMutex.

Referenced by QLocalTime::computeSystemMillisRange(), and QLocalTime::getCurrentStandardUtcOffset().

+ Here is the caller graph for this function:

◆ qputenv()

bool qputenv ( const char * varName,
QByteArrayView raw )

Definition at line 268 of file qtenvironmentvariables.cpp.

References environmentMutex, qstrdup(), and str.

Referenced by QGraphicsFrameCaptureMetal::QGraphicsFrameCaptureMetal(), QQmlDataTest::QQmlDataTest(), initEnvironment(), installCoverageTool(), main(), QEglFSVivIntegration::platformInit(), QEglFSVivWaylandIntegration::platformInit(), QStatusNotifierItemAdaptor::ProvideXdgActivationToken(), and quick_test_main_with_setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qTzName()

QString qTzName ( int dstIndex)

Definition at line 407 of file qtenvironmentvariables.cpp.

References environmentMutex, QString::fromLocal8Bit(), and ok.

Referenced by QLocalTime::localTimeAbbbreviationAt(), and startsWithLocalTimeZone().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qTzSet()

void qTzSet ( )

Definition at line 340 of file qtenvironmentvariables.cpp.

References environmentMutex.

Referenced by QLocalTime::getCurrentStandardUtcOffset().

+ Here is the caller graph for this function:

Variable Documentation

◆ environmentMutex

QT_BEGIN_NAMESPACE static Q_CONSTINIT QBasicMutex environmentMutex
static