Backport to Qt 4.5
This commit is contained in:
parent
d5079707af
commit
253620ce88
|
@ -237,11 +237,17 @@ QVariant ResultModel::headerData(int section, Qt::Orientation orientation, int r
|
||||||
|
|
||||||
void ResultModel::setResults(ResultEntry *resultsIn)
|
void ResultModel::setResults(ResultEntry *resultsIn)
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION >= 0x040600
|
||||||
this->beginResetModel();
|
this->beginResetModel();
|
||||||
|
#endif
|
||||||
if (root)
|
if (root)
|
||||||
delete root;
|
delete root;
|
||||||
root = resultsIn;
|
root = resultsIn;
|
||||||
|
#if QT_VERSION >= 0x040600
|
||||||
this->endResetModel();
|
this->endResetModel();
|
||||||
|
#else
|
||||||
|
this->reset();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultEntry* ResultModel::getEntry(const QModelIndex &index)
|
ResultEntry* ResultModel::getEntry(const QModelIndex &index)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user