use the corrrect signature for the virtual method

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741173
This commit is contained in:
Aaron J. Seigo 2007-11-25 00:13:49 +00:00
parent ed8c50e03f
commit 9c31a55b06
2 changed files with 10 additions and 4 deletions

View File

@ -80,10 +80,16 @@ DefaultItemFilterProxyModel::DefaultItemFilterProxyModel(QObject * parent) :
{
}
void DefaultItemFilterProxyModel::setSourceModel(
QStandardItemModel * sourceModel)
void DefaultItemFilterProxyModel::setSourceModel(QAbstractItemModel * sourceModel)
{
m_innerModel.setSourceModel(sourceModel);
QStandardItemModel *model = qobject_cast<QStandardItemModel*>(sourceModel);
if (!model) {
kWarning() << "DefaultItemFilterProxyModel::setSourceModel expects a QStandardItemModel!";
return;
}
m_innerModel.setSourceModel(model);
QSortFilterProxyModel::setSourceModel(&m_innerModel);
}

View File

@ -105,7 +105,7 @@ public:
void setSearch(const QString & pattern);
void setFilter(const Filter & filter);
void setSourceModel(QStandardItemModel * sourceModel);
void setSourceModel(QAbstractItemModel * sourceModel);
QStandardItemModel * sourceModel() const;