Merge remote-tracking branch 'origin/2.6'

Conflicts:
	share/share.qbs
	src/plugins/cpptools/cppchecksymbols.cpp
	src/plugins/texteditor/behaviorsettingswidget.cpp

Change-Id: Ia34060984f9c036b2f28a6411d796d41f55a3e37
This commit is contained in:
Eike Ziller
2012-11-27 11:50:56 +01:00
44 changed files with 276 additions and 80 deletions

View File

@@ -1415,6 +1415,10 @@ void DebuggerEngine::updateWatchData(const WatchData &, const WatchUpdateFlags &
{
}
void DebuggerEngine::watchDataSelected(const QByteArray &iname)
{
}
void DebuggerEngine::watchPoint(const QPoint &)
{
}

View File

@@ -149,6 +149,8 @@ public:
virtual void updateWatchData(const Internal::WatchData &data,
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags());
virtual void watchDataSelected(const QByteArray &iname);
virtual void startDebugger(DebuggerRunControl *runControl);
virtual void watchPoint(const QPoint &);

View File

@@ -34,6 +34,7 @@
#include "stackhandler.h"
#include "qmlengine.h"
#include "watchdata.h"
#include "watchhandler.h"
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
@@ -135,6 +136,13 @@ void QmlCppEngine::updateWatchData(const WatchData &data,
d->m_activeEngine->updateWatchData(data, flags);
}
void QmlCppEngine::watchDataSelected(const QByteArray &iname)
{
const WatchData *wd = watchHandler()->findData(iname);
if (wd && wd->isInspect())
d->m_qmlEngine->watchDataSelected(iname);
}
void QmlCppEngine::watchPoint(const QPoint &point)
{
d->m_cppEngine->watchPoint(point);

View File

@@ -50,6 +50,7 @@ public:
TextEditor::ITextEditor * editor, const DebuggerToolTipContext &);
void updateWatchData(const WatchData &data,
const WatchUpdateFlags &flags);
void watchDataSelected(const QByteArray &iname);
void watchPoint(const QPoint &);
void fetchMemory(MemoryAgent *, QObject *, quint64 addr, quint64 length);

View File

@@ -1026,6 +1026,13 @@ void QmlEngine::updateWatchData(const WatchData &data,
watchHandler()->insertData(data);
}
void QmlEngine::watchDataSelected(const QByteArray &iname)
{
const WatchData *wd = watchHandler()->findData(iname);
if (wd && wd->isInspect())
m_inspectorAdapter.agent()->watchDataSelected(wd);
}
void QmlEngine::synchronizeWatchers()
{
QStringList watchedExpressions = watchHandler()->watchedExpressions();

View File

@@ -162,6 +162,7 @@ private:
bool supportsThreads() const { return false; }
void updateWatchData(const WatchData &data,
const WatchUpdateFlags &flags);
void watchDataSelected(const QByteArray &iname);
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
bool evaluateScript(const QString &expression);

View File

@@ -81,6 +81,8 @@ QmlInspectorAdapter::QmlInspectorAdapter(QmlAdapter *debugAdapter,
{
connect(m_agent, SIGNAL(objectFetched(QmlDebug::ObjectReference)),
SLOT(onObjectFetched(QmlDebug::ObjectReference)));
connect(m_agent, SIGNAL(jumpToObjectDefinition(QmlDebug::FileReference)),
SLOT(jumpToObjectDefinitionInEditor(QmlDebug::FileReference)));
QmlDebugConnection *connection = m_debugAdapter->connection();
DeclarativeEngineDebugClient *engineClient1
@@ -473,7 +475,7 @@ void QmlInspectorAdapter::showConnectionStatusMessage(const QString &message)
m_engine->showMessage(_("QML Inspector: ") + message, LogStatus);
}
void QmlInspectorAdapter::gotoObjectReferenceDefinition(
void QmlInspectorAdapter::jumpToObjectDefinitionInEditor(
const FileReference &objSource)
{
if (m_cursorPositionChangedExternally) {
@@ -508,7 +510,7 @@ void QmlInspectorAdapter::selectObject(const ObjectReference &obj,
QList<ObjectReference>() << obj);
if (target == EditorTarget)
gotoObjectReferenceDefinition(obj.source());
jumpToObjectDefinitionInEditor(obj.source());
agent()->selectObjectInTree(obj.debugId());
}

View File

@@ -96,6 +96,7 @@ private slots:
void onReload();
void onReloaded();
void onDestroyedObject(int);
void jumpToObjectDefinitionInEditor(const QmlDebug::FileReference &objSource);
private:
void setActiveEngineClient(QmlDebug::BaseEngineDebugClient *client);
@@ -103,8 +104,6 @@ private:
void initializePreviews();
void showConnectionStatusMessage(const QString &message);
void gotoObjectReferenceDefinition(const QmlDebug::FileReference &objSource);
enum SelectionTarget { NoTarget, ToolTarget, EditorTarget };
void selectObject(
const QmlDebug::ObjectReference &objectReference,

View File

@@ -121,6 +121,17 @@ void QmlInspectorAgent::updateWatchData(const WatchData &data)
}
}
void QmlInspectorAgent::watchDataSelected(const WatchData *data)
{
if (debug)
qDebug() << __FUNCTION__ << '(' << data->id << ')';
if (data->id) {
QTC_ASSERT(m_debugIdLocations.keys().contains(data->id), return);
emit jumpToObjectDefinition(m_debugIdLocations.value(data->id));
}
}
bool QmlInspectorAgent::selectObjectInTree(int debugId)
{
if (debug) {

View File

@@ -60,6 +60,7 @@ public:
void assignValue(const WatchData *data, const QString &expression, const QVariant &valueV);
void updateWatchData(const WatchData &data);
void watchDataSelected(const WatchData *data);
bool selectObjectInTree(int debugId);
quint32 setBindingForObject(int objectDebugId,
@@ -101,6 +102,7 @@ signals:
void propertyChanged(int debugId, const QByteArray &propertyName,
const QVariant &propertyValue);
void automaticUpdateFailed();
void jumpToObjectDefinition(const QmlDebug::FileReference &objSource);
private slots:
void updateStatus();

View File

@@ -992,6 +992,11 @@ void WatchTreeView::setModel(QAbstractItemModel *model)
SLOT(handleItemIsExpanded(QModelIndex)));
}
void WatchTreeView::rowClicked(const QModelIndex &index)
{
currentEngine()->watchDataSelected(currentEngine()->watchHandler()->watchData(index)->iname);
}
void WatchTreeView::handleItemIsExpanded(const QModelIndex &idx)
{
bool on = idx.data(LocalsExpandedRole).toBool();

View File

@@ -51,6 +51,7 @@ public:
explicit WatchTreeView(Type type, QWidget *parent = 0);
Type type() const { return m_type; }
void setModel(QAbstractItemModel *model);
void rowClicked(const QModelIndex &index);
void reset();
public slots: