summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/debugger/breakhandler.cpp20
-rw-r--r--src/plugins/debugger/breakhandler.h4
2 files changed, 19 insertions, 5 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index e6418cfb08..47f8af7506 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -453,7 +453,7 @@ Qt::ItemFlags BreakHandler::flags(const QModelIndex &index) const
// //case 0:
// // return Qt::ItemIsUserCheckable | Qt::ItemIsEnabled;
// default:
- return QAbstractTableModel::flags(index);
+ return QAbstractItemModel::flags(index);
// }
}
@@ -469,6 +469,18 @@ int BreakHandler::threadSpecFromDisplay(const QString &str)
return ok ? result : -1;
}
+QModelIndex BreakHandler::index(int row, int col, const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return createIndex(row, col, 0);
+}
+
+QModelIndex BreakHandler::parent(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return QModelIndex();
+}
+
QVariant BreakHandler::data(const QModelIndex &mi, int role) const
{
static const QString empty = QString(QLatin1Char('-'));
@@ -742,9 +754,9 @@ DebuggerEngine *BreakHandler::engine(BreakpointId id) const
void BreakHandler::setEngine(BreakpointId id, DebuggerEngine *value)
{
Iterator it = m_storage.find(id);
- BREAK_ASSERT(it != m_storage.end(), qDebug() << id; return);
- QTC_ASSERT(it->state == BreakpointNew, qDebug() << id);
- QTC_ASSERT(!it->engine, qDebug() << id; return);
+ BREAK_ASSERT(it != m_storage.end(), qDebug() << "SET ENGINE" << id; return);
+ QTC_ASSERT(it->state == BreakpointNew, qDebug() << "STATE: " << it->state <<id);
+ QTC_ASSERT(!it->engine, qDebug() << "NO ENGINE" << id; return);
it->engine = value;
it->state = BreakpointInsertRequested;
it->response = BreakpointResponse();
diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h
index 09bfd60d12..d7ed2798a4 100644
--- a/src/plugins/debugger/breakhandler.h
+++ b/src/plugins/debugger/breakhandler.h
@@ -54,7 +54,7 @@ namespace Internal {
class BreakpointMarker;
-class BreakHandler : public QAbstractTableModel
+class BreakHandler : public QAbstractItemModel
{
Q_OBJECT
@@ -167,6 +167,8 @@ private:
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
+ QModelIndex index(int row, int col, const QModelIndex &parent) const;
+ QModelIndex parent(const QModelIndex &parent) const;
bool isEngineRunning(BreakpointId id) const;
void setState(BreakpointId id, BreakpointState state);