Hi all, unfortunately, the patch I submitted for r3154 as to fix the detection of map2jnx on OS X (where the path contains a space) is broken:
When calling the method QProcess::start(app), the spaces in app /must/ be escaped (i.e. the path /must/ be wrapped in spaces), but when calling QProcess::start(app, args), app /must not/ be escaped... Unfortunately, I only tested if map2jnx was detected (first call variant), but not if it was actually producing a new map. [shame on me - searching for a big brown paper bag in which I can hide] The patch below removes the wrong quotes, and replaces the test call for map2jnx by the second start variant, with an empty args list. And, yes, I now tested everything... Best, Albrecht.
Index: src/CMapQMAPExport.cpp
===================================================================
--- src/CMapQMAPExport.cpp (Revision 3283)
+++ src/CMapQMAPExport.cpp (Arbeitskopie)
@@ -101,11 +101,11 @@
path_map2rmap = QCoreApplication::applicationDirPath()+QDir::separator()+"map2rmap.exe";
#else
#if defined(Q_WS_MAC)
- // 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$"), ""));
- path_map2rmap = QString("\"%1/Resources/map2rmap\"").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
+ // 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$"), ""));
+ path_map2rmap = QString("%1/Resources/map2rmap").arg(QCoreApplication::applicationDirPath().replace(QRegExp("MacOS$"), ""));
#else
path_map2gcm = "map2gcm";
path_map2jnx = MAP2JNX;
@@ -113,7 +113,7 @@
path_map2rmap = "map2rmap";
#endif
QProcess proc1;
- proc1.start(path_map2jnx);
+ proc1.start(path_map2jnx, QStringList());
proc1.waitForFinished();
has_map2jnx = proc1.error() == QProcess::UnknownError;
#endif
pgpl8LoJhvFo7.pgp
Description: PGP signature
------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
