Gui: modernize C++: use default member init
This commit is contained in:
@@ -199,7 +199,7 @@ public:
|
||||
DocumentItem* docItem;
|
||||
DocumentObjectItems items;
|
||||
ViewProviderDocumentObject* viewObject;
|
||||
DocumentObjectItem* rootItem;
|
||||
DocumentObjectItem* rootItem{nullptr};
|
||||
std::vector<App::DocumentObject*> children;
|
||||
std::set<App::DocumentObject*> childSet;
|
||||
bool removeChildrenFromRoot;
|
||||
@@ -214,7 +214,8 @@ public:
|
||||
Connection connectStat;
|
||||
|
||||
DocumentObjectData(DocumentItem* docItem, ViewProviderDocumentObject* vpd)
|
||||
: docItem(docItem), viewObject(vpd), rootItem(nullptr)
|
||||
: docItem(docItem)
|
||||
, viewObject(vpd)
|
||||
{
|
||||
//NOLINTBEGIN
|
||||
// Setup connections
|
||||
@@ -2433,13 +2434,13 @@ void TreeWidget::slotActiveDocument(const Gui::Document& Doc)
|
||||
struct UpdateDisabler {
|
||||
QWidget& widget;
|
||||
int& blocked;
|
||||
bool visible;
|
||||
bool focus;
|
||||
bool visible{false};
|
||||
bool focus{false};
|
||||
|
||||
// Note! DO NOT block signal here, or else
|
||||
// QTreeWidgetItem::setChildIndicatorPolicy() does not work
|
||||
UpdateDisabler(QWidget& w, int& blocked)
|
||||
: widget(w), blocked(blocked), visible(false), focus(false)
|
||||
: widget(w), blocked(blocked)
|
||||
{
|
||||
if (++blocked > 1)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user