forked from qt-creator/qt-creator
ProjectExplorer: Remove direct runconfig dependency from ISettingsAspect
Change-Id: I5d8a6a31f6bf97c34163b64b8d37f9ea070717ba Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -37,7 +37,7 @@ QmlProfilerRunConfigurationAspect::QmlProfilerRunConfigurationAspect(
|
||||
ProjectExplorer::RunConfiguration *parent) :
|
||||
ProjectExplorer::IRunConfigurationAspect(parent)
|
||||
{
|
||||
setProjectSettings(new QmlProfilerSettings(parent));
|
||||
setProjectSettings(new QmlProfilerSettings);
|
||||
setGlobalSettings(QmlProfilerPlugin::globalSettings());
|
||||
setId(Constants::SETTINGS);
|
||||
setDisplayName(QCoreApplication::translate("QmlProfilerRunConfiguration", "QML Profiler Settings"));
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
QmlProfilerSettings::QmlProfilerSettings(ProjectExplorer::RunConfiguration *runConfiguration) :
|
||||
ProjectExplorer::ISettingsAspect(runConfiguration)
|
||||
QmlProfilerSettings::QmlProfilerSettings()
|
||||
: ProjectExplorer::ISettingsAspect([this] { return new QmlProfilerConfigWidget(this); })
|
||||
{
|
||||
QVariantMap defaults;
|
||||
defaults.insert(QLatin1String(Constants::FLUSH_INTERVAL), 1000);
|
||||
@@ -54,11 +54,6 @@ QmlProfilerSettings::QmlProfilerSettings(ProjectExplorer::RunConfiguration *runC
|
||||
fromMap(map);
|
||||
}
|
||||
|
||||
QWidget *QmlProfilerSettings::createConfigWidget(QWidget *parent)
|
||||
{
|
||||
return new Internal::QmlProfilerConfigWidget(this, parent);
|
||||
}
|
||||
|
||||
bool QmlProfilerSettings::flushEnabled() const
|
||||
{
|
||||
return m_flushEnabled;
|
||||
|
||||
@@ -34,8 +34,7 @@ class QmlProfilerSettings : public ProjectExplorer::ISettingsAspect
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QmlProfilerSettings(ProjectExplorer::RunConfiguration *runConfiguration = nullptr);
|
||||
QWidget *createConfigWidget(QWidget *parent) override;
|
||||
QmlProfilerSettings();
|
||||
|
||||
bool flushEnabled() const;
|
||||
void setFlushEnabled(bool flushEnabled);
|
||||
|
||||
Reference in New Issue
Block a user