Hi, on Mac OS X, some helper apps are stored in the bundle, and thus have a space in the path string. The QProcess method 'start(const QString &program, OpenMode mode = ReadWrite)' fails to launch the apps unless they are quoted (see attached patch), as they interpret the space as the separation of the arguments.
However, this might also happen on other platforms, leading to strange issues. Maybe it would be better to *always* use the 'start(const QString &program, const QStringList &arguments, OpenMode mode = ReadWrite)' method which (if I understand the docs and some discussions on the net right) accepts the space without quoting. What do you think? Best, Albrecht.
Index: src/CMapQMAPExport.cpp
===================================================================
--- src/CMapQMAPExport.cpp (Revision 3205)
+++ src/CMapQMAPExport.cpp (Arbeitskopie)
@@ -84,10 +84,10 @@
path_cache2gtiff = QCoreApplication::applicationDirPath()+QDir::separator()+"cache2gtiff.exe";
#else
#if defined(Q_WS_MAC)
- // MacOS X: applications are stored in the bundle folder
- path_map2gcm = QString("%1/Resources/map2gcm").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
- path_map2jnx = QString("%1/Resources/map2jnx").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
- path_cache2gtiff = QString("%1/Resources/cache2gtiff").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
+ // MacOS X: applications are stored in the bundle folder, be sure to quote (space in path)
+ path_map2gcm = QString("\"%1/Resources/map2gcm\"").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
+ path_map2jnx = QString("\"%1/Resources/map2jnx\"").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
+ path_cache2gtiff = QString("\"%1/Resources/cache2gtiff\"").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
#else
path_map2gcm = "map2gcm";
path_map2jnx = MAP2JNX;
pgpgsLz4FKMnb.pgp
Description: PGP signature
------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
