diff -r f31d1073345e -r ded882439548 QTfrontend/main.cpp --- a/QTfrontend/main.cpp Wed Jun 15 23:59:44 2011 +0200 +++ b/QTfrontend/main.cpp Sat Jun 18 03:14:45 2011 +0200 @@ -16,7 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include +#include "HWApplication.h" + #include #include #include @@ -51,11 +52,14 @@ } int main(int argc, char *argv[]) { - QApplication app(argc, argv); + HWApplication app(argc, argv); app.setAttribute(Qt::AA_DontShowIconsInMenus,false); QStringList arguments = app.arguments(); QMap parsedArgs; +#ifndef __APPLE__ +//HACK: it's difficult/rarely done to use command line args on macs anyways +// but why does this section of code make the app crash when opening a file? { QList::iterator i = arguments.begin(); while(i != arguments.end()) { @@ -70,6 +74,7 @@ } } } +#endif if(parsedArgs.contains("data-dir")) { QFileInfo f(parsedArgs["data-dir"]); @@ -455,8 +460,8 @@ CocoaInitializer initializer; #endif - HWForm *Form = new HWForm(); + app.form = new HWForm(); - Form->show(); + app.form->show(); return app.exec(); }