Drop Qt5: Clang, QBS & Valgrind: Get rid of QOverload

Change-Id: I86697f07a8dce5674d6e748bce807df59b773227
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2022-07-19 23:29:42 +02:00
parent 1b070bcb11
commit 683ad910b8
17 changed files with 44 additions and 62 deletions

View File

@@ -147,7 +147,7 @@ void ClangFormatConfigWidget::initCheckBoxes()
m_ui->formatWhileTyping->setEnabled(isFormatting); m_ui->formatWhileTyping->setEnabled(isFormatting);
}; };
setEnableCheckBoxes(m_ui->indentingOrFormatting->currentIndex()); setEnableCheckBoxes(m_ui->indentingOrFormatting->currentIndex());
connect(m_ui->indentingOrFormatting, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_ui->indentingOrFormatting, &QComboBox::currentIndexChanged,
this, setEnableCheckBoxes); this, setEnableCheckBoxes);
m_ui->formatOnSave->setChecked(ClangFormatSettings::instance().formatOnSave()); m_ui->formatOnSave->setChecked(ClangFormatSettings::instance().formatOnSave());
@@ -196,10 +196,8 @@ void ClangFormatConfigWidget::connectChecks()
for (QObject *child : m_checksWidget->children()) { for (QObject *child : m_checksWidget->children()) {
auto comboBox = qobject_cast<QComboBox *>(child); auto comboBox = qobject_cast<QComboBox *>(child);
if (comboBox != nullptr) { if (comboBox != nullptr) {
connect(comboBox, connect(comboBox, &QComboBox::currentIndexChanged,
QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ClangFormatConfigWidget::onTableChanged);
this,
&ClangFormatConfigWidget::onTableChanged);
comboBox->installEventFilter(this); comboBox->installEventFilter(this);
continue; continue;
} }
@@ -234,8 +232,7 @@ void ClangFormatConfigWidget::initIndentationOrFormattingCombobox()
m_ui->indentingOrFormatting->setVisible(isGlobal); m_ui->indentingOrFormatting->setVisible(isGlobal);
m_ui->formattingModeLabel->setVisible(isGlobal); m_ui->formattingModeLabel->setVisible(isGlobal);
connect(m_ui->indentingOrFormatting, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_ui->indentingOrFormatting, &QComboBox::currentIndexChanged, this, [](int index) {
this, [](int index) {
ClangFormatSettings &settings = ClangFormatSettings::instance(); ClangFormatSettings &settings = ClangFormatSettings::instance();
settings.setMode(static_cast<ClangFormatSettings::Mode>(index)); settings.setMode(static_cast<ClangFormatSettings::Mode>(index));
settings.write(); settings.write();
@@ -361,7 +358,7 @@ static void fillComboBoxOrLineEdit(QObject *object, const std::string &text, siz
void ClangFormatConfigWidget::fillTable() void ClangFormatConfigWidget::fillTable()
{ {
Utils::ExecuteOnDestruction executeOnDestruction([this]() { m_disableTableUpdate = false; }); Utils::ExecuteOnDestruction executeOnDestruction([this] { m_disableTableUpdate = false; });
m_disableTableUpdate = true; m_disableTableUpdate = true;
const std::string configText = readFile(m_config->filePath().path()); const std::string configText = readFile(m_config->filePath().path());

View File

@@ -462,7 +462,7 @@ ClangTool::ClangTool()
action->setDisabled(true); action->setDisabled(true);
action->setIcon(Utils::Icons::CLEAN_TOOLBAR.icon()); action->setIcon(Utils::Icons::CLEAN_TOOLBAR.icon());
action->setToolTip(tr("Clear")); action->setToolTip(tr("Clear"));
connect(action, &QAction::triggered, this, [this]() { connect(action, &QAction::triggered, this, [this] {
reset(); reset();
update(); update();
}); });
@@ -498,7 +498,7 @@ ClangTool::ClangTool()
m_selectFixitsCheckBox->setText("Select Fixits"); m_selectFixitsCheckBox->setText("Select Fixits");
m_selectFixitsCheckBox->setEnabled(false); m_selectFixitsCheckBox->setEnabled(false);
m_selectFixitsCheckBox->setTristate(true); m_selectFixitsCheckBox->setTristate(true);
connect(m_selectFixitsCheckBox, &QCheckBox::clicked, this, [this]() { connect(m_selectFixitsCheckBox, &QCheckBox::clicked, this, [this] {
m_diagnosticView->scheduleAllFixits(m_selectFixitsCheckBox->isChecked()); m_diagnosticView->scheduleAllFixits(m_selectFixitsCheckBox->isChecked());
}); });
@@ -524,7 +524,7 @@ ClangTool::ClangTool()
updateForCurrentState(); updateForCurrentState();
}); });
connect(m_applyFixitsButton, &QToolButton::clicked, [this]() { connect(m_applyFixitsButton, &QToolButton::clicked, [this] {
QVector<DiagnosticItem *> diagnosticItems; QVector<DiagnosticItem *> diagnosticItems;
m_diagnosticModel->forItemsAtLevel<2>([&](DiagnosticItem *item){ m_diagnosticModel->forItemsAtLevel<2>([&](DiagnosticItem *item){
diagnosticItems += item; diagnosticItems += item;
@@ -562,7 +562,7 @@ ClangTool::ClangTool()
action->setToolTip(toolTip); action->setToolTip(toolTip);
menu->addAction(ActionManager::registerAction(action, "ClangTidyClazy.Action"), menu->addAction(ActionManager::registerAction(action, "ClangTidyClazy.Action"),
Debugger::Constants::G_ANALYZER_TOOLS); Debugger::Constants::G_ANALYZER_TOOLS);
QObject::connect(action, &QAction::triggered, this, [this]() { QObject::connect(action, &QAction::triggered, this, [this] {
startTool(FileSelectionType::AskUser); startTool(FileSelectionType::AskUser);
}); });
QObject::connect(m_startAction, &QAction::triggered, action, &QAction::triggered); QObject::connect(m_startAction, &QAction::triggered, action, &QAction::triggered);
@@ -692,7 +692,7 @@ void ClangTool::startTool(ClangTool::FileSelection fileSelection,
connect(m_runWorker, &ClangToolRunWorker::buildFailed,this, &ClangTool::onBuildFailed); connect(m_runWorker, &ClangToolRunWorker::buildFailed,this, &ClangTool::onBuildFailed);
connect(m_runWorker, &ClangToolRunWorker::startFailed, this, &ClangTool::onStartFailed); connect(m_runWorker, &ClangToolRunWorker::startFailed, this, &ClangTool::onStartFailed);
connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted); connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted);
connect(m_runWorker, &ClangToolRunWorker::runnerFinished, this, [this]() { connect(m_runWorker, &ClangToolRunWorker::runnerFinished, this, [this] {
m_filesCount = m_runWorker->totalFilesToAnalyze(); m_filesCount = m_runWorker->totalFilesToAnalyze();
m_filesSucceeded = m_runWorker->filesAnalyzed(); m_filesSucceeded = m_runWorker->filesAnalyzed();
m_filesFailed = m_runWorker->filesNotAnalyzed(); m_filesFailed = m_runWorker->filesNotAnalyzed();
@@ -1017,17 +1017,15 @@ void ClangTool::filterOutCurrentKind()
void ClangTool::onBuildFailed() void ClangTool::onBuildFailed()
{ {
m_infoBarWidget->setError(InfoBarWidget::Error, m_infoBarWidget->setError(InfoBarWidget::Error, tr("Failed to build the project."),
tr("Failed to build the project."), [this] { showOutputPane(); });
[this]() { showOutputPane(); });
setState(State::PreparationFailed); setState(State::PreparationFailed);
} }
void ClangTool::onStartFailed() void ClangTool::onStartFailed()
{ {
m_infoBarWidget->setError(InfoBarWidget::Error, m_infoBarWidget->setError(InfoBarWidget::Error, makeLink(tr("Failed to start the analyzer.")),
makeLink(tr("Failed to start the analyzer.")), [this] { showOutputPane(); });
[this]() { showOutputPane(); });
setState(State::PreparationFailed); setState(State::PreparationFailed);
} }
@@ -1170,7 +1168,7 @@ void ClangTool::updateForCurrentState()
const bool hasErrors = m_filesFailed > 0; const bool hasErrors = m_filesFailed > 0;
if (hasErrors && !hasErrorText) { if (hasErrors && !hasErrorText) {
const QString text = makeLink(tr("Failed to analyze %n file(s).", nullptr, m_filesFailed)); const QString text = makeLink(tr("Failed to analyze %n file(s).", nullptr, m_filesFailed));
m_infoBarWidget->setError(InfoBarWidget::Warning, text, [this]() { showOutputPane(); }); m_infoBarWidget->setError(InfoBarWidget::Warning, text, [this] { showOutputPane(); });
} }
// Info bar: info // Info bar: info

View File

@@ -197,10 +197,10 @@ QList<RunnerCreator> ClangToolRunWorker::runnerCreators()
QList<RunnerCreator> creators; QList<RunnerCreator> creators;
if (m_diagnosticConfig.isClangTidyEnabled()) if (m_diagnosticConfig.isClangTidyEnabled())
creators << [this]() { return createRunner<ClangTidyRunner>(); }; creators << [this] { return createRunner<ClangTidyRunner>(); };
if (m_diagnosticConfig.isClazyEnabled()) if (m_diagnosticConfig.isClazyEnabled())
creators << [this]() { return createRunner<ClazyStandaloneRunner>(); }; creators << [this] { return createRunner<ClazyStandaloneRunner>(); };
return creators; return creators;
} }

View File

@@ -512,7 +512,7 @@ DiagnosticFilterModel::DiagnosticFilterModel(QObject *parent)
if (!m_project && project->projectDirectory() == m_lastProjectDirectory) if (!m_project && project->projectDirectory() == m_lastProjectDirectory)
setProject(project); setProject(project);
}); });
connect(this, &QAbstractItemModel::modelReset, this, [this]() { connect(this, &QAbstractItemModel::modelReset, this, [this] {
reset(); reset();
emit fixitCountersChanged(m_fixitsScheduled, m_fixitsScheduable); emit fixitCountersChanged(m_fixitsScheduled, m_fixitsScheduable);
}); });

View File

@@ -86,9 +86,7 @@ public:
bool wait() bool wait()
{ {
return processEventsUntil([this]() { return processEventsUntil([this] { return m_projectsToWaitFor.isEmpty(); });
return m_projectsToWaitFor.isEmpty();
});
} }
private: private:

View File

@@ -122,7 +122,7 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
&ClangToolsSettings::changed, &ClangToolsSettings::changed,
this, this,
QOverload<>::of(&ClangToolsProjectSettingsWidget::onGlobalCustomChanged)); QOverload<>::of(&ClangToolsProjectSettingsWidget::onGlobalCustomChanged));
connect(m_restoreGlobal, &QPushButton::clicked, this, [this]() { connect(m_restoreGlobal, &QPushButton::clicked, this, [this] {
m_runSettingsWidget->fromSettings(ClangToolsSettings::instance()->runSettings()); m_runSettingsWidget->fromSettings(ClangToolsSettings::instance()->runSettings());
}); });
@@ -131,7 +131,7 @@ ClangToolsProjectSettingsWidget::ClangToolsProjectSettingsWidget(ProjectExplorer
}); });
// Run options // Run options
connect(m_runSettingsWidget, &RunSettingsWidget::changed, this, [this]() { connect(m_runSettingsWidget, &RunSettingsWidget::changed, this, [this] {
// Save project run settings // Save project run settings
m_projectSettings->setRunSettings(m_runSettingsWidget->toSettings()); m_projectSettings->setRunSettings(m_runSettingsWidget->toSettings());

View File

@@ -845,7 +845,7 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c
auto topicsModel = new QStringListModel(Utils::toList(m_clazyTreeModel->topics()), this); auto topicsModel = new QStringListModel(Utils::toList(m_clazyTreeModel->topics()), this);
topicsModel->sort(0); topicsModel->sort(0);
m_clazyChecks->topicsView->setModel(topicsModel); m_clazyChecks->topicsView->setModel(topicsModel);
connect(m_clazyChecks->topicsResetButton, &QPushButton::clicked, [this](){ connect(m_clazyChecks->topicsResetButton, &QPushButton::clicked, this, [this] {
m_clazyChecks->topicsView->clearSelection(); m_clazyChecks->topicsView->clearSelection();
}); });
m_clazyChecks->topicsView->setSelectionMode(QAbstractItemView::MultiSelection); m_clazyChecks->topicsView->setSelectionMode(QAbstractItemView::MultiSelection);
@@ -920,7 +920,7 @@ DiagnosticConfigsWidget::DiagnosticConfigsWidget(const ClangDiagnosticConfigs &c
openUrl(m_tidyTreeModel.get(), index); openUrl(m_tidyTreeModel.get(), index);
}); });
connect(m_tidyChecks->plainTextEditButton, &QPushButton::clicked, this, [this]() { connect(m_tidyChecks->plainTextEditButton, &QPushButton::clicked, this, [this] {
const bool readOnly = currentConfig().isReadOnly(); const bool readOnly = currentConfig().isReadOnly();
QDialog dialog; QDialog dialog;
@@ -1055,20 +1055,16 @@ void DiagnosticConfigsWidget::syncExtraWidgets(const ClangDiagnosticConfig &conf
void DiagnosticConfigsWidget::connectClangTidyItemChanged() void DiagnosticConfigsWidget::connectClangTidyItemChanged()
{ {
connect(m_tidyChecks->tidyMode, connect(m_tidyChecks->tidyMode, &QComboBox::currentIndexChanged,
QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DiagnosticConfigsWidget::onClangTidyModeChanged);
this,
&DiagnosticConfigsWidget::onClangTidyModeChanged);
connect(m_tidyTreeModel.get(), &TidyChecksTreeModel::dataChanged, connect(m_tidyTreeModel.get(), &TidyChecksTreeModel::dataChanged,
this, &DiagnosticConfigsWidget::onClangTidyTreeChanged); this, &DiagnosticConfigsWidget::onClangTidyTreeChanged);
} }
void DiagnosticConfigsWidget::disconnectClangTidyItemChanged() void DiagnosticConfigsWidget::disconnectClangTidyItemChanged()
{ {
disconnect(m_tidyChecks->tidyMode, disconnect(m_tidyChecks->tidyMode, &QComboBox::currentIndexChanged,
QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DiagnosticConfigsWidget::onClangTidyModeChanged);
this,
&DiagnosticConfigsWidget::onClangTidyModeChanged);
disconnect(m_tidyTreeModel.get(), &TidyChecksTreeModel::dataChanged, disconnect(m_tidyTreeModel.get(), &TidyChecksTreeModel::dataChanged,
this, &DiagnosticConfigsWidget::onClangTidyTreeChanged); this, &DiagnosticConfigsWidget::onClangTidyTreeChanged);
} }

View File

@@ -103,7 +103,7 @@ FilterDialog::FilterDialog(const Checks &checks, QWidget *parent)
// Buttons // Buttons
connect(m_ui->selectNone, &QPushButton::clicked, m_ui->view, &QTreeView::clearSelection); connect(m_ui->selectNone, &QPushButton::clicked, m_ui->view, &QTreeView::clearSelection);
connect(m_ui->selectAll, &QPushButton::clicked, m_ui->view, &QTreeView::selectAll); connect(m_ui->selectAll, &QPushButton::clicked, m_ui->view, &QTreeView::selectAll);
connect(m_ui->selectWithFixits, &QPushButton::clicked, m_ui->view, [this](){ connect(m_ui->selectWithFixits, &QPushButton::clicked, m_ui->view, [this] {
m_ui->view->clearSelection(); m_ui->view->clearSelection();
m_model->forItemsAtLevel<1>([&](CheckItem *item) { m_model->forItemsAtLevel<1>([&](CheckItem *item) {
if (item->check.hasFixit) if (item->check.hasFixit)

View File

@@ -109,9 +109,7 @@ void RunSettingsWidget::fromSettings(const RunSettings &s)
m_ui->parallelJobsSpinBox->setValue(s.parallelJobs()); m_ui->parallelJobsSpinBox->setValue(s.parallelJobs());
m_ui->parallelJobsSpinBox->setMinimum(1); m_ui->parallelJobsSpinBox->setMinimum(1);
m_ui->parallelJobsSpinBox->setMaximum(QThread::idealThreadCount()); m_ui->parallelJobsSpinBox->setMaximum(QThread::idealThreadCount());
connect(m_ui->parallelJobsSpinBox, connect(m_ui->parallelJobsSpinBox, &QSpinBox::valueChanged, this, &RunSettingsWidget::changed);
QOverload<int>::of(&QSpinBox::valueChanged),
[this](int) { emit changed(); });
m_ui->analyzeOpenFiles->setChecked(s.analyzeOpenFiles()); m_ui->analyzeOpenFiles->setChecked(s.analyzeOpenFiles());
connect(m_ui->analyzeOpenFiles, &QCheckBox::toggled, this, &RunSettingsWidget::changed); connect(m_ui->analyzeOpenFiles, &QCheckBox::toggled, this, &RunSettingsWidget::changed);

View File

@@ -124,7 +124,7 @@ QbsProfileManager::QbsProfileManager() : m_defaultPropertyProvider(new DefaultPr
setObjectName(QLatin1String("QbsProjectManager")); setObjectName(QLatin1String("QbsProjectManager"));
connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitsLoaded, this, connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitsLoaded, this,
[this]() { m_kitsToBeSetupForQbs = ProjectExplorer::KitManager::kits(); } ); [this] { m_kitsToBeSetupForQbs = ProjectExplorer::KitManager::kits(); } );
connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitAdded, this, connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitAdded, this,
&QbsProfileManager::addProfileFromKit); &QbsProfileManager::addProfileFromKit);
connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitUpdated, this, connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitUpdated, this,

View File

@@ -181,8 +181,7 @@ void QbsProfilesSettingsWidget::refreshKitsList()
else if (hasKits) else if (hasKits)
m_ui.kitsComboBox->setCurrentIndex(0); m_ui.kitsComboBox->setCurrentIndex(0);
displayCurrentProfile(); displayCurrentProfile();
connect(m_ui.kitsComboBox, connect(m_ui.kitsComboBox, &QComboBox::currentIndexChanged,
QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &QbsProfilesSettingsWidget::displayCurrentProfile); this, &QbsProfilesSettingsWidget::displayCurrentProfile);
} }

View File

@@ -984,8 +984,7 @@ InternalLibraryDetailsController::InternalLibraryDetailsController(Ui::LibraryDe
if (HostOsInfo::isWindowsHost()) if (HostOsInfo::isWindowsHost())
libraryDetailsWidget()->useSubfoldersCheckBox->setEnabled(true); libraryDetailsWidget()->useSubfoldersCheckBox->setEnabled(true);
connect(libraryDetailsWidget()->libraryComboBox, connect(libraryDetailsWidget()->libraryComboBox, &QComboBox::currentIndexChanged,
QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &InternalLibraryDetailsController::slotCurrentLibraryChanged); this, &InternalLibraryDetailsController::slotCurrentLibraryChanged);
updateProFile(); updateProFile();

View File

@@ -307,7 +307,7 @@ public:
ExampleSetModel *exampleSetModel = m_examplesModel->exampleSetModel(); ExampleSetModel *exampleSetModel = m_examplesModel->exampleSetModel();
exampleSetSelector->setModel(exampleSetModel); exampleSetSelector->setModel(exampleSetModel);
exampleSetSelector->setCurrentIndex(exampleSetModel->selectedExampleSet()); exampleSetSelector->setCurrentIndex(exampleSetModel->selectedExampleSet());
connect(exampleSetSelector, QOverload<int>::of(&QComboBox::activated), connect(exampleSetSelector, &QComboBox::activated,
exampleSetModel, &ExampleSetModel::selectExampleSet); exampleSetModel, &ExampleSetModel::selectExampleSet);
connect(exampleSetModel, &ExampleSetModel::selectedExampleSetChanged, connect(exampleSetModel, &ExampleSetModel::selectedExampleSetChanged,
exampleSetSelector, &QComboBox::setCurrentIndex); exampleSetSelector, &QComboBox::setCurrentIndex);

View File

@@ -67,9 +67,8 @@ public:
refresh(); refresh();
m_combo->setToolTip(ki->description()); m_combo->setToolTip(ki->description());
connect(m_combo, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_combo, &QComboBox::currentIndexChanged,
this, &QtKitAspectWidget::currentWasChanged); this, &QtKitAspectWidget::currentWasChanged);
connect(QtVersionManager::instance(), &QtVersionManager::qtVersionsChanged, connect(QtVersionManager::instance(), &QtVersionManager::qtVersionsChanged,
this, &QtKitAspectWidget::versionsChanged); this, &QtKitAspectWidget::versionsChanged);
} }

View File

@@ -119,7 +119,7 @@ TranslationWizardPage::TranslationWizardPage(const QString &enabledExpr)
fileNameLayout->addWidget(&m_fileNameLineEdit); fileNameLayout->addWidget(&m_fileNameLineEdit);
fileNameLayout->addStretch(1); fileNameLayout->addStretch(1);
formLayout->addRow(tr("Translation file:"), fileNameLayout); formLayout->addRow(tr("Translation file:"), fileNameLayout);
connect(&m_languageComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(&m_languageComboBox, &QComboBox::currentIndexChanged,
this, &TranslationWizardPage::updateLineEdit); this, &TranslationWizardPage::updateLineEdit);
} }

View File

@@ -433,7 +433,7 @@ CallgrindToolPrivate::CallgrindToolPrivate()
// event selection // event selection
m_eventCombo = new QComboBox; m_eventCombo = new QComboBox;
m_eventCombo->setToolTip(Tr::tr("Selects which events from the profiling data are shown and visualized.")); m_eventCombo->setToolTip(Tr::tr("Selects which events from the profiling data are shown and visualized."));
connect(m_eventCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_eventCombo, &QComboBox::currentIndexChanged,
this, &CallgrindToolPrivate::setCostEvent); this, &CallgrindToolPrivate::setCostEvent);
updateEventCombo(); updateEventCombo();

View File

@@ -1237,8 +1237,7 @@ HeobDialog::HeobDialog(QWidget *parent) :
QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(1); sizePolicy.setHorizontalStretch(1);
m_profilesCombo->setSizePolicy(sizePolicy); m_profilesCombo->setSizePolicy(sizePolicy);
connect(m_profilesCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_profilesCombo, &QComboBox::currentIndexChanged, this, &HeobDialog::updateProfile);
this, &HeobDialog::updateProfile);
profilesLayout->addWidget(m_profilesCombo); profilesLayout->addWidget(m_profilesCombo);
auto profileNewButton = new QPushButton(tr("New")); auto profileNewButton = new QPushButton(tr("New"));
connect(profileNewButton, &QAbstractButton::clicked, this, &HeobDialog::newProfileDialog); connect(profileNewButton, &QAbstractButton::clicked, this, &HeobDialog::newProfileDialog);
@@ -1262,7 +1261,7 @@ HeobDialog::HeobDialog(QWidget *parent) :
m_handleExceptionCombo->addItem(tr("Off")); m_handleExceptionCombo->addItem(tr("Off"));
m_handleExceptionCombo->addItem(tr("On")); m_handleExceptionCombo->addItem(tr("On"));
m_handleExceptionCombo->addItem(tr("Only")); m_handleExceptionCombo->addItem(tr("Only"));
connect(m_handleExceptionCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_handleExceptionCombo, &QComboBox::currentIndexChanged,
this, &HeobDialog::updateEnabled); this, &HeobDialog::updateEnabled);
handleExceptionLayout->addWidget(m_handleExceptionCombo); handleExceptionLayout->addWidget(m_handleExceptionCombo);
layout->addLayout(handleExceptionLayout); layout->addLayout(handleExceptionLayout);
@@ -1274,7 +1273,7 @@ HeobDialog::HeobDialog(QWidget *parent) :
m_pageProtectionCombo->addItem(tr("Off")); m_pageProtectionCombo->addItem(tr("Off"));
m_pageProtectionCombo->addItem(tr("After")); m_pageProtectionCombo->addItem(tr("After"));
m_pageProtectionCombo->addItem(tr("Before")); m_pageProtectionCombo->addItem(tr("Before"));
connect(m_pageProtectionCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_pageProtectionCombo, &QComboBox::currentIndexChanged,
this, &HeobDialog::updateEnabled); this, &HeobDialog::updateEnabled);
pageProtectionLayout->addWidget(m_pageProtectionCombo); pageProtectionLayout->addWidget(m_pageProtectionCombo);
layout->addLayout(pageProtectionLayout); layout->addLayout(pageProtectionLayout);
@@ -1295,8 +1294,7 @@ HeobDialog::HeobDialog(QWidget *parent) :
m_leakDetailCombo->addItem(tr("Detect Leak Types (Show Reachable)")); m_leakDetailCombo->addItem(tr("Detect Leak Types (Show Reachable)"));
m_leakDetailCombo->addItem(tr("Fuzzy Detect Leak Types")); m_leakDetailCombo->addItem(tr("Fuzzy Detect Leak Types"));
m_leakDetailCombo->addItem(tr("Fuzzy Detect Leak Types (Show Reachable)")); m_leakDetailCombo->addItem(tr("Fuzzy Detect Leak Types (Show Reachable)"));
connect(m_leakDetailCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), connect(m_leakDetailCombo, &QComboBox::currentIndexChanged, this, &HeobDialog::updateEnabled);
this, &HeobDialog::updateEnabled);
leakDetailLayout->addWidget(m_leakDetailCombo); leakDetailLayout->addWidget(m_leakDetailCombo);
layout->addLayout(leakDetailLayout); layout->addLayout(leakDetailLayout);