forked from qt-creator/qt-creator
Mac: Fix opening ui files in external designer
This commit is contained in:
@@ -79,15 +79,15 @@ static inline QString msgAppNotFound(const QString &id)
|
|||||||
static const char * const linguistBinaryC = "Linguist";
|
static const char * const linguistBinaryC = "Linguist";
|
||||||
static const char * const designerBinaryC = "Designer";
|
static const char * const designerBinaryC = "Designer";
|
||||||
|
|
||||||
// Mac: Change the call 'Foo.app/Contents/MacOS/Foo <file>' to
|
// Mac: Change the call 'Foo.app/Contents/MacOS/Foo <filelist>' to
|
||||||
// 'open Foo.app <file>'. Do this ONLY if you do not want to have
|
// 'open -a Foo.app <filelist>'. doesn't support generic command line arguments
|
||||||
// command line arguments
|
|
||||||
static void createMacOpenCommand(QString *binary, QStringList *arguments)
|
static void createMacOpenCommand(QString *binary, QStringList *arguments)
|
||||||
{
|
{
|
||||||
const int appFolderIndex = binary->lastIndexOf(QLatin1String("/Contents/MacOS/"));
|
const int appFolderIndex = binary->lastIndexOf(QLatin1String("/Contents/MacOS/"));
|
||||||
if (appFolderIndex != -1) {
|
if (appFolderIndex != -1) {
|
||||||
binary->truncate(appFolderIndex);
|
binary->truncate(appFolderIndex);
|
||||||
arguments->push_front(*binary);
|
arguments->push_front(*binary);
|
||||||
|
arguments->push_front(QLatin1String("-a"));
|
||||||
*binary = QLatin1String("open");
|
*binary = QLatin1String("open");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user