-
- connect(rootItem, SIGNAL(dataChanged(int)),
- this, SLOT(itemDataChanged(int)));
-
- connect(rootItem, SIGNAL(newChild(AbstractTreeItem *)),
- this, SLOT(newChild(AbstractTreeItem *)));
-
- connect(rootItem, SIGNAL(beginRemoveChilds(int, int)),
- this, SLOT(beginRemoveChilds(int, int)));
-
- connect(rootItem, SIGNAL(endRemoveChilds()),
- this, SLOT(endRemoveChilds()));
-
+ connectItem(rootItem);
+
+ if(QCoreApplication::instance()->arguments().contains("--debugmodel")) {
+ connect(this, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int)),
+ this, SLOT(debug_rowsAboutToBeInserted(const QModelIndex &, int, int)));
+ connect(this, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),
+ this, SLOT(debug_rowsAboutToBeRemoved(const QModelIndex &, int, int)));
+ connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
+ this, SLOT(debug_rowsInserted(const QModelIndex &, int, int)));
+ connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)),
+ this, SLOT(debug_rowsRemoved(const QModelIndex &, int, int)));
+ connect(this, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
+ this, SLOT(debug_dataChanged(const QModelIndex &, const QModelIndex &)));
+ }