From acab0853f5acac666da8e5ea0fcff7e2f56c6771 Mon Sep 17 00:00:00 2001 From: fralx Date: Mon, 25 May 2020 13:22:02 +0300 Subject: [PATCH] TableBuilder has been fixed --- common.pri | 2 +- limereport/lrscriptenginemanager.cpp | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/common.pri b/common.pri index df213d2..f4c3afb 100644 --- a/common.pri +++ b/common.pri @@ -133,7 +133,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 55 +LIMEREPORT_VERSION_RELEASE = 56 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index ba990d4..cf92071 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -1987,16 +1987,19 @@ void TableBuilder::fillInRowData(QObject* row) void TableBuilder::buildTable(const QString& datasourceName) { checkBaseLayout(); - m_dataManager->dataSourceHolder(datasourceName)->invalidate(IDataSource::RENDER_MODE); - IDataSource* ds = m_dataManager->dataSource(datasourceName); - if (ds){ - bool firstTime = true; - QObject* row = m_horizontalLayout; - while(!ds->eof()){ - if (!firstTime) row = addRow(); - else firstTime = false; - fillInRowData(row); - ds->next(); + IDataSourceHolder* dh = m_dataManager->dataSourceHolder(datasourceName); + if (dh) { + dh->invalidate(IDataSource::RENDER_MODE); + IDataSource* ds = m_dataManager->dataSource(datasourceName); + if (ds){ + bool firstTime = true; + QObject* row = m_horizontalLayout; + while(!ds->eof()){ + if (!firstTime) row = addRow(); + else firstTime = false; + fillInRowData(row); + ds->next(); + } } } }