Commit 386ce4f6 authored by Christian Kamm's avatar Christian Kamm
Browse files

qmldump: Use binary that's shipped with Qt if available.

Change-Id: Ia36dcc2596fbe6aef5014d03ed0303d3087ecc0b
Reviewed-on: http://codereview.qt.nokia.com/547

Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 0f254adc
......@@ -174,6 +174,17 @@ static inline QStringList validBinaryFilenames(bool debugBuild)
return list;
}
static inline QStringList validPrebuiltFilenames(bool debugBuild)
{
QStringList list = QStringList(QLatin1String("qmlplugindump"));
list.append(QLatin1String("qmlplugindump.app/Contents/MacOS/qmlplugindump"));
if (debugBuild)
list.prepend(QLatin1String("qmlplugindumpd.exe"));
else
list.prepend(QLatin1String("qmlplugindump.exe"));
return list;
}
static bool hasPrivateHeaders(const QString &qtInstallHeaders) {
const QString header = qtInstallHeaders
+ QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h");
......@@ -239,6 +250,11 @@ QString QmlDumpTool::toolByInstallData(const QString &qtInstallData, const QStri
if (!Core::ICore::instance())
return QString();
// check for prebuilt binary first
QFileInfo fileInfo;
if (getHelperFileInfoFor(validPrebuiltFilenames(debugDump), qtInstallData + QLatin1String("/bin/"), &fileInfo))
return fileInfo.absoluteFilePath();
const QStringList directories = installDirectories(qtInstallData);
const QStringList binFilenames = validBinaryFilenames(debugDump);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment