Commit 37f90fd6 authored by Aurindam Jana's avatar Aurindam Jana Committed by hjk

QmlProfiler: remove dependency on QmlProjectManager

Change-Id: I6c13ce1636bbaf201602e4a9473aca4f9953d1cb
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 612528a9
......@@ -6,7 +6,6 @@ QTC_PLUGIN_DEPENDS += \
analyzerbase \
coreplugin \
projectexplorer \
qmlprojectmanager \
qmljstools \
qtsupport \
texteditor
......@@ -38,16 +38,19 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qmlprojectmanager/qmlprojectplugin.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/localapplicationruncontrol.h>
#include <projectexplorer/localapplicationrunconfiguration.h>
#include <qtsupport/qtsupportconstants.h>
#include <qmldebug/qmloutputparser.h>
#include <QMainWindow>
#include <QMessageBox>
#include <QTimer>
#include <QTcpServer>
#include <QApplication>
#include <QMessageBox>
#include <QPushButton>
using namespace Analyzer;
using namespace Core;
......@@ -113,7 +116,7 @@ bool QmlProfilerRunControl::startEngine()
if (ProjectExplorer::LocalApplicationRunConfiguration *rc =
qobject_cast<ProjectExplorer::LocalApplicationRunConfiguration *>(runConfiguration())) {
if (rc->executable().isEmpty()) {
QmlProjectManager::QmlProjectPlugin::showQmlObserverToolWarning();
showQmlObserverToolWarning();
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
AnalyzerManager::stopTool();
return false;
......@@ -314,5 +317,28 @@ void QmlProfilerRunControl::profilerStateChanged()
}
}
void QmlProfilerRunControl::showQmlObserverToolWarning()
{
QMessageBox dialog(QApplication::activeWindow());
QPushButton *qtPref = dialog.addButton(tr("Open Qt Versions"),
QMessageBox::ActionRole);
dialog.addButton(QMessageBox::Cancel);
dialog.setDefaultButton(qtPref);
dialog.setWindowTitle(tr("QML Observer Missing"));
dialog.setText(tr("QML Observer could not be found for this Qt version."));
dialog.setInformativeText(tr(
"QML Observer is used to offer debugging features for "
"Qt Quick UI projects in the Qt 4.7 series.\n\n"
"To compile QML Observer, go to the Qt Versions page, "
"select the current Qt version, "
"and click Build in the Helpers section."));
dialog.exec();
if (dialog.clickedButton() == qtPref) {
Core::ICore::showOptionsDialog(
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID);
}
}
} // namespace Internal
} // namespace QmlProfiler
......@@ -75,6 +75,9 @@ private slots:
private slots:
void profilerStateChanged();
private:
void showQmlObserverToolWarning();
private:
class QmlProfilerEnginePrivate;
QmlProfilerEnginePrivate *d;
......
......@@ -44,7 +44,6 @@
#include "canvas/qdeclarativecontext2d_p.h"
#include "canvas/qmlprofilercanvas.h"
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
#include <utils/fancymainwindow.h>
#include <utils/fileinprojectfinder.h>
#include <utils/qtcassert.h>
......@@ -89,7 +88,6 @@ using namespace QmlProfiler::Internal;
using namespace QmlProfiler::Constants;
using namespace QmlDebug;
using namespace ProjectExplorer;
using namespace QmlProjectManager;
class QmlProfilerTool::QmlProfilerToolPrivate
{
......
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