From 54562d80cda143e58c243842d1099fc5a6762642 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Mon, 5 Dec 2016 23:00:32 +0300 Subject: [PATCH] checkIfEmpty has been refactored --- limereport/lrdatadesignintf.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/limereport/lrdatadesignintf.cpp b/limereport/lrdatadesignintf.cpp index 3b24e66..f20f891 100644 --- a/limereport/lrdatadesignintf.cpp +++ b/limereport/lrdatadesignintf.cpp @@ -736,11 +736,15 @@ bool CallbackDatasource::checkIfEmpty(){ if (m_rowCount == 0) { return true; } else { - QVariant result = true; + QVariant isEmpty = true; + QVariant recordCount = 0; CallbackInfo info; + info.dataType = CallbackInfo::RowCount; + emit getCallbackData(info, recordCount); + if (recordCount.toInt()>0) return false; info.dataType = CallbackInfo::IsEmpty; - emit getCallbackData(info,result); - return result.toBool(); + emit getCallbackData(info,isEmpty); + return isEmpty.toBool(); } }