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
qcorecmdlineargs_p.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
4#ifndef QCORECMDLINEARGS_P_H
5#define QCORECMDLINEARGS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/private/qglobal_p.h>
19#include "QtCore/qstring.h"
20#include "QtCore/qstringlist.h"
21
22#if defined(Q_OS_WIN)
23# ifdef Q_OS_WIN32
24# include <qt_windows.h> // first to suppress min, max macros.
25# include <shlobj.h>
26# else
27# include <qt_windows.h>
28# endif
29
31
32#if defined(Q_OS_WIN32)
33
34static inline QStringList qWinCmdArgs(const QString &cmdLine)
35{
37 int size;
38 if (wchar_t **argv = CommandLineToArgvW((const wchar_t *)cmdLine.utf16(), &size)) {
39 result.reserve(size);
40 wchar_t **argvEnd = argv + size;
41 for (wchar_t **a = argv; a < argvEnd; ++a)
43 LocalFree(argv);
44 }
45 return result;
46}
47
48#endif // Q_OS_WIN32
49
51
52#endif // Q_OS_WIN
53
54#endif // QCORECMDLINEARGS_WIN_P_H
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static QString fromWCharArray(const wchar_t *string, qsizetype size=-1)
Definition qstring.h:1309
Combined button and popup list for selecting options.
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint64EXT * result
[6]