QTfrontend/main.cpp
changeset 5257 0bbdd47522b9
parent 5252 ded882439548
child 5276 562070d3f978
equal deleted inserted replaced
5256:e3fada9358b0 5257:0bbdd47522b9
    55     HWApplication app(argc, argv);
    55     HWApplication app(argc, argv);
    56     app.setAttribute(Qt::AA_DontShowIconsInMenus,false);
    56     app.setAttribute(Qt::AA_DontShowIconsInMenus,false);
    57 
    57 
    58     QStringList arguments = app.arguments();
    58     QStringList arguments = app.arguments();
    59     QMap<QString, QString> parsedArgs;
    59     QMap<QString, QString> parsedArgs;
    60 #ifndef __APPLE__
       
    61 //HACK: it's difficult/rarely done to use command line args on macs anyways
       
    62 //      but why does this section of code make the app crash when opening a file?
       
    63     {
    60     {
    64         QList<QString>::iterator i = arguments.begin();
    61         QList<QString>::iterator i = arguments.begin();
    65         while(i != arguments.end()) {
    62         while(i != arguments.end()) {
    66             QString arg = *i;
    63             QString arg = *i;
    67 
    64 
    72             } else {
    69             } else {
    73               ++i;
    70               ++i;
    74             }
    71             }
    75         }
    72         }
    76     }
    73     }
    77 #endif
       
    78 
    74 
    79     if(parsedArgs.contains("data-dir")) {
    75     if(parsedArgs.contains("data-dir")) {
    80         QFileInfo f(parsedArgs["data-dir"]);
    76         QFileInfo f(parsedArgs["data-dir"]);
    81         if(!f.exists()) {
    77         if(!f.exists()) {
    82             qWarning() << "WARNING: Cannot open DATA_PATH=" << f.absoluteFilePath();
    78             qWarning() << "WARNING: Cannot open DATA_PATH=" << f.absoluteFilePath();