forked from qt-creator/qt-creator
Consolidate some run configuration widget boilerplate
This removes the outermost layer of widget-vbox and moves some common code into a helper function. The pattern repeats (with variations) a few more times, that's left for later patches. Change-Id: I8c98229cf41d03d5330c896ec9fa0965bfc65602 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/detailswidget.h>
|
||||
#include <utils/outputformatter.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/utilsicons.h>
|
||||
@@ -298,6 +299,14 @@ BuildConfiguration *RunConfiguration::activeBuildConfiguration() const
|
||||
return target()->activeBuildConfiguration();
|
||||
}
|
||||
|
||||
QWidget *RunConfiguration::wrapWidget(QWidget *inner) const
|
||||
{
|
||||
auto detailsWidget = new Utils::DetailsWidget;
|
||||
detailsWidget->setState(DetailsWidget::NoSummary);
|
||||
detailsWidget->setWidget(inner);
|
||||
return detailsWidget;
|
||||
}
|
||||
|
||||
Target *RunConfiguration::target() const
|
||||
{
|
||||
return static_cast<Target *>(parent());
|
||||
|
||||
Reference in New Issue
Block a user