Commit 98a4e1fb authored by Olivier Goffart's avatar Olivier Goffart
Browse files

Remove more dead code

parent 87c7ca5c
......@@ -104,11 +104,6 @@ using namespace QmlJS::AST;
using namespace QmlJSInspector::Internal;
using namespace Debugger::Internal;
enum {
MaxConnectionAttempts = 50,
ConnectionAttemptDefaultInterval = 75,
......@@ -124,9 +119,6 @@ Inspector::Inspector(QObject *parent)
: QObject(parent),
m_connectionTimer(new QTimer(this)),
m_connectionAttempts(0),
m_cppDebuggerState(0),
m_simultaneousCppAndQmlDebugMode(false),
m_debugMode(StandaloneMode),
m_listeningToEditorManager(false),
m_debugProject(0)
{
......@@ -142,14 +134,9 @@ Inspector::Inspector(QObject *parent)
connect(m_clientProxy, SIGNAL(connectionStatusMessage(QString)), SIGNAL(statusMessage(QString)));
connect(m_clientProxy, SIGNAL(connected(QDeclarativeEngineDebug*)), SLOT(connected(QDeclarativeEngineDebug*)));
connect(m_clientProxy, SIGNAL(disconnected()), SLOT(disconnected()));
connect(m_clientProxy, SIGNAL(aboutToReloadEngines()), SLOT(aboutToReloadEngines()));
connect(m_clientProxy, SIGNAL(enginesChanged()), SLOT(updateEngineList()));
connect(m_clientProxy, SIGNAL(aboutToDisconnect()), SLOT(disconnectWidgets()));
connect(m_clientProxy, SIGNAL(serverReloaded()), this, SLOT(serverReloaded()));
connect(Debugger::DebuggerPlugin::instance(),
SIGNAL(stateChanged(int)), this, SLOT(debuggerStateChanged(int)));
connect(m_connectionTimer, SIGNAL(timeout()), SLOT(pollInspector()));
}
......@@ -158,22 +145,13 @@ Inspector::~Inspector()
{
}
void Inspector::disconnectWidgets()
{
}
void Inspector::disconnected()
{
m_debugProject = 0;
resetViews();
updateMenuActions();
applyChangesToQmlObserverHelper(false);
}
void Inspector::aboutToReloadEngines()
{
}
void Inspector::updateEngineList()
{
const QList<QDeclarativeDebugEngineReference> engines = m_clientProxy->engines();
......@@ -193,11 +171,6 @@ void Inspector::changeSelectedItems(const QList<QDeclarativeDebugObjectReference
m_clientProxy->setSelectedItemsByObjectId(objects);
}
void Inspector::shutdown()
{
//#warning save the inspector settings here
}
void Inspector::pollInspector()
{
++m_connectionAttempts;
......@@ -217,7 +190,6 @@ void Inspector::pollInspector()
tr("Failed to connect to debugger"),
tr("Could not connect to debugger server.") );
}
updateMenuActions();
}
QmlJS::ModelManagerInterface *Inspector::modelManager()
......@@ -320,7 +292,6 @@ bool Inspector::setDebugConfigurationDataFromProject(ProjectExplorer::Project *p
void Inspector::startQmlProjectDebugger()
{
m_simultaneousCppAndQmlDebugMode = false;
m_connectionTimer->start();
}
......@@ -334,61 +305,6 @@ void Inspector::resetViews()
m_crumblePath->updateContextPath(QStringList());
}
void Inspector::simultaneouslyDebugQmlCppApplication()
{
QString errorMessage;
ProjectExplorer::ProjectExplorerPlugin *pex = ProjectExplorer::ProjectExplorerPlugin::instance();
ProjectExplorer::Project *project = pex->startupProject();
if (!project)
errorMessage = tr("No project was found.");
else if (project->id() == QLatin1String("QmlProjectManager.QmlProject"))
errorMessage = attachToQmlViewerAsExternalApp(project);
else
errorMessage = attachToExternalCppAppWithQml(project);
if (!errorMessage.isEmpty())
QMessageBox::warning(Core::ICore::instance()->mainWindow(), tr("Failed to debug C++ and QML"), errorMessage);
}
QString Inspector::attachToQmlViewerAsExternalApp(ProjectExplorer::Project *project)
{
Q_UNUSED(project);
//#warning implement attachToQmlViewerAsExternalApp
return QString();
}
QString Inspector::attachToExternalCppAppWithQml(ProjectExplorer::Project *project)
{
Q_UNUSED(project);
//#warning implement attachToExternalCppAppWithQml
return QString();
}
QString Inspector::executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl,
ProjectExplorer::Environment *environment)
{
Q_UNUSED(debuggableRunControl);
Q_UNUSED(environment);
ProjectExplorer::ProjectExplorerPlugin *pex = ProjectExplorer::ProjectExplorerPlugin::instance();
// to make sure we have a valid, debuggable run control, find the correct factory for it
if (debuggableRunControl) {
// modify the env
debuggableRunControl->setCustomEnvironment(*environment);
pex->startRunControl(debuggableRunControl, ProjectExplorer::Constants::DEBUGMODE);
m_simultaneousCppAndQmlDebugMode = true;
return QString();
}
return tr("A valid run control was not registered in Qt Creator for this project run configuration.");
}
void Inspector::connected(QDeclarativeEngineDebug *client)
{
m_debugProject = ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject();
......@@ -397,21 +313,6 @@ void Inspector::connected(QDeclarativeEngineDebug *client)
resetViews();
}
void Inspector::updateMenuActions()
{
bool enabled = true;
if (m_simultaneousCppAndQmlDebugMode)
enabled = (m_cppDebuggerState == Debugger::DebuggerNotReady && m_clientProxy->isUnconnected());
else
enabled = m_clientProxy->isUnconnected();
}
void Inspector::debuggerStateChanged(int newState)
{
m_cppDebuggerState = newState;
updateMenuActions();
}
void Inspector::reloadQmlViewer()
{
m_clientProxy->reloadQmlViewer();
......
......@@ -83,7 +83,6 @@ public:
virtual ~Inspector();
bool connectToViewer(); // using host, port from widgets
void shutdown();
// returns false if project is not debuggable.
bool setDebugConfigurationDataFromProject(ProjectExplorer::Project *projectToDebug);
......@@ -115,20 +114,15 @@ public slots:
private slots:
void gotoObjectReferenceDefinition(const QDeclarativeDebugObjectReference &obj);
void simultaneouslyDebugQmlCppApplication();
void debuggerStateChanged(int newState);
void pollInspector();
void setSelectedItemsByObjectReference(QList<QDeclarativeDebugObjectReference> objectReferences);
void changeSelectedItems(const QList<QDeclarativeDebugObjectReference> &objects);
void updateMenuActions();
void connected(QDeclarativeEngineDebug *client);
void aboutToReloadEngines();
void updateEngineList();
void disconnectWidgets();
void disconnected();
void removePreviewForEditor(Core::IEditor *newEditor);
......@@ -140,12 +134,6 @@ private slots:
void currentDebugProjectRemoved();
private:
QString executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl,
ProjectExplorer::Environment *environment);
QString attachToQmlViewerAsExternalApp(ProjectExplorer::Project *project);
QString attachToExternalCppAppWithQml(ProjectExplorer::Project *project);
bool addQuotesForData(const QVariant &value) const;
void resetViews();
......@@ -160,10 +148,6 @@ private:
InspectorContext *m_context;
QTimer *m_connectionTimer;
int m_connectionAttempts;
int m_cppDebuggerState;
bool m_connectionInitialized;
bool m_simultaneousCppAndQmlDebugMode;
DebugMode m_debugMode;
ClientProxy *m_clientProxy;
static bool m_showExperimentalWarning;
......
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