Mercurial > hg > tony
changeset 196:38d726399c90
Fix #889 for non-Mac platforms and leave a note about Macs
author | Chris Cannam |
---|---|
date | Wed, 05 Mar 2014 11:27:24 +0000 |
parents | 797395e56489 |
children | 73fafd70996e |
files | src/main.cpp |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);