From ef11c4e7acdc735107ec0f6b2f142e7fe115332d Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@nokia.com> Date: Tue, 24 Aug 2010 17:07:11 +0200 Subject: [PATCH] Truned qmldump into an .app, and suppress its dock icon. --- src/plugins/qmljseditor/qmljsmodelmanager.cpp | 12 +++++--- src/tools/qml/qmldump/Info.plist | 29 +++++++++++++++++++ src/tools/qml/qmldump/qmldump.pro | 5 ++-- 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 src/tools/qml/qmldump/Info.plist diff --git a/src/plugins/qmljseditor/qmljsmodelmanager.cpp b/src/plugins/qmljseditor/qmljsmodelmanager.cpp index c8bd9183780..836ce34a15f 100644 --- a/src/plugins/qmljseditor/qmljsmodelmanager.cpp +++ b/src/plugins/qmljseditor/qmljsmodelmanager.cpp @@ -458,11 +458,15 @@ void ModelManager::loadQmlPluginTypes(const QString &pluginPath) static QString qmldumpPath; if (qmldumpPath.isNull()) { QDir qmldumpExecutable(QCoreApplication::applicationDirPath()); -#ifndef Q_OS_WIN - qmldumpPath = qmldumpExecutable.absoluteFilePath(QLatin1String("qmldump")); -#else +#ifdef Q_OS_WIN qmldumpPath = qmldumpExecutable.absoluteFilePath(QLatin1String("qmldump.exe")); -#endif +#else // !Q_OS_WIN +# ifdef Q_OS_MAC + qmldumpPath = qmldumpExecutable.absoluteFilePath(QLatin1String("qmldump.app/Contents/MacOS/qmldump")); +# else // !Q_OS_MAC + qmldumpPath = qmldumpExecutable.absoluteFilePath(QLatin1String("qmldump")); +# endif // Q_OS_MAC +#endif // Q_OS_WIN QFileInfo qmldumpFileInfo(qmldumpPath); if (!qmldumpFileInfo.exists()) { qWarning() << "ModelManager::loadQmlPluginTypes: qmldump executable does not exist at" << qmldumpPath; diff --git a/src/tools/qml/qmldump/Info.plist b/src/tools/qml/qmldump/Info.plist new file mode 100644 index 00000000000..cb0561b6f09 --- /dev/null +++ b/src/tools/qml/qmldump/Info.plist @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>NSHumanReadableCopyright</key> + <string>(C) 2008-2010 Nokia Corporation +Commercial Usage + +Licensees holding valid Qt Commercial licenses may use this file in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. + +GNU Lesser General Public License Usage + +Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation and appearing in the file LICENSE.LGPL included in the packaging of this file. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>@TYPEINFO@</string> + <key>CFBundleExecutable</key> + <string>@EXECUTABLE@</string> + <key>CFBundleIdentifier</key> + <string>com.nokia.qtcreator.qmldump</string> + <key>CFBundleVersion</key> + <string>2.1.80</string> + <key>CFBundleShortVersionString</key> + <string>2.1.80</string> + <key>LSUIElement</key> + <string>1</string> +</dict> +</plist> diff --git a/src/tools/qml/qmldump/qmldump.pro b/src/tools/qml/qmldump/qmldump.pro index d223914132d..a2d272caffc 100644 --- a/src/tools/qml/qmldump/qmldump.pro +++ b/src/tools/qml/qmldump/qmldump.pro @@ -6,8 +6,6 @@ TARGET = qmldump QT += declarative -CONFIG += console -CONFIG -= app_bundle TEMPLATE = app @@ -17,3 +15,6 @@ include(../../../../qtcreator.pri) include(../../../private_headers.pri) DESTDIR = $$IDE_BIN_PATH include(../../../rpath.pri) + +OTHER_FILES += Info.plist +macx:QMAKE_INFO_PLIST = Info.plist -- GitLab