mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 16:44:39 +03:00
Endless loop on adding not initialized QSqlQueryModels has been fixed
This commit is contained in:
parent
3d78426ea9
commit
6d1444566d
@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
|||||||
|
|
||||||
LIMEREPORT_VERSION_MAJOR = 1
|
LIMEREPORT_VERSION_MAJOR = 1
|
||||||
LIMEREPORT_VERSION_MINOR = 5
|
LIMEREPORT_VERSION_MINOR = 5
|
||||||
LIMEREPORT_VERSION_RELEASE = 38
|
LIMEREPORT_VERSION_RELEASE = 39
|
||||||
|
|
||||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||||
|
@ -190,8 +190,10 @@ ModelToDataSource::ModelToDataSource(QAbstractItemModel* model, bool owned)
|
|||||||
{
|
{
|
||||||
Q_ASSERT(model);
|
Q_ASSERT(model);
|
||||||
if (model){
|
if (model){
|
||||||
while (model->canFetchMore(QModelIndex()))
|
while (model->canFetchMore(QModelIndex())){
|
||||||
model->fetchMore(QModelIndex());
|
model->fetchMore(QModelIndex());
|
||||||
|
if (model->rowCount() <= 0) break;
|
||||||
|
}
|
||||||
connect(model, SIGNAL(destroyed()), this, SLOT(slotModelDestroed()));
|
connect(model, SIGNAL(destroyed()), this, SLOT(slotModelDestroed()));
|
||||||
connect(model, SIGNAL(modelReset()), this, SIGNAL(modelStateChanged()));
|
connect(model, SIGNAL(modelReset()), this, SIGNAL(modelStateChanged()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user