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

@@ -32,7 +32,6 @@
#include "qmlprojectmanagerconstants.h"
#include "qmlprojecttarget.h"
#include "projectexplorer/projectexplorer.h"
#include <coreplugin/mimedatabase.h>
#include <projectexplorer/buildconfiguration.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -45,6 +44,7 @@
#include <utils/detailswidget.h>
#include <qt4projectmanager/qtversionmanager.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qmlobservertool.h>
#include <QFormLayout>
#include <QComboBox>
@@ -371,47 +371,19 @@ QString QmlProjectRunConfiguration::viewerDefaultPath() const
{
QString path;
// Search for QmlObserver
#ifdef Q_OS_MAC
const QString qmlObserverName = QLatin1String("QMLObserver.app");
#else
const QString qmlObserverName = QLatin1String("qmlobserver");
#endif
QDir appDir(QCoreApplication::applicationDirPath());
QString qmlObserverPath;
#ifdef Q_OS_WIN
qmlObserverPath = appDir.absoluteFilePath(qmlObserverName + QLatin1String(".exe"));
#else
qmlObserverPath = appDir.absoluteFilePath(qmlObserverName);
#endif
if (QFileInfo(qmlObserverPath).exists()) {
return qmlObserverPath;
}
// Search for QmlViewer
// prepend creator/bin dir to search path (only useful for special creator-qml package)
const QString searchPath = QCoreApplication::applicationDirPath()
+ Utils::SynchronousProcess::pathSeparator()
+ QString::fromLocal8Bit(qgetenv("PATH"));
#ifdef Q_OS_MAC
const QString qmlViewerName = QLatin1String("QMLViewer");
#else
const QString qmlViewerName = QLatin1String("qmlviewer");
#endif
path = Utils::SynchronousProcess::locateBinary(searchPath, qmlViewerName);
if (!path.isEmpty())
return path;
// Try to locate default path in Qt Versions
Qt4ProjectManager::QtVersionManager *qtVersions = Qt4ProjectManager::QtVersionManager::instance();
foreach (Qt4ProjectManager::QtVersion *version, qtVersions->validVersions()) {
if (!version->qmlviewerCommand().isEmpty()
&& version->supportsTargetId(Qt4ProjectManager::Constants::DESKTOP_TARGET_ID)) {
return version->qmlviewerCommand();
if (version->supportsTargetId(Qt4ProjectManager::Constants::DESKTOP_TARGET_ID)) {
// Search for QmlObserver
const QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA");
path = Qt4ProjectManager::QmlObserverTool::toolByInstallData(qtInstallData);
if (path.isEmpty() && !version->qmlviewerCommand().isEmpty()) {
path = version->qmlviewerCommand();
break;
}
}
}