# HG changeset patch # User Chris Cannam # Date 1394018844 0 # Node ID 38d726399c90dbfd8819fc46591dc15fdd3afc85 # Parent 797395e56489c1f972d0d4b55e45d6fc49c74be0 Fix #889 for non-Mac platforms and leave a note about Macs diff -r 797395e56489 -r 38d726399c90 src/main.cpp --- a/src/main.cpp Wed Mar 05 10:56:35 2014 +0000 +++ b/src/main.cpp Wed Mar 05 11:27:24 2014 +0000 @@ -146,8 +146,14 @@ TonyApplication application(argc, argv); -// QStringList args = application.arguments(); + // For some weird reason, Mac builds are crashing on startup when + // this line is present. Eliminate it on that platform for now. +#ifndef Q_OS_MAC + QStringList args = application.arguments(); +#else + cerr << "NOTE: Command-line arguments are currently disabled on Mac, see comments in main.cpp" << endl; QStringList args; +#endif signal(SIGINT, signalHandler); signal(SIGTERM, signalHandler); @@ -285,6 +291,10 @@ MainWindow::FileOpenStatus status = MainWindow::FileOpenFailed; +#ifdef Q_OS_WIN32 + path.replace("\\", "/"); +#endif + if (path.endsWith("ton")) { if (!haveSession) { status = m_mainWindow->openSessionFile(path);