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

Function parseArgs

gui/src/main.cpp:182–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182QStringList parseArgs(int argc, char **argv) {
183 QStringList parsedFilePaths;
184
185 for (int i = 1; i < argc; i++) {
186#ifdef Q_OS_WIN
187 QString p = QString::fromLocal8Bit(argv[i]);
188#else
189 QString p = argv[i];
190#endif
191 if (p.startsWith("file://")) p = p.remove(0, 7);
192
193 if ((parsedFilePaths.size() == 0) && QFileInfo(p).isDir()) {
194 parsedFilePaths << p;
195 break;
196 }
197
198 if (QFileInfo(p).isFile()) parsedFilePaths << p;
199 }
200 return parsedFilePaths;
201}
202
203void regSignal() {
204#ifdef Q_OS_WIN

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected