move initialization to header, so it must not be done in every constructor

This commit is contained in:
Martin Marmsoler
2020-05-26 16:20:30 +02:00
committed by Laurent Trinques
parent 439cf4cbd6
commit c2e17daab9
2 changed files with 10 additions and 25 deletions

View File

@@ -110,15 +110,15 @@ class Terminal : public QGraphicsObject
static QColor forbiddenColor;
private:
bool m_draw_help_line;
QGraphicsLineItem *m_help_line;
QGraphicsLineItem *m_help_line_a;
bool m_draw_help_line{false};
QGraphicsLineItem *m_help_line{nullptr};
QGraphicsLineItem *m_help_line_a{nullptr};
TerminalData* d;
/// Parent electrical element
Element *parent_element_;
Element *parent_element_{nullptr};
/// docking point for parent element
QPointF dock_elmt_;
/// List of conductors attached to the terminal
@@ -126,7 +126,7 @@ class Terminal : public QGraphicsObject
/// Pointer to a rectangle representing the terminal bounding rect;
/// used to calculate the bounding rect once only;
/// used a pointer because boundingRect() is supposed to be const.
QRectF *br_;
QRectF *br_{nullptr};
/// Last terminal seen through an attached conductor
Terminal *previous_terminal_;
/// Whether the mouse pointer is hovering the terminal