forked from qt-creator/qt-creator
ProjectExplorer: Add LayoutBuilder::addRow() convenience function
... and use it in the DebuggerRunConfigurationAspect. Change-Id: I1079f1a307d5e4b286d32570c48299d296fa3061 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -169,13 +169,13 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
|
||||
setConfigWidgetCreator([this] {
|
||||
QWidget *w = new QWidget;
|
||||
LayoutBuilder builder(w);
|
||||
m_cppAspect->addToLayout(builder);
|
||||
m_qmlAspect->addToLayout(builder.startNewRow());
|
||||
m_overrideStartupAspect->addToLayout(builder.startNewRow());
|
||||
builder.addRow(m_cppAspect);
|
||||
builder.addRow(m_qmlAspect);
|
||||
builder.addRow(m_overrideStartupAspect);
|
||||
|
||||
static const QByteArray env = qgetenv("QTC_DEBUGGER_MULTIPROCESS");
|
||||
if (env.toInt())
|
||||
m_multiProcessAspect->addToLayout(builder.startNewRow());
|
||||
builder.addRow(m_multiProcessAspect);
|
||||
|
||||
return w;
|
||||
});
|
||||
|
||||
@@ -79,6 +79,13 @@ LayoutBuilder &LayoutBuilder::startNewRow()
|
||||
return *this;
|
||||
}
|
||||
|
||||
LayoutBuilder &LayoutBuilder::addRow(const LayoutItem &item)
|
||||
{
|
||||
startNewRow();
|
||||
addItem(item);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void LayoutBuilder::flushPendingItems()
|
||||
{
|
||||
if (m_pendingItems.isEmpty())
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
LayoutBuilder &addItem(LayoutItem item);
|
||||
|
||||
LayoutBuilder &startNewRow();
|
||||
LayoutBuilder &addRow(const LayoutItem &item);
|
||||
|
||||
QLayout *layout() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user