mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
fix indention to get rid of warnings: "if/else does not guard"
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user