From 614bb38c542514122fdd683d3c0a55150906d695 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Sun, 10 Sep 2017 00:45:56 -0300 Subject: [PATCH 1/4] Simplify --- common.pri | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common.pri b/common.pri index d9d35bd..b99a952 100644 --- a/common.pri +++ b/common.pri @@ -72,9 +72,8 @@ LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 LIMEREPORT_VERSION_RELEASE = 40 -LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' -DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" -DEFINES += LIMEREPORT_VERSION=$${LIMEREPORT_VERSION} +LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' +DEFINES += LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" QT += script xml sql REPORT_PATH = $$PWD/limereport From 066a31d1c4152f8609f6a7b5e1c51499b1e488ea Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Sun, 10 Sep 2017 00:47:53 -0300 Subject: [PATCH 2/4] Define only once --- common.pri | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/common.pri b/common.pri index b99a952..6101c54 100644 --- a/common.pri +++ b/common.pri @@ -1,27 +1,27 @@ -CONFIG += build_translations +CONFIG *= build_translations !contains(CONFIG, no_zint){ - CONFIG += zint + CONFIG *= zint } !contains(CONFIG, qtscriptengine){ - CONFIG += qjsengine + CONFIG *= qjsengine } !contains(CONFIG, no_formdesigner){ - CONFIG += dialogdesigner + CONFIG *= dialogdesigner } ZINT_PATH = $$PWD/3rdparty/zint-2.6.1 contains(CONFIG,zint){ - DEFINES += HAVE_ZINT + DEFINES *= HAVE_ZINT } greaterThan(QT_MAJOR_VERSION, 4) { - QT += uitools + QT *= uitools } lessThan(QT_MAJOR_VERSION, 5){ - CONFIG += uitools + CONFIG *= uitools } CONFIG(release, debug|release){ @@ -73,30 +73,30 @@ LIMEREPORT_VERSION_MINOR = 4 LIMEREPORT_VERSION_RELEASE = 40 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' -DEFINES += LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" +DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" -QT += script xml sql +QT *= script xml sql REPORT_PATH = $$PWD/limereport TRANSLATIONS_PATH = $$PWD/translations greaterThan(QT_MAJOR_VERSION, 4) { - DEFINES+=HAVE_QT5 - QT+= printsupport widgets qml + DEFINES *= HAVE_QT5 + QT *= printsupport widgets qml contains(QT,uitools){ message(uitools) - DEFINES += HAVE_UI_LOADER + DEFINES *= HAVE_UI_LOADER } contains(CONFIG, qjsengine){ message(qjsengine) - DEFINES += USE_QJSENGINE + DEFINES *= USE_QJSENGINE } } lessThan(QT_MAJOR_VERSION, 5){ - DEFINES+=HAVE_QT4 + DEFINES *= HAVE_QT4 CONFIG(uitools){ message(uitools) - DEFINES += HAVE_UI_LOADER + DEFINES *= HAVE_UI_LOADER } } From 34192da524debff96ddaa8163c1b787fff228c80 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Sun, 10 Sep 2017 01:03:06 -0300 Subject: [PATCH 3/4] Remove unused variable --- limereport/items/lrbarcodeitem.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/limereport/items/lrbarcodeitem.h b/limereport/items/lrbarcodeitem.h index 6b6f98f..c7eebb2 100644 --- a/limereport/items/lrbarcodeitem.h +++ b/limereport/items/lrbarcodeitem.h @@ -30,7 +30,6 @@ #ifndef LRBARCODEITEM_H #define LRBARCODEITEM_H #include "lritemdesignintf.h" -#include namespace LimeReport{ @@ -184,7 +183,6 @@ public: void setInputMode(const InputMode &inputMode); private: - Zint::QZint m_bc; QString m_content; QString m_designTestValue; BarcodeType m_barcodeType; From f5f3f246f0e70f200bff71625a5cf15e83e46d58 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Sun, 10 Sep 2017 01:03:32 -0300 Subject: [PATCH 4/4] Remove parameter that does nothing --- 3rdparty/zint-2.6.1/backend_qt/qzint.cpp | 2 +- 3rdparty/zint-2.6.1/backend_qt/qzint.h | 2 +- limereport/items/lrbarcodeitem.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3rdparty/zint-2.6.1/backend_qt/qzint.cpp b/3rdparty/zint-2.6.1/backend_qt/qzint.cpp index ba5815f..cec92ce 100644 --- a/3rdparty/zint-2.6.1/backend_qt/qzint.cpp +++ b/3rdparty/zint-2.6.1/backend_qt/qzint.cpp @@ -300,7 +300,7 @@ namespace Zint { return result; } - void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode mode) { + void QZint::render(QPainter & painter, const QRectF & paintRect) { bool textdone; int comp_offset = 0; int xoffset = m_whitespace; diff --git a/3rdparty/zint-2.6.1/backend_qt/qzint.h b/3rdparty/zint-2.6.1/backend_qt/qzint.h index 5c1f9e1..70b5acc 100644 --- a/3rdparty/zint-2.6.1/backend_qt/qzint.h +++ b/3rdparty/zint-2.6.1/backend_qt/qzint.h @@ -86,7 +86,7 @@ public: QString error_message(); - void render(QPainter & painter, const QRectF & paintRect, AspectRatioMode mode=IgnoreAspectRatio); + void render(QPainter & painter, const QRectF & paintRect); const QString & lastError(); bool hasErrors(); diff --git a/limereport/items/lrbarcodeitem.cpp b/limereport/items/lrbarcodeitem.cpp index 7af23bf..ff2e7cc 100644 --- a/limereport/items/lrbarcodeitem.cpp +++ b/limereport/items/lrbarcodeitem.cpp @@ -99,7 +99,7 @@ void BarcodeItem::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *opti break; } - bc.render(*ppainter,bcRect,Zint::QZint::KeepAspectRatio); + bc.render(*ppainter,bcRect); ppainter->restore(); ItemDesignIntf::paint(ppainter,option,widget); }