From 16727fef181bbaa5f61f15a8ecd980e1c0af490d Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 9 Mar 2016 15:48:26 +0300 Subject: [PATCH] CallbackDatasource has been fixed --- src/lrdatadesignintf.cpp | 2 +- src/lrdatadesignintf.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lrdatadesignintf.cpp b/src/lrdatadesignintf.cpp index 6119eb6..e630fd4 100644 --- a/src/lrdatadesignintf.cpp +++ b/src/lrdatadesignintf.cpp @@ -594,7 +594,7 @@ bool CallbackDatasource::next(){ m_currentRow++; bool result = false; emit changePos(CallbackInfo::Next,result); - m_eof = !checkNextRecord(m_currentRow); + m_eof = !result; // !checkNextRecord(m_currentRow); return result; } else return false; } diff --git a/src/lrdatadesignintf.h b/src/lrdatadesignintf.h index df54120..98a193d 100644 --- a/src/lrdatadesignintf.h +++ b/src/lrdatadesignintf.h @@ -145,8 +145,6 @@ class IConnectionController{ public: virtual void addConnectionDesc(ConnectionDesc* connection) = 0; virtual void changeConnectionDesc(ConnectionDesc* connection) = 0; - virtual bool checkConnectionDesc(ConnectionDesc* connection) = 0; - virtual QString lastError() const = 0; }; class QueryDesc : public QObject{ @@ -367,7 +365,7 @@ class CallbackDatasource :public ICallbackDatasource, public IDataSource { public: CallbackDatasource(): m_currentRow(-1), m_eof(false){} bool next(); - bool hasNext(){ return !m_eof;} + bool hasNext(){ if (!m_eof) return checkNextRecord(m_currentRow);} bool prior(){ if (m_currentRow !=-1) {m_currentRow--; return true;} else return false;} void first(); void last(){}