diff --git a/common.pri b/common.pri index 465a8e1..ba97b71 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 = 57 +LIMEREPORT_VERSION_RELEASE = 58 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 cf92071..804a758 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -1937,7 +1937,10 @@ bool DatasourceFunctions::invalidate(const QString& datasourceName) QObject* DatasourceFunctions::createTableBuilder(QObject* horizontalLayout) { - return new TableBuilder(dynamic_cast(horizontalLayout), dynamic_cast(m_dataManager)); + LimeReport::HorizontalLayout* l = dynamic_cast(horizontalLayout); + if (l) + return new TableBuilder(l, m_dataManager); + return 0; } TableBuilder::TableBuilder(HorizontalLayout* layout, DataSourceManager* dataManager) diff --git a/limereport/lrscriptenginemanager.h b/limereport/lrscriptenginemanager.h index 7f86a33..c5271f3 100644 --- a/limereport/lrscriptenginemanager.h +++ b/limereport/lrscriptenginemanager.h @@ -332,7 +332,7 @@ class DatasourceFunctions : public QObject{ Q_OBJECT public: explicit DatasourceFunctions(IDataSourceManager* dataManager) - : m_dataManager(dataManager){} + : m_dataManager(dynamic_cast(dataManager)){} Q_INVOKABLE bool first(const QString& datasourceName); Q_INVOKABLE bool next(const QString& datasourceName); Q_INVOKABLE bool prior(const QString& datasourceName); @@ -340,7 +340,7 @@ public: Q_INVOKABLE bool invalidate(const QString& datasourceName); Q_INVOKABLE QObject *createTableBuilder(QObject *horizontalLayout); private: - IDataSourceManager* m_dataManager; + DataSourceManager* m_dataManager; }; class ScriptFunctionsManager : public QObject{