QML Observer: Build together on runtime with debugging tools

Moved qmljsdebugger to a dir under qml/, made qmlobserver compile
without creator dependencies and made it compile with debugging
helpers.

Reviewed-by: hjk
This commit is contained in:
Lasse Holmstedt
2010-09-27 17:22:57 +02:00
parent 5d9858129a
commit 96d991bbdc
110 changed files with 1061 additions and 179 deletions

View File

@@ -40,6 +40,7 @@
#include "projectloadwizard.h"
#include "qt4buildconfiguration.h"
#include "findqt4profiles.h"
#include "qmldumptool.h"
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
@@ -50,6 +51,7 @@
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/customexecutablerunconfiguration.h>
#include <projectexplorer/projectexplorer.h>
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
@@ -584,6 +586,36 @@ void Qt4Project::updateQmlJSCodeModel()
}
projectInfo.importPaths.removeDuplicates();
if (projectInfo.qmlDumpPath.isNull()) {
ProjectExplorer::Project *activeProject = ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject();
projectInfo.qmlDumpPath = Qt4ProjectManager::QmlDumpTool::toolForProject(activeProject);
// ### this is needed for qmlproject and cmake project support, but may not work in all cases.
if (projectInfo.qmlDumpPath.isEmpty()) {
// Try to locate default path in Qt Versions
QtVersionManager *qtVersions = QtVersionManager::instance();
foreach (QtVersion *version, qtVersions->validVersions()) {
if (version->supportsTargetId(Constants::DESKTOP_TARGET_ID)) {
const QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA");
projectInfo.qmlDumpPath = QmlDumpTool::toolByInstallData(qtInstallData);
if (!projectInfo.qmlDumpPath.isEmpty()) {
break;
}
}
}
}
QFileInfo qmldumpFileInfo(projectInfo.qmlDumpPath);
if (!qmldumpFileInfo.exists()) {
qWarning() << "Qt4Project::loadQmlPluginTypes: qmldump executable does not exist at" << projectInfo.qmlDumpPath;
projectInfo.qmlDumpPath.clear();
} else if (!qmldumpFileInfo.isFile()) {
qWarning() << "Qt4Project::loadQmlPluginTypes: " << projectInfo.qmlDumpPath << " is not a file";
projectInfo.qmlDumpPath.clear();
}
}
modelManager->updateProjectInfo(projectInfo);
}