/***************************************************************************
- * Copyright (C) 2005-07 by the Quassel IRC Team *
+ * Copyright (C) 2005-08 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
void ModelPropertyMapper::setModel(QAbstractItemModel *model) {
if(_model) {
- setSelectionModel(new QItemSelectionModel(model));
disconnect(_model, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
this, SLOT(dataChanged(QModelIndex, QModelIndex)));
}
_model = model;
connect(_model, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
this, SLOT(dataChanged(QModelIndex, QModelIndex)));
+ setSelectionModel(new QItemSelectionModel(model));
}
QAbstractItemModel *ModelPropertyMapper::model() const {
}
void ModelPropertyMapper::targetDestroyed() {
- QObject *obj = static_cast<QObject *>(sender());
- removeMapping(0, 0, obj, QByteArray());
+ removeMapping(0, 0, sender(), QByteArray());
}