42 #ifndef QCORECMDLINEARGS_P_H 43 #define QCORECMDLINEARGS_P_H 56 #include "QtCore/qstring.h" 57 #include "QtCore/qstringlist.h" 61 #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) 64 #include "QtCore/qvector.h" 65 #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) 73 template<
typename Char>
78 Char *p_end = p + length;
82 while (*p && p < p_end) {
83 while (
QChar((
short)(*p)).isSpace())
85 if (*p && p < p_end) {
88 if (*p ==
Char(
'\"') || *p ==
Char(
'\'')) {
96 while (*p && p < p_end) {
100 if (
QChar((
short)(*p)).isSpace())
109 if (!quote && (*p ==
Char(
'\"') || *p ==
Char(
'\''))) {
112 }
else if (
QChar((
short)(*p)).isSpace() && !quote)
122 if (argc >= (
int)argv.
size()-1)
124 argv[argc++] = start;
132 #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) 139 for (
int a = 0;
a < argc; ++
a) {
154 #else // !Q_OS_WIN || !Q_OS_SYMBIAN 159 for (
int i = 0; i != argc; ++i)
164 #endif // Q_OS_WIN || Q_OS_SYMBIAN 168 #endif // QCORECMDLINEARGS_WIN_P_H static QString fromWCharArray(const wchar_t *, int size=-1)
Returns a copy of the string, where the encoding of string depends on the size of wchar...
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
static QStringList qWinCmdArgs(QString cmdLine)
#define QT_END_NAMESPACE
This macro expands to.
int length() const
Returns the number of characters in this string.
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
long ASN1_INTEGER_get ASN1_INTEGER * a
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
The QChar class provides a 16-bit Unicode character.
void resize(int size)
Sets the size of the vector to size.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QStringList class provides a list of strings.
static QVector< Char * > qWinCmdLine(Char *cmdParam, int length, int &argc)
static QStringList qCmdLineArgs(int argc, char *argv[])
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
int size() const
Returns the number of items in the vector.
const ushort * utf16() const
Returns the QString as a '\0\'-terminated array of unsigned shorts.