equal
deleted
inserted
replaced
68 CustomProxyModel(QObject *parent = 0) |
68 CustomProxyModel(QObject *parent = 0) |
69 : QSortFilterProxyModel(parent) {} |
69 : QSortFilterProxyModel(parent) {} |
70 |
70 |
71 bool hasChildren(const QModelIndex &parent) const |
71 bool hasChildren(const QModelIndex &parent) const |
72 { |
72 { |
|
73 if (!sourceModel()) |
|
74 return false; |
73 QModelIndex sourceParent = mapToSource(parent); |
75 QModelIndex sourceParent = mapToSource(parent); |
74 if (parent.isValid() && !sourceParent.isValid()) |
76 if (parent.isValid() && !sourceParent.isValid()) |
75 return false; |
77 return false; |
76 return sourceModel()->hasChildren(sourceParent); |
78 return sourceModel()->hasChildren(sourceParent); |
77 } |
79 } |
182 completingEditor = 0; |
184 completingEditor = 0; |
183 } |
185 } |
184 |
186 |
185 void QScriptDebuggerLocalsWidgetPrivate::_q_expandIndex(const QModelIndex &index) |
187 void QScriptDebuggerLocalsWidgetPrivate::_q_expandIndex(const QModelIndex &index) |
186 { |
188 { |
187 view->expand(proxy->mapFromSource(index)); |
189 if (view->model() == index.model()) |
|
190 view->expand(proxy->mapFromSource(index)); |
188 } |
191 } |
189 |
192 |
190 class QScriptDebuggerLocalsItemDelegate |
193 class QScriptDebuggerLocalsItemDelegate |
191 : public QStyledItemDelegate |
194 : public QStyledItemDelegate |
192 { |
195 { |