Commit 87c7ca5c authored by Olivier Goffart's avatar Olivier Goffart
Browse files

remove dead code

parent 8506f476
...@@ -143,10 +143,6 @@ void QmlEngine::setupEngine() ...@@ -143,10 +143,6 @@ void QmlEngine::setupEngine()
notifyEngineSetupOk(); notifyEngineSetupOk();
} }
void QmlEngine::setupConnection()
{
notifyEngineRunAndInferiorStopOk();
}
void QmlEngine::continueInferior() void QmlEngine::continueInferior()
{ {
......
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
private: private:
// DebuggerEngine implementation // DebuggerEngine implementation
bool isSynchroneous() const { return true; } bool isSynchroneous() const { return false; }
void executeStep(); void executeStep();
void executeStepOut(); void executeStepOut();
void executeNext(); void executeNext();
...@@ -103,75 +103,17 @@ private: ...@@ -103,75 +103,17 @@ private:
void reloadSourceFiles() {} void reloadSourceFiles() {}
void reloadFullStack() {} void reloadFullStack() {}
bool supportsThreads() const { return true; } bool supportsThreads() const { return false; }
void updateWatchData(const WatchData &data); void updateWatchData(const WatchData &data);
unsigned int debuggerCapabilities() const; unsigned int debuggerCapabilities() const;
void setupConnection();
signals: signals:
void sendMessage(const QByteArray &msg); void sendMessage(const QByteArray &msg);
private: private:
void expandObject(const QByteArray &iname, quint64 objectId); void expandObject(const QByteArray &iname, quint64 objectId);
void sendPing(); void sendPing();
#if 0
void createDockWidgets();
bool connectToViewer(); // using host, port from widgets
// returns false if project is not debuggable.
bool setDebugConfigurationDataFromProject(ProjectExplorer::Project *projectToDebug);
void startQmlProjectDebugger();
bool canEditProperty(const QString &propertyType);
QDeclarativeDebugExpressionQuery *executeExpression(int objectDebugId,
const QString &objectId, const QString &propertyName, const QVariant &value);
public slots:
void disconnectFromViewer();
void setSimpleDockWidgetArrangement();
private slots:
void treeObjectActivated(const QDeclarativeDebugObjectReference &obj);
void simultaneouslyDebugQmlCppApplication();
private:
void updateMenuActions();
QString attachToQmlViewerAsExternalApp(ProjectExplorer::Project *project);
QString attachToExternalCppAppWithQml(ProjectExplorer::Project *project);
bool addQuotesForData(const QVariant &value) const;
void resetViews();
QDeclarativeDebugEnginesQuery *m_engineQuery;
QDeclarativeDebugRootContextQuery *m_contextQuery;
Internal::ObjectTree *m_objectTreeWidget;
Internal::ObjectPropertiesView *m_propertiesWidget;
Internal::WatchTableModel *m_watchTableModel;
Internal::WatchTableView *m_watchTableView;
Internal::CanvasFrameRate *m_frameRateWidget;
Internal::ExpressionQueryWidget *m_expressionWidget;
Internal::EngineComboBox *m_engineComboBox;
QDockWidget *m_objectTreeDock;
QDockWidget *m_frameRateDock;
QDockWidget *m_expressionQueryDock;
QDockWidget *m_propertyWatcherDock;
QDockWidget *m_inspectorOutputDock;
Internal::InspectorSettings m_settings;
QmlProjectManager::QmlProjectRunConfigurationDebugData m_runConfigurationDebugData;
QStringList m_editablePropertyTypes;
// simultaneous debug mode stuff
int m_cppDebuggerState;
bool m_connectionInitialized;
bool m_simultaneousCppAndQmlDebugMode;
#endif
}; };
} // namespace Internal } // namespace Internal
......
...@@ -358,53 +358,6 @@ QString Inspector::attachToQmlViewerAsExternalApp(ProjectExplorer::Project *proj ...@@ -358,53 +358,6 @@ QString Inspector::attachToQmlViewerAsExternalApp(ProjectExplorer::Project *proj
//#warning implement attachToQmlViewerAsExternalApp //#warning implement attachToQmlViewerAsExternalApp
return QString(); return QString();
#if 0
m_debugMode = QmlProjectWithCppPlugins;
QmlProjectManager::QmlProjectRunConfiguration* runConfig =
qobject_cast<QmlProjectManager::QmlProjectRunConfiguration*>(project->activeTarget()->activeRunConfiguration());
if (!runConfig)
return tr("No run configurations were found for the project '%1'.").arg(project->displayName());
Internal::StartExternalQmlDialog dlg(Debugger::DebuggerUISwitcher::instance()->mainWindow());
QString importPathArgument = "-I";
QString execArgs;
if (runConfig->viewerArguments().contains(importPathArgument))
execArgs = runConfig->viewerArguments().join(" ");
else {
QFileInfo qmlFileInfo(runConfig->viewerArguments().last());
importPathArgument.append(" " + qmlFileInfo.absolutePath() + " ");
execArgs = importPathArgument + runConfig->viewerArguments().join(" ");
}
dlg.setPort(runConfig->debugServerPort());
dlg.setDebuggerUrl(runConfig->debugServerAddress());
dlg.setProjectDisplayName(project->displayName());
dlg.setDebugMode(Internal::StartExternalQmlDialog::QmlProjectWithCppPlugins);
dlg.setQmlViewerArguments(execArgs);
dlg.setQmlViewerPath(runConfig->viewerPath());
if (dlg.exec() != QDialog::Accepted)
return QString();
m_runConfigurationDebugData.serverAddress = dlg.debuggerUrl();
m_runConfigurationDebugData.serverPort = dlg.port();
m_settings.setExternalPort(dlg.port());
m_settings.setExternalUrl(dlg.debuggerUrl());
ProjectExplorer::Environment customEnv = ProjectExplorer::Environment::systemEnvironment(); // empty env by default
customEnv.set(QmlProjectManager::Constants::E_QML_DEBUG_SERVER_PORT, QString::number(m_settings.externalPort()));
Debugger::DebuggerRunControl *debuggableRunControl =
createDebuggerRunControl(runConfig, dlg.qmlViewerPath(), dlg.qmlViewerArguments());
return executeDebuggerRunControl(debuggableRunControl, &customEnv);
#endif
} }
QString Inspector::attachToExternalCppAppWithQml(ProjectExplorer::Project *project) QString Inspector::attachToExternalCppAppWithQml(ProjectExplorer::Project *project)
...@@ -413,39 +366,6 @@ QString Inspector::attachToExternalCppAppWithQml(ProjectExplorer::Project *proje ...@@ -413,39 +366,6 @@ QString Inspector::attachToExternalCppAppWithQml(ProjectExplorer::Project *proje
//#warning implement attachToExternalCppAppWithQml //#warning implement attachToExternalCppAppWithQml
return QString(); return QString();
#if 0
m_debugMode = CppProjectWithQmlEngines;
ProjectExplorer::LocalApplicationRunConfiguration* runConfig =
qobject_cast<ProjectExplorer::LocalApplicationRunConfiguration*>(project->activeTarget()->activeRunConfiguration());
if (!project->activeTarget() || !project->activeTarget()->activeRunConfiguration())
return tr("No run configurations were found for the project '%1'.").arg(project->displayName());
else if (!runConfig)
return tr("No valid run configuration was found for the project %1. "
"Only locally runnable configurations are supported.\n"
"Please check your project settings.").arg(project->displayName());
Internal::StartExternalQmlDialog dlg(Debugger::DebuggerUISwitcher::instance()->mainWindow());
dlg.setPort(m_settings.externalPort());
dlg.setDebuggerUrl(m_settings.externalUrl());
dlg.setProjectDisplayName(project->displayName());
dlg.setDebugMode(Internal::StartExternalQmlDialog::CppProjectWithQmlEngine);
if (dlg.exec() != QDialog::Accepted)
return QString();
m_runConfigurationDebugData.serverAddress = dlg.debuggerUrl();
m_runConfigurationDebugData.serverPort = dlg.port();
m_settings.setExternalPort(dlg.port());
m_settings.setExternalUrl(dlg.debuggerUrl());
ProjectExplorer::Environment customEnv = runConfig->environment();
customEnv.set(QmlProjectManager::Constants::E_QML_DEBUG_SERVER_PORT, QString::number(m_settings.externalPort()));
Debugger::DebuggerRunControl *debuggableRunControl = createDebuggerRunControl(runConfig);
return executeDebuggerRunControl(debuggableRunControl, &customEnv);
#endif
} }
QString Inspector::executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl, QString Inspector::executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl,
...@@ -469,33 +389,6 @@ QString Inspector::executeDebuggerRunControl(Debugger::DebuggerRunControl *debug ...@@ -469,33 +389,6 @@ QString Inspector::executeDebuggerRunControl(Debugger::DebuggerRunControl *debug
return tr("A valid run control was not registered in Qt Creator for this project run configuration."); return tr("A valid run control was not registered in Qt Creator for this project run configuration.");
} }
Debugger::DebuggerRunControl *Inspector::createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
const QString &executableFile,
const QString &executableArguments)
{
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
const QList<Debugger::DebuggerRunControlFactory *> factories = pm->getObjects<Debugger::DebuggerRunControlFactory>();
ProjectExplorer::RunControl *runControl = 0;
if (m_debugMode == QmlProjectWithCppPlugins) {
Debugger::DebuggerStartParameters sp;
sp.startMode = Debugger::StartExternal;
sp.executable = executableFile;
sp.processArgs = executableArguments.split(QLatin1Char(' '));
runControl = factories.first()->create(sp);
return qobject_cast<Debugger::DebuggerRunControl *>(runControl);
}
if (m_debugMode == CppProjectWithQmlEngines) {
if (factories.length() && factories.first()->canRun(runConfig, ProjectExplorer::Constants::DEBUGMODE)) {
runControl = factories.first()->create(runConfig, ProjectExplorer::Constants::DEBUGMODE);
return qobject_cast<Debugger::DebuggerRunControl *>(runControl);
}
}
return 0;
}
void Inspector::connected(QDeclarativeEngineDebug *client) void Inspector::connected(QDeclarativeEngineDebug *client)
{ {
m_debugProject = ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject(); m_debugProject = ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject();
...@@ -515,55 +408,6 @@ void Inspector::updateMenuActions() ...@@ -515,55 +408,6 @@ void Inspector::updateMenuActions()
void Inspector::debuggerStateChanged(int newState) void Inspector::debuggerStateChanged(int newState)
{ {
#if 0
// FIXME: AAA: adjsut to new debugger states
if (m_simultaneousCppAndQmlDebugMode) {
switch(newState) {
case Debugger::EngineStarting:
{
m_connectionInitialized = false;
break;
}
case Debugger::EngineStartFailed:
case Debugger::InferiorStartFailed:
emit statusMessage(tr("Debugging failed: could not start C++ debugger."));
break;
case Debugger::InferiorRunningRequested:
{
if (m_cppDebuggerState == Debugger::InferiorStopped) {
// re-enable UI again
//#warning enable the UI here
}
break;
}
case Debugger::InferiorRunning:
{
if (!m_connectionInitialized) {
m_connectionInitialized = true;
m_connectionTimer->setInterval(ConnectionAttemptSimultaneousInterval);
m_connectionTimer->start();
}
break;
}
case Debugger::InferiorStopped:
{
//#warning disable the UI here
break;
}
case Debugger::EngineShuttingDown:
{
m_connectionInitialized = false;
// here it's safe to enable the debugger windows again -
// disabled ones look ugly.
//#warning enable the UI here
m_simultaneousCppAndQmlDebugMode = false;
break;
}
default:
break;
}
}
#endif
m_cppDebuggerState = newState; m_cppDebuggerState = newState;
updateMenuActions(); updateMenuActions();
} }
......
...@@ -140,10 +140,6 @@ private slots: ...@@ -140,10 +140,6 @@ private slots:
void currentDebugProjectRemoved(); void currentDebugProjectRemoved();
private: private:
Debugger::DebuggerRunControl *createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
const QString &executableFile = QString(),
const QString &executableArguments = QString());
QString executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl, QString executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl,
ProjectExplorer::Environment *environment); ProjectExplorer::Environment *environment);
......
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