mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
Fix GCC 6 warnings, thanks Remi Collet
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4442 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
parent
f7f75be332
commit
b6886defbd
@ -220,13 +220,25 @@ QPainterPath QetShapeItem::shape() const
|
|||||||
|
|
||||||
switch (m_shapeType)
|
switch (m_shapeType)
|
||||||
{
|
{
|
||||||
case Line: path.moveTo(m_P1);
|
case Line:
|
||||||
path.lineTo(m_P2); break;
|
path.moveTo(m_P1);
|
||||||
case Rectangle: path.addRect(QRectF(m_P1, m_P2)); break;
|
path.lineTo(m_P2);
|
||||||
case Ellipse: path.addEllipse(QRectF(m_P1, m_P2)); break;
|
break;
|
||||||
case Polygon: path.addPolygon(m_polygon);
|
case Rectangle:
|
||||||
if (m_close) path.closeSubpath(); break;
|
path.addRect(QRectF(m_P1, m_P2));
|
||||||
default: Q_ASSERT(false); break;
|
break;
|
||||||
|
case Ellipse:
|
||||||
|
path.addEllipse(QRectF(m_P1, m_P2));
|
||||||
|
break;
|
||||||
|
case Polygon:
|
||||||
|
path.addPolygon(m_polygon);
|
||||||
|
if (m_close) {
|
||||||
|
path.closeSubpath();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Q_ASSERT(false);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPainterPathStroker pps;
|
QPainterPathStroker pps;
|
||||||
|
@ -172,12 +172,15 @@ void ElementPropertiesWidget::updateUi()
|
|||||||
|
|
||||||
//Purge the tab widget and delete all widget
|
//Purge the tab widget and delete all widget
|
||||||
m_tab->clear();
|
m_tab->clear();
|
||||||
qDeleteAll(m_list_editor); m_list_editor.clear();
|
qDeleteAll(m_list_editor);
|
||||||
if(m_general_widget) delete m_general_widget; m_general_widget = nullptr;
|
m_list_editor.clear();
|
||||||
|
if(m_general_widget) {
|
||||||
|
delete m_general_widget;
|
||||||
|
m_general_widget = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
//Create editor according to the type of element
|
//Create editor according to the type of element
|
||||||
switch (m_element -> linkType())
|
switch (m_element -> linkType()) {
|
||||||
{
|
|
||||||
case Element::Simple:
|
case Element::Simple:
|
||||||
m_list_editor << new ElementInfoWidget(m_element, this);
|
m_list_editor << new ElementInfoWidget(m_element, this);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user