Commit 89974416 authored by dt's avatar dt
Browse files

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

parents 156db185 80847e55
......@@ -1085,7 +1085,7 @@ static void qDumpQAbstractItem(QDumper &d)
//d.putItem("value", "(").put(rowCount).put(",").put(columnCount).put(")");
d.putItem("value", m->data(mi, Qt::DisplayRole).toString());
d.putItem("valueencoded", "2");
d.putItem("numchild", "1");
d.putItem("numchild", rowCount * columnCount);
if (d.dumpChildren) {
d.beginChildren();
for (int row = 0; row < rowCount; ++row) {
......@@ -1096,7 +1096,7 @@ static void qDumpQAbstractItem(QDumper &d)
d.put("[").put(row).put(",").put(column).put("]");
d.endItem();
//d.putItem("numchild", (m->hasChildren(child) ? "1" : "0"));
d.putItem("numchild", "1");
d.putItem("numchild", m->rowCount(child) * m->columnCount(child));
d.beginItem("addr");
d.put("$").put(child.row()).put(",").put(child.column()).put(",")
.put(child.internalPointer()).put(",").put(child.model());
......@@ -1158,7 +1158,7 @@ static void qDumpQAbstractItemModel(QDumper &d)
d.putItem("value", m.data(mi, Qt::DisplayRole).toString());
d.putItem("valueencoded", "2");
//d.putItem("numchild", (m.hasChildren(mi) ? "1" : "0"));
d.putItem("numchild", "1");
d.putItem("numchild", m.rowCount(mi) * m.columnCount(mi));
d.beginItem("addr");
d.put("$").put(mi.row()).put(",").put(mi.column()).put(",");
d.put(mi.internalPointer()).put(",").put(mi.model());
......@@ -3637,8 +3637,8 @@ void *qDumpObjectData440(
"\""NS"QFileInfo\","
"\""NS"QHash\","
"\""NS"QHashNode\","
"\""NS"QImage\","
"\""NS"QImageData\","
//"\""NS"QImage\","
//"\""NS"QImageData\","
"\""NS"QLinkedList\","
"\""NS"QList\","
"\""NS"QLocale\","
......
......@@ -28,6 +28,7 @@
**************************************************************************/
#include <QtCore/QDebug>
#include <QtCore/QDateTime>
#include <QtCore/QDir>
#include <QtCore/QHash>
#include <QtCore/QLibrary>
......@@ -194,6 +195,16 @@ void testQByteArray()
ba += 2;
}
void testQDateTime()
{
QDateTime date;
date = QDateTime::currentDateTime();
date = date.addSecs(5);
date = date.addSecs(5);
date = date.addSecs(5);
date = date.addSecs(5);
}
void testQFileInfo()
{
QFileInfo fi("/tmp/t");
......@@ -553,6 +564,7 @@ void testQSet()
QObject ob;
QSet<QPointer<QObject> > hash;
QPointer<QObject> ptr(&ob);
ptr;
//hash.insert(ptr);
//hash.insert(ptr);
//hash.insert(ptr);
......@@ -592,7 +604,7 @@ public:
private:
QSharedDataPointer<EmployeeData> d;
};
};
void testQSharedPointer()
......@@ -1301,6 +1313,7 @@ int main(int argc, char *argv[])
testQStack();
testUninitialized();
testPointer();
testQDateTime();
testQFileInfo();
testObject1();
testVector1();
......
......@@ -37,7 +37,8 @@ rfcomm listen /dev/rfcomm0 1 $PWD/trklauncher -v -f {}
#The same with the debug adapter:
rfcomm listen /dev/rfcomm0 1 $PWD/run.pl -af -av -w {}
rfcomm listen /dev/rfcomm0 1 $PWD/run.pl -af -av -w {}
rfcomm listen /dev/rfcomm0 1 $PWD/runner -af -av -w {}
#Important options: -w wait for adapter, -af omit serial frame.
......
......@@ -115,7 +115,9 @@ public:
void setRegisterEndianness(Endianness r) { m_registerEndianness = r; }
void setUseSocket(bool s) { m_useSocket = s; }
void setBufferedMemoryRead(bool b) { qDebug() << "Buffered=" << b; m_bufferedMemoryRead = b; }
bool startServer();
public slots:
void startServer();
private slots:
void handleResult(const trk::TrkResult &data);
......@@ -141,7 +143,7 @@ private:
// kill process and breakpoints
void cleanUp();
void handleCpuType(const TrkResult &result);
void handleCpuType(const TrkResult &result);
void handleCreateProcess(const TrkResult &result);
void handleClearBreakpoint(const TrkResult &result);
void handleSignalContinue(const TrkResult &result);
......@@ -247,12 +249,14 @@ void Adapter::setGdbServerName(const QString &name)
}
}
bool Adapter::startServer()
void Adapter::startServer()
{
QString errorMessage;
if (!openTrkPort(m_trkServerName, &errorMessage)) {
logMessage(errorMessage, true);
return false;
logMessage("LOOPING");
QTimer::singleShot(1000, this, SLOT(startServer()));
return;
}
sendTrkInitialPing();
......@@ -271,7 +275,8 @@ bool Adapter::startServer()
logMessage(QString("Unable to start the gdb server at %1:%2: %3.")
.arg(m_gdbServerName).arg(m_gdbServerPort)
.arg(m_gdbServer.errorString()), true);
return false;
QCoreApplication::exit(5);
return;
}
logMessage(QString("Gdb server running on %1:%2.\nRegister endianness: %3\nRun arm-gdb now.")
......@@ -279,7 +284,6 @@ bool Adapter::startServer()
connect(&m_gdbServer, SIGNAL(newConnection()),
this, SLOT(handleGdbConnection()));
return true;
}
void Adapter::logMessage(const QString &msg, bool force)
......@@ -1521,9 +1525,8 @@ int main(int argc, char *argv[])
adapter.setRegisterEndianness(options.registerEndianness);
adapter.setUseSocket(options.useSocket);
adapter.setSerialFrame(options.serialFrame);
if (adapter.startServer())
return app.exec();
return 4;
QTimer::singleShot(0, &adapter, SLOT(startServer()));
return app.exec();
}
#include "adapter.moc"
This diff is collapsed.
TEMPLATE = app
QT += network
win32:CONFIG+=console
HEADERS +=
HEADERS += \
trkutils.h \
trkdevice.h \
SOURCES += \
runner.cpp \
trkutils.cpp \
trkdevice.cpp \
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