mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-25 00:54:39 +03:00
Callback datasource has been fixed
This commit is contained in:
parent
8ec1e8a072
commit
b87009e1de
@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
|||||||
|
|
||||||
LIMEREPORT_VERSION_MAJOR = 1
|
LIMEREPORT_VERSION_MAJOR = 1
|
||||||
LIMEREPORT_VERSION_MINOR = 4
|
LIMEREPORT_VERSION_MINOR = 4
|
||||||
LIMEREPORT_VERSION_RELEASE = 18
|
LIMEREPORT_VERSION_RELEASE = 22
|
||||||
|
|
||||||
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}\"
|
||||||
|
@ -638,14 +638,18 @@ QVariant MasterDetailProxyModel::masterData(QString fieldName) const
|
|||||||
|
|
||||||
bool CallbackDatasource::next(){
|
bool CallbackDatasource::next(){
|
||||||
if (!m_eof){
|
if (!m_eof){
|
||||||
|
bool nextRowExists = checkNextRecord(m_currentRow);
|
||||||
if (m_currentRow>-1){
|
if (m_currentRow>-1){
|
||||||
if (!m_getDataFromCache && checkNextRecord(m_currentRow)){
|
if (!m_getDataFromCache && nextRowExists){
|
||||||
for (int i = 0; i < m_columnCount; ++i ){
|
for (int i = 0; i < m_columnCount; ++i ){
|
||||||
m_valuesCache[columnNameByIndex(i)] = data(columnNameByIndex(i));
|
m_valuesCache[columnNameByIndex(i)] = data(columnNameByIndex(i));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!nextRowExists){
|
||||||
|
m_eof = true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
m_currentRow++;
|
m_currentRow++;
|
||||||
bool result = true;
|
bool result = true;
|
||||||
@ -670,7 +674,6 @@ bool CallbackDatasource::prior(){
|
|||||||
if (m_currentRow !=-1) {
|
if (m_currentRow !=-1) {
|
||||||
if (!m_getDataFromCache && !m_valuesCache.isEmpty()){
|
if (!m_getDataFromCache && !m_valuesCache.isEmpty()){
|
||||||
m_getDataFromCache = true;
|
m_getDataFromCache = true;
|
||||||
if (eof()) m_currentRow--;
|
|
||||||
m_currentRow--;
|
m_currentRow--;
|
||||||
m_eof = false;
|
m_eof = false;
|
||||||
return true;
|
return true;
|
||||||
@ -701,7 +704,7 @@ void CallbackDatasource::first(){
|
|||||||
QVariant CallbackDatasource::data(const QString& columnName)
|
QVariant CallbackDatasource::data(const QString& columnName)
|
||||||
{
|
{
|
||||||
QVariant result;
|
QVariant result;
|
||||||
if (!eof() && !bof())
|
if (!bof())
|
||||||
{
|
{
|
||||||
if (!m_getDataFromCache){
|
if (!m_getDataFromCache){
|
||||||
CallbackInfo info;
|
CallbackInfo info;
|
||||||
|
Loading…
Reference in New Issue
Block a user