| 1205 | } |
| 1206 | |
| 1207 | void |
| 1208 | AppManagerPrivate::handleCommandLineArgs(int argc, char** argv) |
| 1209 | { |
| 1210 | // Ensure the arguments are Utf-8 encoded |
| 1211 | std::vector<std::string> utf8Args; |
| 1212 | if (argv) { |
| 1213 | CLArgs::ensureCommandLineArgsUtf8(argc, argv, &utf8Args); |
| 1214 | } else { |
| 1215 | // If the user didn't specify launch arguments (e.g unit testing), |
| 1216 | // At least append the binary path |
| 1217 | std::string path = ProcInfo::applicationDirPath(0); |
| 1218 | utf8Args.push_back(path); |
| 1219 | } |
| 1220 | |
| 1221 | copyUtf8ArgsToMembers(utf8Args); |
| 1222 | } |
| 1223 | |
| 1224 | void |
| 1225 | AppManagerPrivate::handleCommandLineArgsW(int argc, wchar_t** argv) |