From 9705fb970c5c5b81d0855c1015051363323954f3 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Tue, 17 Aug 2021 22:20:38 -0300 Subject: [PATCH] Fix some warnings --- limereport/lrreportdesignwidget.cpp | 1 + .../objectinspector/propertyItems/lrmarginpropitem.cpp | 5 ++++- limereport/objectinspector/propertyItems/lrrectproptem.cpp | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index acd6298..2cbfcd9 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -147,6 +147,7 @@ QWidget *ReportDesignWidget::toolWindow(ReportDesignWidget::ToolWindowType windo case SignalSlotEditor: return dialogDesignerManager()->signalSlotEditor(); } + return NULL; } #endif diff --git a/limereport/objectinspector/propertyItems/lrmarginpropitem.cpp b/limereport/objectinspector/propertyItems/lrmarginpropitem.cpp index 66bbc25..469cfda 100644 --- a/limereport/objectinspector/propertyItems/lrmarginpropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrmarginpropitem.cpp @@ -42,6 +42,7 @@ QString MarginPropItem::displayValue() const return QString("%1 %2").arg((propertyValue().toDouble() * Const::mmFACTOR) / (item->unitFactor() * 10), 0, 'f', 2) .arg(QObject::tr("''")); } + return QString(); } QWidget *MarginPropItem::createProperyEditor(QWidget *parent) const @@ -74,6 +75,7 @@ qreal MarginPropItem::valueInUnits(qreal value) const case LimeReport::BaseDesignIntf::Inches: return (value * Const::mmFACTOR) / (item->unitFactor() * 10); } + return 0; } qreal MarginPropItem::valueInReportUnits(qreal value) const @@ -84,8 +86,8 @@ qreal MarginPropItem::valueInReportUnits(qreal value) const return value; case LimeReport::BaseDesignIntf::Inches: return (value * (item->unitFactor() * 10)) / Const::mmFACTOR; - } + return 0; } QString MarginPropItem::unitShortName() const @@ -97,6 +99,7 @@ QString MarginPropItem::unitShortName() const case LimeReport::BaseDesignIntf::Inches: return QObject::tr("''"); } + return QString(); } } // namespace LimeReport diff --git a/limereport/objectinspector/propertyItems/lrrectproptem.cpp b/limereport/objectinspector/propertyItems/lrrectproptem.cpp index a5503f7..a364c5f 100644 --- a/limereport/objectinspector/propertyItems/lrrectproptem.cpp +++ b/limereport/objectinspector/propertyItems/lrrectproptem.cpp @@ -171,6 +171,7 @@ qreal LimeReport::RectUnitValuePropItem::valueInUnits(qreal value) const case LimeReport::BaseDesignIntf::Inches: return value / (item->unitFactor() * 10); } + return 0; } qreal LimeReport::RectUnitValuePropItem::valueInReportUnits(qreal value) const @@ -182,6 +183,7 @@ qreal LimeReport::RectUnitValuePropItem::valueInReportUnits(qreal value) const case LimeReport::BaseDesignIntf::Inches: return value * (item->unitFactor() * 10); } + return 0; } QString LimeReport::RectUnitValuePropItem::unitShortName() const @@ -193,6 +195,7 @@ QString LimeReport::RectUnitValuePropItem::unitShortName() const case LimeReport::BaseDesignIntf::Inches: return QObject::tr("''"); } + return QString(); } QString LimeReport::RectUnitValuePropItem::displayValue() const @@ -258,6 +261,7 @@ QRectF LimeReport::RectUnitPropItem::rectInUnits(QRectF rect) const rect.width() / (item->unitFactor() * 10), rect.height() / (item->unitFactor() * 10)); } + return QRectF(); } QString LimeReport::RectUnitPropItem::unitShortName() const @@ -269,4 +273,5 @@ QString LimeReport::RectUnitPropItem::unitShortName() const case LimeReport::BaseDesignIntf::Inches: return QObject::tr("''"); } + return QString(); }