Commit 440dbebf authored by ck's avatar ck
Browse files

Merge branch 'master' of scm.dev.nokia.troll.no:creator/mainline

Conflicts:
	src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h
parents 294ed8a3 f6ac7aab
......@@ -2,7 +2,7 @@
#define TOKENCACHE_H
#include <CPlusPlusForwardDeclarations.h>
#include <cplusplus/SimpleLexer.h>
#include <SimpleLexer.h>
#include <QtCore/QHash>
#include <QtCore/QList>
......
......@@ -44,6 +44,7 @@
#include "stackhandler.h"
#include "threadshandler.h"
#include "watchhandler.h"
#include "watchutils.h"
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
......@@ -312,8 +313,7 @@ void DebuggerEngine::handleCommand(int role, const QVariant &value)
break;
case RequestExecWatchRole:
//exec();
QTC_ASSERT(false, /* FIXME ABC */);
addToWatchWindow();
break;
case RequestExecExitRole:
......@@ -552,22 +552,6 @@ void DebuggerEngine::breakByFunction(const QString &functionName)
attemptBreakpointSynchronization();
}
/*
void DebuggerEngine::loadSessionData()
{
QTC_ASSERT(isSessionEngine(), return);
m_breakHandler.loadSessionData();
m_watchHandler.loadSessionData();
}
void DebuggerEngine::saveSessionData()
{
QTC_ASSERT(isSessionEngine(), return);
m_breakHandler.saveSessionData();
m_watchHandler.saveSessionData();
}
*/
void DebuggerEngine::resetLocation()
{
d->m_disassemblerViewAgent.resetLocation();
......@@ -689,6 +673,34 @@ void DebuggerEngine::executeJumpToLine()
executeJumpToLine(fileName, lineNumber);
}
void DebuggerEngine::addToWatchWindow()
{
// Requires a selection, but that's the only case we want anyway.
EditorManager *editorManager = EditorManager::instance();
if (!editorManager)
return;
IEditor *editor = editorManager->currentEditor();
if (!editor)
return;
ITextEditor *textEditor = qobject_cast<ITextEditor*>(editor);
if (!textEditor)
return;
QTextCursor tc;
QPlainTextEdit *ptEdit = qobject_cast<QPlainTextEdit*>(editor->widget());
if (ptEdit)
tc = ptEdit->textCursor();
QString exp;
if (tc.hasSelection()) {
exp = tc.selectedText();
} else {
int line, column;
exp = cppExpressionAt(textEditor, tc.position(), &line, &column);
}
if (!exp.isEmpty())
watchHandler()->watchExpression(exp);
}
// Called from RunControl.
void DebuggerEngine::handleFinished()
{
......
......@@ -259,6 +259,7 @@ private:
void executeRunToLine();
void executeRunToFunction();
void executeJumpToLine();
void addToWatchWindow();
DebuggerEnginePrivate *d;
};
......
......@@ -51,11 +51,10 @@
#include "threadswindow.h"
#include "watchwindow.h"
//#include "sessiondata.h"
#include "watchutils.h"
#include "breakhandler.h"
#include "stackhandler.h" // FIXME
#include "watchhandler.h" // FIXME
#include "stackhandler.h"
#include "watchhandler.h"
#ifdef Q_OS_WIN
# include "shared/peutils.h"
......@@ -2478,55 +2477,6 @@ void DebuggerPlugin::aboutToShutdown()
// d->m_engine->shutdown();
}
void DebuggerPlugin::addToWatchWindow()
{
using namespace Core;
using namespace TextEditor;
// Requires a selection, but that's the only case we want anyway.
EditorManager *editorManager = EditorManager::instance();
if (!editorManager)
return;
IEditor *editor = editorManager->currentEditor();
if (!editor)
return;
ITextEditor *textEditor = qobject_cast<ITextEditor*>(editor);
if (!textEditor)
return;
QTextCursor tc;
QPlainTextEdit *ptEdit = qobject_cast<QPlainTextEdit*>(editor->widget());
if (ptEdit)
tc = ptEdit->textCursor();
QString exp;
if (tc.hasSelection()) {
exp = tc.selectedText();
} else {
int line, column;
exp = cppExpressionAt(textEditor, tc.position(), &line, &column);
}
// FIXME:
// if (!exp.isEmpty())
// d->m_watchHandler->watchExpression(exp);
}
void DebuggerPlugin::setBusyCursor(bool busy)
{
d->setBusyCursor(busy);
}
/*
void DebuggerPlugin::gotoLocation(const StackFrame &frame, bool setMarker)
{
if (theDebuggerBoolSetting(OperateByInstruction) || !frame.isUsable()) {
if (setMarker)
d->m_plugin->resetLocation();
d->m_disassemblerViewAgent->setFrame(frame);
} else {
d->m_plugin->gotoLocation(frame.file, frame.line, setMarker);
}
}
*/
void DebuggerPlugin::showMessage(const QString &msg, int channel, int timeout)
{
//qDebug() << "PLUGIN OUTPUT: " << channel << msg;
......
......@@ -105,11 +105,7 @@ public:
public slots:
void exitDebugger(); // FIXME: remove
void setBusyCursor(bool on);
void addToWatchWindow(); // FIXME: use
void clearCppCodeModelSnapshot();
void ensureLogVisible();
void updateWatchersWindow(bool showWatchers, bool showReturn);
......
......@@ -462,7 +462,6 @@ void DebuggerRunControl::start()
.arg(toolChainName(sp.toolChainType)), LogStatus);
showMessage(DebuggerSettings::instance()->dump(), LogDebug);
plugin()->setBusyCursor(false);
engine()->startDebugger(this);
}
......
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