MCPcopy Create free account
hub / github.com/QNapi/qnapi / splitArguments

Method splitArguments

gui/src/qcumber/qmanagedrequest.cpp:63–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63QStringList QManagedRequest::splitArguments(const QString& s) {
64 int i = -1;
65 QStringList d, l = s.split(QRegExp("\\s"));
66
67 while (++i < l.count()) {
68 if (l.at(i).startsWith("\"")) {
69 QString arg;
70
71 do {
72 arg += " ";
73 arg += l.at(i);
74 } while (!arg.endsWith("\"") && (++i < l.count()));
75
76 arg.remove(0, 2);
77
78 if (arg.endsWith("\"")) arg.chop(1);
79
80 d << arg;
81 } else {
82 d << l.at(i);
83 }
84 }
85
86 return d;
87}
88
89QByteArray QManagedRequest::joinArguments(const QString& cmd,
90 const QStringList& l) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected