equal
deleted
inserted
replaced
48 |
48 |
49 QStringList arguments = app.arguments(); |
49 QStringList arguments = app.arguments(); |
50 QMap<QString, QString> parsedArgs; |
50 QMap<QString, QString> parsedArgs; |
51 { |
51 { |
52 QList<QString>::iterator i = arguments.begin(); |
52 QList<QString>::iterator i = arguments.begin(); |
53 while(++i != arguments.end()) { |
53 while(i != arguments.end()) { |
54 QString arg = *i; |
54 QString arg = *i; |
55 |
55 |
56 QRegExp opt("--(\\S+)=(.+)"); |
56 QRegExp opt("--(\\S+)=(.+)"); |
57 if(opt.exactMatch(arg)) { |
57 if(opt.exactMatch(arg)) { |
58 parsedArgs[opt.cap(1)] = opt.cap(2); |
58 parsedArgs[opt.cap(1)] = opt.cap(2); |
59 arguments.erase(i); |
59 i = arguments.erase(i); |
|
60 } else { |
|
61 ++i; |
60 } |
62 } |
61 } |
63 } |
62 } |
64 } |
63 |
65 |
64 if(parsedArgs.contains("data-dir")) { |
66 if(parsedArgs.contains("data-dir")) { |