From c549035c7638f844ab86b944d5d6d687022cee38 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Sat, 10 Aug 2019 18:45:27 -0300 Subject: [PATCH] Fix compilation Qt4 still have one remaining compiler error --- limereport.pro | 7 ++++++- limereport/exporters/lrpdfexporter.h | 2 +- limereport/items/lrimageitemeditor.h | 2 +- limereport/lrbanddesignintf.cpp | 2 +- limereport/lrreportdesignwidget.h | 4 ++-- limereport/lrreportengine.cpp | 4 ++-- limereport/lrscriptenginemanager.cpp | 2 +- limereport/objectinspector/lrobjectpropitem.h | 5 ++++- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/limereport.pro b/limereport.pro index 9e33bcc..9bc801f 100644 --- a/limereport.pro +++ b/limereport.pro @@ -16,9 +16,14 @@ SUBDIRS += \ limereport \ demo_r1 \ demo_r2 \ - console \ designer +greaterThan(QT_MAJOR_VERSION, 4){ +greaterThan(QT_MINOR_VERSION, 1){ + SUBDIRS += console + } +} + !contains(CONFIG, embedded_designer){ !contains(CONFIG, static_build){ SUBDIRS += designer_plugin diff --git a/limereport/exporters/lrpdfexporter.h b/limereport/exporters/lrpdfexporter.h index 225c80b..d758ff1 100644 --- a/limereport/exporters/lrpdfexporter.h +++ b/limereport/exporters/lrpdfexporter.h @@ -11,7 +11,7 @@ class PDFExporter : public QObject, public ReportExporterInterface { Q_OBJECT public: - explicit PDFExporter(ReportEnginePrivate *parent = nullptr); + explicit PDFExporter(ReportEnginePrivate *parent = NULL); // ReportExporterInterface interface bool exportPages(ReportPages pages, const QString &fileName, const QMap ¶ms); QString exporterName() diff --git a/limereport/items/lrimageitemeditor.h b/limereport/items/lrimageitemeditor.h index a8cc474..551baae 100644 --- a/limereport/items/lrimageitemeditor.h +++ b/limereport/items/lrimageitemeditor.h @@ -16,7 +16,7 @@ class ImageItemEditor : public QWidget Q_OBJECT public: - explicit ImageItemEditor(LimeReport::ImageItem* item, QWidget *parent = nullptr); + explicit ImageItemEditor(LimeReport::ImageItem* item, QWidget *parent = NULL); ~ImageItemEditor(); private: void updateImage(); diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index d8a6bbb..1690bbc 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -176,7 +176,7 @@ BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, Q if (parentItem) setWidth(parentItem->width()); } - setBackgroundMode(BGMode::TransparentMode); + setBackgroundMode(BaseDesignIntf::TransparentMode); setFillTransparentInDesignMode(false); setHeight(100); setFixedPos(true); diff --git a/limereport/lrreportdesignwidget.h b/limereport/lrreportdesignwidget.h index 4b7248e..ef3b81b 100644 --- a/limereport/lrreportdesignwidget.h +++ b/limereport/lrreportdesignwidget.h @@ -82,12 +82,12 @@ private: class PageView: public QGraphicsView{ public: - PageView(QWidget *parent = nullptr): QGraphicsView(parent), + PageView(QWidget *parent = NULL): QGraphicsView(parent), m_horizontalRuller(0), m_verticalRuller(0) { setViewportMargins(20,20,0,0); } - PageView(QGraphicsScene *scene, QWidget *parent = nullptr): + PageView(QGraphicsScene *scene, QWidget *parent = NULL): QGraphicsView(scene, parent), m_horizontalRuller(0), m_verticalRuller(0) { diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp index c07cff4..8a624e2 100644 --- a/limereport/lrreportengine.cpp +++ b/limereport/lrreportengine.cpp @@ -299,7 +299,7 @@ void ReportEnginePrivate::printReport(ItemsReaderIntf::Ptr reader, QPrinter& pri void ReportEnginePrivate::printReport(ReportPages pages, QPrinter &printer) { int currenPage = 1; - QMap> printProcessors; + QMap > printProcessors; printProcessors.insert("default",QSharedPointer(new PrintProcessor(&printer))); foreach(PageItemDesignIntf::Ptr page, pages){ if ( @@ -320,7 +320,7 @@ void ReportEnginePrivate::printReport(ReportPages pages, QMap> printProcessors; + QMap > printProcessors; for (int i = 0; i < printers.keys().count(); ++i) { printProcessors.insert(printers.keys()[i],QSharedPointer(new PrintProcessor(printers[printers.keys()[i]]))); } diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index cb6e219..f126a4c 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -1930,7 +1930,7 @@ bool DatasourceFunctions::isEOF(const QString &datasourceName) bool DatasourceFunctions::invalidate(const QString& datasourceName) { if (m_dataManager && m_dataManager->dataSource(datasourceName)){ - m_dataManager->dataSourceHolder(datasourceName)->invalidate(IDataSource::DatasourceMode::RENDER_MODE); + m_dataManager->dataSourceHolder(datasourceName)->invalidate(IDataSource::RENDER_MODE); return true; } return false; diff --git a/limereport/objectinspector/lrobjectpropitem.h b/limereport/objectinspector/lrobjectpropitem.h index 46392fc..f765213 100644 --- a/limereport/objectinspector/lrobjectpropitem.h +++ b/limereport/objectinspector/lrobjectpropitem.h @@ -99,7 +99,7 @@ namespace LimeReport{ #endif private: bool m_valid; - void invalidate(){m_object=0; m_objects=0; m_valid = false; m_name = ""; m_value=QVariant(), m_isClass=false;} + void invalidate(){m_object=0; m_objects=0; m_valid = false; m_name = ""; m_value=QVariant(); m_isClass=false;} protected: void beginChangeValue(){ m_changingValue = true; } @@ -140,4 +140,7 @@ namespace LimeReport{ }; } + +Q_DECLARE_METATYPE(LimeReport::ObjectPropItem*) + #endif // LROBJECTPROPITEM_H