0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00

Fix some warnings

This commit is contained in:
Rodrigo Torres 2021-08-17 22:20:38 -03:00
parent df7670d136
commit 9705fb970c
3 changed files with 10 additions and 1 deletions

View File

@ -147,6 +147,7 @@ QWidget *ReportDesignWidget::toolWindow(ReportDesignWidget::ToolWindowType windo
case SignalSlotEditor: case SignalSlotEditor:
return dialogDesignerManager()->signalSlotEditor(); return dialogDesignerManager()->signalSlotEditor();
} }
return NULL;
} }
#endif #endif

View File

@ -42,6 +42,7 @@ QString MarginPropItem::displayValue() const
return QString("%1 %2").arg((propertyValue().toDouble() * Const::mmFACTOR) / (item->unitFactor() * 10), 0, 'f', 2) return QString("%1 %2").arg((propertyValue().toDouble() * Const::mmFACTOR) / (item->unitFactor() * 10), 0, 'f', 2)
.arg(QObject::tr("''")); .arg(QObject::tr("''"));
} }
return QString();
} }
QWidget *MarginPropItem::createProperyEditor(QWidget *parent) const QWidget *MarginPropItem::createProperyEditor(QWidget *parent) const
@ -74,6 +75,7 @@ qreal MarginPropItem::valueInUnits(qreal value) const
case LimeReport::BaseDesignIntf::Inches: case LimeReport::BaseDesignIntf::Inches:
return (value * Const::mmFACTOR) / (item->unitFactor() * 10); return (value * Const::mmFACTOR) / (item->unitFactor() * 10);
} }
return 0;
} }
qreal MarginPropItem::valueInReportUnits(qreal value) const qreal MarginPropItem::valueInReportUnits(qreal value) const
@ -84,8 +86,8 @@ qreal MarginPropItem::valueInReportUnits(qreal value) const
return value; return value;
case LimeReport::BaseDesignIntf::Inches: case LimeReport::BaseDesignIntf::Inches:
return (value * (item->unitFactor() * 10)) / Const::mmFACTOR; return (value * (item->unitFactor() * 10)) / Const::mmFACTOR;
} }
return 0;
} }
QString MarginPropItem::unitShortName() const QString MarginPropItem::unitShortName() const
@ -97,6 +99,7 @@ QString MarginPropItem::unitShortName() const
case LimeReport::BaseDesignIntf::Inches: case LimeReport::BaseDesignIntf::Inches:
return QObject::tr("''"); return QObject::tr("''");
} }
return QString();
} }
} // namespace LimeReport } // namespace LimeReport

View File

@ -171,6 +171,7 @@ qreal LimeReport::RectUnitValuePropItem::valueInUnits(qreal value) const
case LimeReport::BaseDesignIntf::Inches: case LimeReport::BaseDesignIntf::Inches:
return value / (item->unitFactor() * 10); return value / (item->unitFactor() * 10);
} }
return 0;
} }
qreal LimeReport::RectUnitValuePropItem::valueInReportUnits(qreal value) const qreal LimeReport::RectUnitValuePropItem::valueInReportUnits(qreal value) const
@ -182,6 +183,7 @@ qreal LimeReport::RectUnitValuePropItem::valueInReportUnits(qreal value) const
case LimeReport::BaseDesignIntf::Inches: case LimeReport::BaseDesignIntf::Inches:
return value * (item->unitFactor() * 10); return value * (item->unitFactor() * 10);
} }
return 0;
} }
QString LimeReport::RectUnitValuePropItem::unitShortName() const QString LimeReport::RectUnitValuePropItem::unitShortName() const
@ -193,6 +195,7 @@ QString LimeReport::RectUnitValuePropItem::unitShortName() const
case LimeReport::BaseDesignIntf::Inches: case LimeReport::BaseDesignIntf::Inches:
return QObject::tr("''"); return QObject::tr("''");
} }
return QString();
} }
QString LimeReport::RectUnitValuePropItem::displayValue() const QString LimeReport::RectUnitValuePropItem::displayValue() const
@ -258,6 +261,7 @@ QRectF LimeReport::RectUnitPropItem::rectInUnits(QRectF rect) const
rect.width() / (item->unitFactor() * 10), rect.width() / (item->unitFactor() * 10),
rect.height() / (item->unitFactor() * 10)); rect.height() / (item->unitFactor() * 10));
} }
return QRectF();
} }
QString LimeReport::RectUnitPropItem::unitShortName() const QString LimeReport::RectUnitPropItem::unitShortName() const
@ -269,4 +273,5 @@ QString LimeReport::RectUnitPropItem::unitShortName() const
case LimeReport::BaseDesignIntf::Inches: case LimeReport::BaseDesignIntf::Inches:
return QObject::tr("''"); return QObject::tr("''");
} }
return QString();
} }