Commit 717ae824 authored by hjk's avatar hjk
Browse files

debugger: fix regression in QVector dumper

Was broken due to a change in the QVector implementation (See 343e848abc1 and
a07385de156 in Qt master)
parent 452c7124
...@@ -1339,11 +1339,12 @@ void QtDumperHelper::evaluationParameters(const WatchData &data, ...@@ -1339,11 +1339,12 @@ void QtDumperHelper::evaluationParameters(const WatchData &data,
inner = data.addr.mid(1); inner = data.addr.mid(1);
break; break;
case QVectorType: case QVectorType:
extraArgs[1] = QLatin1String("(char*)&(("); if (m_qtVersion >= 0x040600)
extraArgs[1] += data.exp; extraArgs[1] = QString("(char*)&((%1).p->array)-(char*)((%2).p)")
extraArgs[1] += QLatin1String(").d->array)-(char*)"); .arg(data.exp).arg(data.exp);
extraArgs[1] += data.exp; else
extraArgs[1] += QLatin1String(".d"); extraArgs[1] = QString("(char*)&((%1).d->array)-(char*)((%2).d)")
.arg(data.exp).arg(data.exp);
break; break;
case QObjectSlotType: case QObjectSlotType:
case QObjectSignalType: { case QObjectSignalType: {
......
...@@ -616,6 +616,10 @@ void testStdDeque() ...@@ -616,6 +616,10 @@ void testStdDeque()
void testStdList() void testStdList()
{ {
std::list<int> big;
for (int i = 0; i < 10000; ++i)
big.push_back(i);
std::list<int *> plist1; std::list<int *> plist1;
plist1.push_back(new int(1)); plist1.push_back(new int(1));
plist1.push_back(0); plist1.push_back(0);
...@@ -977,7 +981,6 @@ void testQVector() ...@@ -977,7 +981,6 @@ void testQVector()
QVector<Foo> flist; QVector<Foo> flist;
flist.append(1); flist.append(1);
flist.append(2); flist.append(2);
flist.append(3); flist.append(3);
flist.append(4); flist.append(4);
......
Supports Markdown
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