fix indention to get rid of warnings: "if/else does not guard"

This commit is contained in:
plc-user
2024-04-07 14:46:40 +02:00
parent f343395da0
commit f4c880dc9f
2 changed files with 28 additions and 28 deletions

View File

@@ -2044,21 +2044,21 @@ void QETApp::initConfiguration()
QDir config_dir(QETApp::configDir()); QDir config_dir(QETApp::configDir());
if (!config_dir.exists()) config_dir.mkpath(QETApp::configDir()); if (!config_dir.exists()) config_dir.mkpath(QETApp::configDir());
QDir custom_elements_dir(QETApp::customElementsDir()); QDir custom_elements_dir(QETApp::customElementsDir());
if (!custom_elements_dir.exists()) if (!custom_elements_dir.exists())
custom_elements_dir.mkpath(QETApp::customElementsDir()); custom_elements_dir.mkpath(QETApp::customElementsDir());
QDir company_elements_dir(QETApp::companyElementsDir()); QDir company_elements_dir(QETApp::companyElementsDir());
if (!company_elements_dir.exists()) if (!company_elements_dir.exists())
company_elements_dir.mkpath(QETApp::companyElementsDir()); company_elements_dir.mkpath(QETApp::companyElementsDir());
QDir company_tbt_dir(QETApp::companyTitleBlockTemplatesDir()); QDir company_tbt_dir(QETApp::companyTitleBlockTemplatesDir());
if (!company_tbt_dir.exists()) if (!company_tbt_dir.exists())
company_tbt_dir.mkpath(QETApp::companyTitleBlockTemplatesDir()); company_tbt_dir.mkpath(QETApp::companyTitleBlockTemplatesDir());
QDir custom_tbt_dir(QETApp::customTitleBlockTemplatesDir()); QDir custom_tbt_dir(QETApp::customTitleBlockTemplatesDir());
if (!custom_tbt_dir.exists()) if (!custom_tbt_dir.exists())
custom_tbt_dir.mkpath(QETApp::customTitleBlockTemplatesDir()); custom_tbt_dir.mkpath(QETApp::customTitleBlockTemplatesDir());
/* recent files /* recent files
* note: * note:

View File

@@ -952,31 +952,31 @@ bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen)
switch (m_shapeType) switch (m_shapeType)
{ {
case Line: case Line:
Createdxf::drawLine(filepath, Createdxf::drawLine(filepath,
QLineF( mapToScene(m_P1), QLineF( mapToScene(m_P1),
mapToScene(m_P2)), mapToScene(m_P2)),
Createdxf::dxfColor(pen)); Createdxf::dxfColor(pen));
return true; return true;
case Rectangle: case Rectangle:
Createdxf::drawRectangle(filepath, Createdxf::drawRectangle(filepath,
QRectF(mapToScene(m_P1), QRectF(mapToScene(m_P1),
mapToScene(m_P2)).normalized(), mapToScene(m_P2)).normalized(),
Createdxf::dxfColor(pen)); Createdxf::dxfColor(pen));
return true; return true;
case Ellipse: case Ellipse:
Createdxf::drawEllipse(filepath, Createdxf::drawEllipse(filepath,
QRectF(mapToScene(m_P1), QRectF(mapToScene(m_P1),
mapToScene(m_P2)).normalized(), mapToScene(m_P2)).normalized(),
Createdxf::dxfColor(pen)); Createdxf::dxfColor(pen));
return true; return true;
case Polygon: case Polygon:
if(m_polygon.isClosed()) if(m_polygon.isClosed())
Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen)); Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen));
else else
Createdxf::drawPolyline(filepath,m_polygon,Createdxf::dxfColor(pen)); Createdxf::drawPolyline(filepath,m_polygon,Createdxf::dxfColor(pen));
return true; return true;
default: default:
return false; return false;
} }
} }