forked from qt-creator/qt-creator
Utils: Make Aspect::addToLayout() const
It's conceptionally const, and would be useful to use as such, but the current implementations often modifie mutable state. To ease the transition pain, rename the previous non-const version to addToLayoutImpl() and call it after const_cast'ing. Change-Id: Ic8ca38e40f5df69c3d11121f96ea37648cf4feb7 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
||||
private:
|
||||
void makeReadOnly() override { m_chooser->setReadOnly(true); }
|
||||
|
||||
void addToLayoutImpl(Layouting::Layout &builder) override
|
||||
void addToInnerLayout(Layouting::Layout &builder) override
|
||||
{
|
||||
addMutableAction(m_chooser);
|
||||
builder.addItem(Layouting::Span(2, m_chooser));
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void addToLayoutImpl(Layouting::Layout &builder) override
|
||||
void addToInnerLayout(Layouting::Layout &builder) override
|
||||
{
|
||||
addMutableAction(m_mainWidget);
|
||||
builder.addItem(m_mainWidget);
|
||||
@@ -739,7 +739,7 @@ public:
|
||||
~DeviceTypeKitAspectImpl() override { delete m_comboBox; }
|
||||
|
||||
private:
|
||||
void addToLayoutImpl(Layouting::Layout &builder) override
|
||||
void addToInnerLayout(Layouting::Layout &builder) override
|
||||
{
|
||||
addMutableAction(m_comboBox);
|
||||
builder.addItem(m_comboBox);
|
||||
@@ -889,7 +889,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void addToLayoutImpl(Layouting::Layout &builder) override
|
||||
void addToInnerLayout(Layouting::Layout &builder) override
|
||||
{
|
||||
addMutableAction(m_comboBox);
|
||||
builder.addItem(m_comboBox);
|
||||
@@ -1170,7 +1170,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void addToLayoutImpl(Layouting::Layout &builder) override
|
||||
void addToInnerLayout(Layouting::Layout &builder) override
|
||||
{
|
||||
addMutableAction(m_comboBox);
|
||||
builder.addItem(m_comboBox);
|
||||
@@ -1433,7 +1433,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void addToLayoutImpl(Layouting::Layout &builder) override
|
||||
void addToInnerLayout(Layouting::Layout &builder) override
|
||||
{
|
||||
addMutableAction(m_mainWidget);
|
||||
builder.addItem(m_mainWidget);
|
||||
|
||||
Reference in New Issue
Block a user