From f95db14cade8fc801c51c498c886444619cd3d8f Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Wed, 20 Nov 2019 14:59:01 +0300 Subject: [PATCH] Qt4 build fixed --- limereport/limereport.pri | 27 +++++++++++++++++---------- limereport/lrsimplecrypt.cpp | 6 ++++-- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/limereport/limereport.pri b/limereport/limereport.pri index 95c6ea5..367b435 100644 --- a/limereport/limereport.pri +++ b/limereport/limereport.pri @@ -1,8 +1,11 @@ include(../common.pri) -contains(CONFIG, qtxlsx){ - DEFINES += HAVE_QTXLSX - include($$PWD/../3rdparty/qtxlsx/src/xlsx/qtxlsx.pri) + +greaterThan(QT_MAJOR_VERSION, 4) { + contains(CONFIG, qtxlsx){ + DEFINES += HAVE_QTXLSX + include($$PWD/../3rdparty/qtxlsx/src/xlsx/qtxlsx.pri) + } } contains(CONFIG, embedded_designer){ @@ -74,7 +77,6 @@ SOURCES += \ $$REPORT_PATH/items/lrchartitemeditor.cpp \ $$REPORT_PATH/lrreporttranslation.cpp \ $$REPORT_PATH/exporters/lrpdfexporter.cpp \ - $$REPORT_PATH/exporters/lrhtmlexporter.cpp \ $$REPORT_PATH/lrpreparedpages.cpp contains(CONFIG, staticlib){ @@ -85,9 +87,12 @@ contains(CONFIG, zint){ SOURCES += $$REPORT_PATH/items/lrbarcodeitem.cpp } -contains(CONFIG, qtxlsx){ - message(QtXLSX) - SOURCES += $$REPORT_PATH/exporters/lrexcelexporter.cpp +greaterThan(QT_MAJOR_VERSION, 4) { + SOURCES += $$REPORT_PATH/exporters/lrhtmlexporter.cpp + contains(CONFIG, qtxlsx){ + message(QtXLSX) + SOURCES += $$REPORT_PATH/exporters/lrexcelexporter.cpp + } } HEADERS += \ @@ -164,7 +169,6 @@ HEADERS += \ $$REPORT_PATH/lrexporterintf.h \ $$REPORT_PATH/lrexportersfactory.h \ $$REPORT_PATH/exporters/lrpdfexporter.h \ - $$REPORT_PATH/exporters/lrhtmlexporter.h \ $$REPORT_PATH/lrpreparedpages.h \ $$REPORT_PATH/lrpreparedpagesintf.h @@ -176,8 +180,11 @@ contains(CONFIG,zint){ HEADERS += $$REPORT_PATH/items/lrbarcodeitem.h } -contains(CONFIG, qtxlsx){ - HEADERS += $$REPORT_PATH/exporters/lrexcelexporter.h +greaterThan(QT_MAJOR_VERSION, 4) { + HEADERS += $$REPORT_PATH/exporters/lrhtmlexporter.h + contains(CONFIG, qtxlsx){ + HEADERS += $$REPORT_PATH/exporters/lrexcelexporter.h + } } FORMS += \ diff --git a/limereport/lrsimplecrypt.cpp b/limereport/lrsimplecrypt.cpp index f54cbb2..6ebf15c 100644 --- a/limereport/lrsimplecrypt.cpp +++ b/limereport/lrsimplecrypt.cpp @@ -67,13 +67,15 @@ namespace LimeReport { class ChipperPrivate{ friend class Chipper; public: - ChipperPrivate():m_prepared(false){} + ChipperPrivate():m_prepared(false) { + memset(S, 0, sizeof (S)); + } bool isPrepared(){ return m_prepared;} private: void RC5_SETUP(const char *K); void RC5_ENCRYPT(WORD *pt, WORD *ct); void RC5_DECRYPT(WORD *ct, WORD *pt); - WORD S[26] = {0}; + WORD S[26]; bool m_prepared; };