forked from qt-creator/qt-creator
ProjectExplorer: Remove PropertiesPanel struct
Parameter structs are convenient if they get passed around a lot or are regularly changed. This isn't the case here, so make the user code more compact instead. Change-Id: Idd5e5cc1f70b1547607532cd3e6515c27983c169 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
#include "project.h"
|
||||
#include "projectexplorer.h"
|
||||
#include "projectpanelfactory.h"
|
||||
#include "propertiespanel.h"
|
||||
#include "session.h"
|
||||
#include "target.h"
|
||||
#include "targetsettingspanel.h"
|
||||
@@ -97,12 +96,10 @@ QVariant MiscSettingsPanelItem::data(int column, int role) const
|
||||
if (role == PanelWidgetRole) {
|
||||
if (!m_widget) {
|
||||
auto panelsWidget = new PanelsWidget;
|
||||
auto panel = new PropertiesPanel;
|
||||
panel->setDisplayName(m_factory->displayName());
|
||||
QWidget *widget = m_factory->createWidget(m_project);
|
||||
panel->setWidget(widget);
|
||||
panel->setIcon(QIcon(m_factory->icon()));
|
||||
panelsWidget->addPropertiesPanel(panel);
|
||||
panelsWidget->addPropertiesPanel(m_factory->displayName(),
|
||||
QIcon(m_factory->icon()),
|
||||
widget);
|
||||
panelsWidget->setFocusProxy(widget);
|
||||
m_widget = panelsWidget;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user