mirror of
https://github.com/fralx/LimeReport.git
synced 2025-09-23 08:29:07 +03:00
Endless loop on adding not initialized QSqlQueryModels has been fixed
This commit is contained in:
@@ -190,8 +190,10 @@ ModelToDataSource::ModelToDataSource(QAbstractItemModel* model, bool owned)
|
||||
{
|
||||
Q_ASSERT(model);
|
||||
if (model){
|
||||
while (model->canFetchMore(QModelIndex()))
|
||||
while (model->canFetchMore(QModelIndex())){
|
||||
model->fetchMore(QModelIndex());
|
||||
if (model->rowCount() <= 0) break;
|
||||
}
|
||||
connect(model, SIGNAL(destroyed()), this, SLOT(slotModelDestroed()));
|
||||
connect(model, SIGNAL(modelReset()), this, SIGNAL(modelStateChanged()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user