aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/projectexplorer/debugginghelper.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qmldebugginglibrary.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qmldumptool.cpp21
-rw-r--r--src/plugins/qt4projectmanager/qmldumptool.h3
-rw-r--r--src/plugins/qt4projectmanager/qmlobservertool.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.cpp8
6 files changed, 25 insertions, 13 deletions
diff --git a/src/plugins/projectexplorer/debugginghelper.cpp b/src/plugins/projectexplorer/debugginghelper.cpp
index 2fd06bc58bc..57cf1add651 100644
--- a/src/plugins/projectexplorer/debugginghelper.cpp
+++ b/src/plugins/projectexplorer/debugginghelper.cpp
@@ -101,7 +101,7 @@ QString DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(const QStrin
const QStringList directories = DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
const QStringList binFilenames = validBinaryFilenames();
- return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
+ return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames, false);
}
QString DebuggingHelperLibrary::copy(const QString &qtInstallData,
diff --git a/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp b/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp
index f7d33b6ecf8..379275c73b5 100644
--- a/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp
+++ b/src/plugins/qt4projectmanager/qmldebugginglibrary.cpp
@@ -62,7 +62,7 @@ QString QmlDebuggingLibrary::libraryByInstallData(const QString &qtInstallData,
}
binFilenames << QLatin1String("libQmlJSDebugger.a");
- return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
+ return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames, false);
}
bool QmlDebuggingLibrary::canBuild(const QtVersion *qtVersion)
diff --git a/src/plugins/qt4projectmanager/qmldumptool.cpp b/src/plugins/qt4projectmanager/qmldumptool.cpp
index 27b8450ee95..84dc13a48ab 100644
--- a/src/plugins/qt4projectmanager/qmldumptool.cpp
+++ b/src/plugins/qt4projectmanager/qmldumptool.cpp
@@ -175,14 +175,20 @@ static inline QStringList validBinaryFilenames(bool debugBuild)
return list;
}
+static bool hasPrivateHeaders(const QString &qtInstallHeaders) {
+ const QString header = qtInstallHeaders
+ + QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h");
+ return QFile::exists(header);
+}
+
bool QmlDumpTool::canBuild(const QtVersion *qtVersion)
{
const QString installHeaders = qtVersion->versionInfo().value("QT_INSTALL_HEADERS");
- const QString header = installHeaders + QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h");
+
return (qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID)
|| (qtVersion->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)
&& (qtVersion->qtVersion() > QtVersionNumber(4, 7, 1))))
- && QFile::exists(header);
+ && hasPrivateHeaders(installHeaders);
}
static QtVersion *qtVersionForProject(ProjectExplorer::Project *project)
@@ -234,7 +240,8 @@ QString QmlDumpTool::toolForProject(ProjectExplorer::Project *project, bool debu
QtVersion *version = qtVersionForProject(project);
if (version) {
QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA");
- QString toolPath = toolByInstallData(qtInstallData, debugDump);
+ QString qtInstallHeaders = version->versionInfo().value("QT_INSTALL_HEADERS");
+ QString toolPath = toolByInstallData(qtInstallData, qtInstallHeaders, debugDump);
return toolPath;
}
@@ -258,17 +265,17 @@ static QStringList sourceFileNames()
return files;
}
-QString QmlDumpTool::toolByInstallData(const QString &qtInstallData, bool debugDump)
+QString QmlDumpTool::toolByInstallData(const QString &qtInstallData, const QString &qtInstallHeaders,
+ bool debugDump)
{
if (!Core::ICore::instance())
return QString();
- const QString mainFilename = Core::ICore::instance()->resourcePath()
- + QLatin1String("/qml/qmldump/main.cpp");
const QStringList directories = installDirectories(qtInstallData);
const QStringList binFilenames = validBinaryFilenames(debugDump);
- return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
+ return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames,
+ !hasPrivateHeaders(qtInstallHeaders));
}
QStringList QmlDumpTool::locationsByInstallData(const QString &qtInstallData, bool debugDump)
diff --git a/src/plugins/qt4projectmanager/qmldumptool.h b/src/plugins/qt4projectmanager/qmldumptool.h
index eca3a7a5f56..c60c2bc4f99 100644
--- a/src/plugins/qt4projectmanager/qmldumptool.h
+++ b/src/plugins/qt4projectmanager/qmldumptool.h
@@ -53,7 +53,8 @@ class QT4PROJECTMANAGER_EXPORT QmlDumpTool : public Utils::BuildableHelperLibrar
public:
static bool canBuild(const QtVersion *qtVersion);
static QString toolForProject(ProjectExplorer::Project *project, bool debugDump);
- static QString toolByInstallData(const QString &qtInstallData, bool debugDump);
+ static QString toolByInstallData(const QString &qtInstallData, const QString &qtInstallHeaders,
+ bool debugDump);
static QStringList locationsByInstallData(const QString &qtInstallData, bool debugDump);
// Build the helpers and return the output log/errormessage.
diff --git a/src/plugins/qt4projectmanager/qmlobservertool.cpp b/src/plugins/qt4projectmanager/qmlobservertool.cpp
index d9db94f41a2..42295a4a559 100644
--- a/src/plugins/qt4projectmanager/qmlobservertool.cpp
+++ b/src/plugins/qt4projectmanager/qmlobservertool.cpp
@@ -86,7 +86,7 @@ QString QmlObserverTool::toolByInstallData(const QString &qtInstallData)
const QStringList directories = installDirectories(qtInstallData);
const QStringList binFilenames = validBinaryFilenames();
- return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames);
+ return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames, false);
}
QStringList QmlObserverTool::locationsByInstallData(const QString &qtInstallData)
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 8c5c1345fe9..6bfb61d952f 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -1271,11 +1271,14 @@ void QtVersion::updateVersionInfo() const
if (m_versionInfo.contains("QT_INSTALL_DATA")) {
QString qtInstallData = m_versionInfo.value("QT_INSTALL_DATA");
+ QString qtHeaderData = m_versionInfo.value("QT_INSTALL_HEADERS");
m_versionInfo.insert("QMAKE_MKSPECS", QDir::cleanPath(qtInstallData+"/mkspecs"));
if (!qtInstallData.isEmpty()) {
m_hasDebuggingHelper = !DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData).isEmpty();
- m_hasQmlDump = !QmlDumpTool::toolByInstallData(qtInstallData, false).isEmpty() || !QmlDumpTool::toolByInstallData(qtInstallData, true).isEmpty();
+ m_hasQmlDump
+ = !QmlDumpTool::toolByInstallData(qtInstallData, qtHeaderData, false).isEmpty()
+ || !QmlDumpTool::toolByInstallData(qtInstallData, qtHeaderData, true).isEmpty();
m_hasQmlDebuggingLibrary
= !QmlDebuggingLibrary::libraryByInstallData(qtInstallData, false).isEmpty()
|| !QmlDebuggingLibrary::libraryByInstallData(qtInstallData, true).isEmpty();
@@ -1975,9 +1978,10 @@ QString QtVersion::gdbDebuggingHelperLibrary() const
QString QtVersion::qmlDumpTool(bool debugVersion) const
{
QString qtInstallData = versionInfo().value("QT_INSTALL_DATA");
+ QString qtHeaderData = versionInfo().value("QT_INSTALL_HEADERS");
if (qtInstallData.isEmpty())
return QString();
- return QmlDumpTool::toolByInstallData(qtInstallData, debugVersion);
+ return QmlDumpTool::toolByInstallData(qtInstallData, qtHeaderData, debugVersion);
}
QString QtVersion::qmlDebuggingHelperLibrary(bool debugVersion) const