forked from qt-creator/qt-creator
ClangToolsProjectSettingsWidget: Don't overload slots
Make slot names unique in order to avoid QOverload. Change-Id: Icb43f6087de85c637f4b33ff48588dc4e56b9db3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include "clangtoolsconstants.h"
|
||||
#include "clangtoolsprojectsettings.h"
|
||||
#include "clangtoolssettings.h"
|
||||
#include "clangtoolsutils.h"
|
||||
#include "runsettingswidget.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -86,15 +85,13 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
|
||||
}.attachTo(this, WithoutMargins);
|
||||
|
||||
setUseGlobalSettings(m_projectSettings->useGlobalSettings());
|
||||
onGlobalCustomChanged();
|
||||
onGlobalCustomChanged(useGlobalSettings());
|
||||
connect(this, &ProjectSettingsWidget::useGlobalSettingsChanged,
|
||||
this, QOverload<bool>::of(&ClangToolsProjectSettingsWidget::onGlobalCustomChanged));
|
||||
this, &ClangToolsProjectSettingsWidget::onGlobalCustomChanged);
|
||||
|
||||
// Global settings
|
||||
connect(ClangToolsSettings::instance(),
|
||||
&ClangToolsSettings::changed,
|
||||
this,
|
||||
QOverload<>::of(&ClangToolsProjectSettingsWidget::onGlobalCustomChanged));
|
||||
connect(ClangToolsSettings::instance(), &ClangToolsSettings::changed,
|
||||
this, [this] { onGlobalCustomChanged(useGlobalSettings()); });
|
||||
connect(m_restoreGlobal, &QPushButton::clicked, this, [this] {
|
||||
m_runSettingsWidget->fromSettings(ClangToolsSettings::instance()->runSettings());
|
||||
});
|
||||
@@ -135,11 +132,6 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
|
||||
this, [this](bool) { m_projectSettings->removeAllSuppressedDiagnostics();});
|
||||
}
|
||||
|
||||
void ClangToolsProjectSettingsWidget::onGlobalCustomChanged()
|
||||
{
|
||||
onGlobalCustomChanged(useGlobalSettings());
|
||||
}
|
||||
|
||||
void ClangToolsProjectSettingsWidget::onGlobalCustomChanged(bool useGlobal)
|
||||
{
|
||||
const RunSettings runSettings = useGlobal ? ClangToolsSettings::instance()->runSettings()
|
||||
|
||||
@@ -29,7 +29,6 @@ public:
|
||||
explicit ClangToolsProjectSettingsWidget(ProjectExplorer::Project *project, QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
void onGlobalCustomChanged();
|
||||
void onGlobalCustomChanged(bool useGlobal);
|
||||
|
||||
void updateButtonStates();
|
||||
|
||||
Reference in New Issue
Block a user