Mod overlapping comparisons

warning: overlapping comparisons always evaluate to true

valid for a project made before 0.7
probably it will be better to delete the code completely.
This commit is contained in:
Simon De Backer
2020-11-01 18:11:55 +01:00
parent 69adb10bcc
commit 41c7cde8ca

View File

@@ -1015,12 +1015,13 @@ bool Element::fromXml(
if(deti->textFrom()== DynamicElementTextItem::ElementInfo
&& deti->infoName() == "label")
{
qDebug() << "see 'Mod overlapping comparisons' in git";
qreal rotation = deti->rotation();
//Create the comment item
DynamicElementTextItem *comment_text = nullptr;
if (m_link_type != PreviousReport
|| m_link_type !=NextReport)
&& m_link_type != NextReport)
{
m_state = QET::GIOK;
return(true);
@@ -1041,7 +1042,8 @@ bool Element::fromXml(
}
//create the location item
DynamicElementTextItem *location_text = nullptr;
if (m_link_type !=PreviousReport || m_link_type !=NextReport)
if (m_link_type != PreviousReport
&& m_link_type != NextReport)
{
m_state = QET::GIOK;
return(true);
@@ -1062,7 +1064,7 @@ bool Element::fromXml(
QPointF pos = deti->pos();
if (m_link_type != PreviousReport
|| m_link_type !=NextReport)
&& m_link_type != NextReport)
{
m_state = QET::GIOK;
return(true);