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
qprocess_darwin.mm
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:critical reason:execute-external-code
4
5#include <private/qprocess_p.h>
6
7#import <Foundation/Foundation.h>
8
10
11QProcessEnvironment QProcessEnvironment::systemEnvironment()
12{
13 __block QProcessEnvironment env;
14 [[[NSProcessInfo processInfo] environment]
15 enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSString *value, BOOL *__unused stop) {
16 env.d->vars.insert(
17 QProcessEnvironmentPrivate::Key(QString::fromNSString(name).toLocal8Bit()),
18 QProcessEnvironmentPrivate::Value(QString::fromNSString(value).toLocal8Bit()));
19 }];
20 return env;
21}
22
23QT_END_NAMESPACE
\inmodule QtCore
Definition qprocess.h:33