-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_args.cpp
More file actions
23 lines (20 loc) · 778 Bytes
/
test_args.cpp
File metadata and controls
23 lines (20 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include <QString>
int main(int argc, char *argv[]) {
std::cout << "argc: " << argc << std::endl;
for (int i = 0; i < argc; ++i) {
std::cout << "argv[" << i << "]: " << argv[i] << std::endl;
}
bool simulate_full_app = false;
for (int i = 1; i < argc; ++i) {
QString arg = QString::fromLocal8Bit(argv[i]);
std::cout << "Checking arg: '" << arg.toStdString() << "'" << std::endl;
if (arg == "--full-mode" || arg == "--simulate-full" || arg.contains("simulate-full")) {
simulate_full_app = true;
std::cout << "FOUND simulate-full flag!" << std::endl;
break;
}
}
std::cout << "Final simulate_full_app: " << simulate_full_app << std::endl;
return 0;
}