Merge commit '52b9fcca2ddd5d5e95c6e13cbded018699c7dd68' (origin/2.0)

Conflicts:
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemosshthread.h
This commit is contained in:
con
2010-07-13 11:31:05 +02:00
22 changed files with 844 additions and 625 deletions

View File

@@ -50,6 +50,7 @@
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtCore/QMetaObject>
#include <QtGui/QMessageBox>
#include <QtGui/QPlainTextEdit>
@@ -74,6 +75,8 @@ namespace Internal {
it handles communication between the engine and the bineditor.
*/
namespace { const int DataRange = 1024 * 1024; }
MemoryViewAgent::MemoryViewAgent(DebuggerEngine *engine, quint64 addr)
: QObject(engine), m_engine(engine)
{
@@ -113,11 +116,15 @@ void MemoryViewAgent::createBinEditor(quint64 addr)
connect(editor->widget(),
SIGNAL(newRangeRequested(Core::IEditor *, quint64)), this,
SLOT(provideNewRange(Core::IEditor*,quint64)));
connect(editor->widget(), SIGNAL(startOfFileRequested(Core::IEditor *)),
this, SLOT(handleStartOfFileRequested(Core::IEditor*)));
connect(editor->widget(), SIGNAL(endOfFileRequested(Core::IEditor *)),
this, SLOT(handleEndOfFileRequested(Core::IEditor*)));
m_editors << editor;
editorManager->activateEditor(editor);
QMetaObject::invokeMethod(editor->widget(), "setNewWindowRequestAllowed");
QMetaObject::invokeMethod(editor->widget(), "setLazyData",
Q_ARG(quint64, addr), Q_ARG(int, 1024 * 1024), Q_ARG(int, BinBlockSize));
Q_ARG(quint64, addr), Q_ARG(int, DataRange), Q_ARG(int, BinBlockSize));
} else {
DebuggerPlugin::instance()->showMessageBox(QMessageBox::Warning,
tr("No memory viewer available"),
@@ -147,10 +154,26 @@ void MemoryViewAgent::addLazyData(QObject *editorToken, quint64 addr,
void MemoryViewAgent::provideNewRange(Core::IEditor *editor, quint64 address)
{
QMetaObject::invokeMethod(editor->widget(), "setLazyData",
Q_ARG(quint64, address), Q_ARG(int, 1024 * 1024),
Q_ARG(quint64, address), Q_ARG(int, DataRange),
Q_ARG(int, BinBlockSize));
}
// Since we are not dealing with files, we take these signals to mean
// "move to start/end of range". This seems to make more sense than
// jumping to the start or end of the address space, respectively.
void MemoryViewAgent::handleStartOfFileRequested(Core::IEditor *editor)
{
QMetaObject::invokeMethod(editor->widget(),
"setCursorPosition", Q_ARG(int, 0));
}
void MemoryViewAgent::handleEndOfFileRequested(Core::IEditor *editor)
{
QMetaObject::invokeMethod(editor->widget(),
"setCursorPosition", Q_ARG(int, DataRange - 1));
}
///////////////////////////////////////////////////////////////////////
//