forked from qt-creator/qt-creator
Drop Qt5: Various plugins: Get rid of QOverload
Change-Id: I4913044f8897fd3449dbb537e4af6785eb3ad447 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -104,8 +104,7 @@ ProjectTestSettingsWidget::ProjectTestSettingsWidget(ProjectExplorer::Project *p
|
||||
|
||||
connect(m_activeFrameworks, &QTreeWidget::itemChanged,
|
||||
this, &ProjectTestSettingsWidget::onActiveFrameworkChanged);
|
||||
connect(m_runAfterBuild, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this](int index) {
|
||||
connect(m_runAfterBuild, &QComboBox::currentIndexChanged, this, [this](int index) {
|
||||
m_projectSettings->setRunAfterBuild(RunAfterBuildMode(index));
|
||||
});
|
||||
m_syncTimer.setSingleShot(true);
|
||||
|
@@ -40,7 +40,7 @@ ConfigurationPanel::ConfigurationPanel(QWidget *parent) :
|
||||
connect(ui->add, &QPushButton::clicked, this, &ConfigurationPanel::add);
|
||||
connect(ui->edit, &QPushButton::clicked, this, &ConfigurationPanel::edit);
|
||||
connect(ui->remove, &QPushButton::clicked, this, &ConfigurationPanel::remove);
|
||||
connect(ui->configurations, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(ui->configurations, &QComboBox::currentIndexChanged,
|
||||
this, &ConfigurationPanel::updateButtons);
|
||||
}
|
||||
|
||||
|
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
updateComboBox();
|
||||
refresh();
|
||||
connect(m_comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_comboBox, &QComboBox::currentIndexChanged,
|
||||
this, &CMakeKitAspectWidget::currentCMakeToolChanged);
|
||||
|
||||
CMakeToolManager *cmakeMgr = CMakeToolManager::instance();
|
||||
|
@@ -44,7 +44,7 @@ PasteSelectDialog::PasteSelectDialog(const QList<Protocol*> &protocols,
|
||||
m_ui.protocolBox->addItem(protocol->name());
|
||||
connect(protocol, &Protocol::listDone, this, &PasteSelectDialog::listDone);
|
||||
}
|
||||
connect(m_ui.protocolBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui.protocolBox, &QComboBox::currentIndexChanged,
|
||||
this, &PasteSelectDialog::protocolChanged);
|
||||
|
||||
m_refreshButton = m_ui.buttons->addButton(tr("Refresh"), QDialogButtonBox::ActionRole);
|
||||
|
@@ -53,8 +53,7 @@ PasteView::PasteView(const QList<Protocol *> &protocols,
|
||||
|
||||
foreach (const Protocol *p, protocols)
|
||||
m_ui.protocolBox->addItem(p->name());
|
||||
connect(m_ui.protocolBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &PasteView::protocolChanged);
|
||||
connect(m_ui.protocolBox, &QComboBox::currentIndexChanged, this, &PasteView::protocolChanged);
|
||||
}
|
||||
|
||||
PasteView::~PasteView() = default;
|
||||
|
@@ -82,8 +82,7 @@ NewClassWidget::NewClassWidget(QWidget *parent) :
|
||||
this, &NewClassWidget::slotUpdateFileNames);
|
||||
connect(d->m_ui.classLineEdit, &QLineEdit::textEdited,
|
||||
this, &NewClassWidget::classNameEdited);
|
||||
connect(d->m_ui.baseClassComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(d->m_ui.baseClassComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &NewClassWidget::suggestClassNameFromBase);
|
||||
connect(d->m_ui.baseClassComboBox, &QComboBox::editTextChanged,
|
||||
this, &NewClassWidget::slotValidChanged);
|
||||
|
@@ -193,7 +193,7 @@ DiffEditor::DiffEditor()
|
||||
QSizePolicy policy = m_entriesComboBox->sizePolicy();
|
||||
policy.setHorizontalPolicy(QSizePolicy::Expanding);
|
||||
m_entriesComboBox->setSizePolicy(policy);
|
||||
connect(m_entriesComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_entriesComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &DiffEditor::setCurrentDiffFileIndex);
|
||||
m_toolBar->addWidget(m_entriesComboBox);
|
||||
|
||||
@@ -222,8 +222,9 @@ DiffEditor::DiffEditor()
|
||||
|
||||
m_viewSwitcherAction = m_toolBar->addAction(QIcon(), QString());
|
||||
|
||||
connect(m_whitespaceButtonAction, &QAction::toggled, this, &DiffEditor::ignoreWhitespaceHasChanged);
|
||||
connect(m_contextSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||
connect(m_whitespaceButtonAction, &QAction::toggled,
|
||||
this, &DiffEditor::ignoreWhitespaceHasChanged);
|
||||
connect(m_contextSpinBox, &QSpinBox::valueChanged,
|
||||
this, &DiffEditor::contextLineCountHasChanged);
|
||||
connect(m_toggleSyncAction, &QAction::toggled, this, &DiffEditor::toggleSync);
|
||||
connect(m_toggleDescriptionAction, &QAction::toggled, this, &DiffEditor::toggleDescription);
|
||||
|
@@ -209,8 +209,7 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device)
|
||||
if (index == 1)
|
||||
searchDirsLineEdit->setFocus();
|
||||
};
|
||||
QObject::connect(searchDirsComboBox, qOverload<int>(&QComboBox::activated),
|
||||
this, updateDirectoriesLineEdit);
|
||||
QObject::connect(searchDirsComboBox, &QComboBox::activated, this, updateDirectoriesLineEdit);
|
||||
}
|
||||
|
||||
void DockerDeviceWidget::updateDaemonStateTexts()
|
||||
|
@@ -245,24 +245,23 @@ QWidget *GeneralSettingsPage::widget()
|
||||
updateFontStyleSelector();
|
||||
updateFontFamilySelector();
|
||||
|
||||
connect(m_widget->familyComboBox, &QFontComboBox::currentFontChanged, this, [this]() {
|
||||
connect(m_widget->familyComboBox, &QFontComboBox::currentFontChanged, this, [this] {
|
||||
updateFont();
|
||||
updateFontStyleSelector();
|
||||
updateFontSizeSelector();
|
||||
updateFont(); // changes that might have happened when updating the selectors
|
||||
});
|
||||
|
||||
connect(m_widget->styleComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() {
|
||||
connect(m_widget->styleComboBox, &QComboBox::currentIndexChanged, this, [this] {
|
||||
updateFont();
|
||||
updateFontSizeSelector();
|
||||
updateFont(); // changes that might have happened when updating the selectors
|
||||
});
|
||||
|
||||
connect(m_widget->sizeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_widget->sizeComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &GeneralSettingsPage::updateFont);
|
||||
|
||||
connect(m_widget->zoomSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||
connect(m_widget->zoomSpinBox, &QSpinBox::valueChanged,
|
||||
this, [this](int value) { m_fontZoom = value; });
|
||||
|
||||
m_homePage = LocalHelpManager::homePage();
|
||||
|
@@ -371,8 +371,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
|
||||
layout->addWidget(m_filterComboBox);
|
||||
connect(&LocalHelpManager::helpEngine(), &QHelpEngine::setupFinished,
|
||||
this, &HelpWidget::setupFilterCombo, Qt::QueuedConnection);
|
||||
connect(m_filterComboBox, QOverload<int>::of(&QComboBox::activated),
|
||||
this, &HelpWidget::filterDocumentation);
|
||||
connect(m_filterComboBox, &QComboBox::activated, this, &HelpWidget::filterDocumentation);
|
||||
connect(LocalHelpManager::filterEngine(), &QHelpFilterEngine::filterActivated,
|
||||
this, &HelpWidget::currentFilterChanged);
|
||||
|
||||
|
@@ -59,15 +59,10 @@ OpenPagesManager::OpenPagesManager(HelpWidget *helpWidget)
|
||||
m_comboBox = new QComboBox;
|
||||
m_comboBox->setModel(m_helpWidget->model());
|
||||
m_comboBox->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_comboBox,
|
||||
QOverload<int>::of(&QComboBox::activated),
|
||||
m_helpWidget,
|
||||
&HelpWidget::setCurrentIndex);
|
||||
connect(m_comboBox, &QComboBox::activated, m_helpWidget, &HelpWidget::setCurrentIndex);
|
||||
connect(m_helpWidget, &HelpWidget::currentIndexChanged, m_comboBox, &QComboBox::setCurrentIndex);
|
||||
connect(m_comboBox,
|
||||
&QWidget::customContextMenuRequested,
|
||||
this,
|
||||
&OpenPagesManager::openPagesContextMenu);
|
||||
connect(m_comboBox, &QWidget::customContextMenuRequested,
|
||||
this, &OpenPagesManager::openPagesContextMenu);
|
||||
|
||||
m_openPagesSwitcher = new OpenPagesSwitcher(m_helpWidget->model());
|
||||
connect(m_openPagesSwitcher, &OpenPagesSwitcher::closePage, this,
|
||||
|
@@ -92,15 +92,13 @@ ExportDialog::ExportDialog(QWidget *parent)
|
||||
auto sizeLayout = new QHBoxLayout;
|
||||
m_widthSpinBox->setMinimum(exportMinimumSize);
|
||||
m_widthSpinBox->setMaximum(exportMaximumSize);
|
||||
connect(m_widthSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||
this, &ExportDialog::exportWidthChanged);
|
||||
connect(m_widthSpinBox, &QSpinBox::valueChanged, this, &ExportDialog::exportWidthChanged);
|
||||
sizeLayout->addWidget(m_widthSpinBox);
|
||||
//: Multiplication, as in 32x32
|
||||
sizeLayout->addWidget(new QLabel(Tr::tr("x")));
|
||||
m_heightSpinBox->setMinimum(exportMinimumSize);
|
||||
m_heightSpinBox->setMaximum(exportMaximumSize);
|
||||
connect(m_heightSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||
this, &ExportDialog::exportHeightChanged);
|
||||
connect(m_heightSpinBox, &QSpinBox::valueChanged, this, &ExportDialog::exportHeightChanged);
|
||||
sizeLayout->addWidget(m_heightSpinBox);
|
||||
auto resetButton = new QToolButton(this);
|
||||
resetButton->setIcon(QIcon(":/qt-project.org/styles/commonstyle/images/refresh-32.png"));
|
||||
|
@@ -139,8 +139,7 @@ void CommandBuilderAspect::addToLayout(LayoutBuilder &builder)
|
||||
d->commandBuilder = new QComboBox;
|
||||
for (CommandBuilder *p : d->m_commandBuilders)
|
||||
d->commandBuilder->addItem(p->displayName());
|
||||
connect(d->commandBuilder, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this](int idx) {
|
||||
connect(d->commandBuilder, &QComboBox::currentIndexChanged, this, [this](int idx) {
|
||||
if (idx >= 0 && idx < int(sizeof(d->m_commandBuilders) / sizeof(d->m_commandBuilders[0])))
|
||||
d->m_activeCommandBuilder = d->m_commandBuilders[idx];
|
||||
updateGui();
|
||||
|
@@ -429,7 +429,7 @@ OutlineComboBox::OutlineComboBox(Client *client, TextEditor::BaseTextEditor *edi
|
||||
connect(client, &Client::documentUpdated, this, &OutlineComboBox::documentUpdated);
|
||||
connect(m_editorWidget, &TextEditor::TextEditorWidget::cursorPositionChanged,
|
||||
this, &OutlineComboBox::updateEntry);
|
||||
connect(this, QOverload<int>::of(&QComboBox::activated), this, &OutlineComboBox::activateEntry);
|
||||
connect(this, &QComboBox::activated, this, &OutlineComboBox::activateEntry);
|
||||
connect(sortAction, &QAction::toggled, this, &OutlineComboBox::setSorted);
|
||||
|
||||
documentUpdated(editor->textDocument());
|
||||
|
@@ -48,18 +48,12 @@ ToolKitAspectWidget::ToolKitAspectWidget(ProjectExplorer::Kit *kit,
|
||||
m_toolsComboBox->setToolTip(ki->description());
|
||||
loadTools();
|
||||
|
||||
connect(MesonTools::instance(),
|
||||
&MesonTools::toolAdded,
|
||||
this,
|
||||
&ToolKitAspectWidget::addTool);
|
||||
connect(MesonTools::instance(),
|
||||
&MesonTools::toolRemoved,
|
||||
this,
|
||||
&ToolKitAspectWidget::removeTool);
|
||||
connect(m_toolsComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
&ToolKitAspectWidget::setCurrentToolIndex);
|
||||
connect(MesonTools::instance(), &MesonTools::toolAdded,
|
||||
this, &ToolKitAspectWidget::addTool);
|
||||
connect(MesonTools::instance(), &MesonTools::toolRemoved,
|
||||
this, &ToolKitAspectWidget::removeTool);
|
||||
connect(m_toolsComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &ToolKitAspectWidget::setCurrentToolIndex);
|
||||
}
|
||||
|
||||
ToolKitAspectWidget::~ToolKitAspectWidget()
|
||||
|
@@ -321,7 +321,7 @@ void ModelEditor::init()
|
||||
toolbarLayout->addWidget(openParentButton);
|
||||
|
||||
d->diagramSelector = new QComboBox(d->toolbar);
|
||||
connect(d->diagramSelector, QOverload<int>::of(&QComboBox::activated),
|
||||
connect(d->diagramSelector, &QComboBox::activated,
|
||||
this, &ModelEditor::onDiagramSelectorSelected);
|
||||
toolbarLayout->addWidget(d->diagramSelector, 1);
|
||||
toolbarLayout->addStretch(1);
|
||||
|
@@ -120,8 +120,7 @@ QWidget *NimCompilerBuildStep::createConfigWidget()
|
||||
|
||||
connect(project(), &Project::fileListChanged, this, updateUi);
|
||||
|
||||
connect(targetComboBox, QOverload<int>::of(&QComboBox::activated),
|
||||
this, [this, targetComboBox, updateUi] {
|
||||
connect(targetComboBox, &QComboBox::activated, this, [this, targetComboBox, updateUi] {
|
||||
const QVariant data = targetComboBox->currentData();
|
||||
m_targetNimFile = FilePath::fromString(data.toString());
|
||||
updateUi();
|
||||
@@ -133,8 +132,7 @@ QWidget *NimCompilerBuildStep::createConfigWidget()
|
||||
updateUi();
|
||||
});
|
||||
|
||||
connect(defaultArgumentsComboBox, QOverload<int>::of(&QComboBox::activated),
|
||||
this, [this, updateUi](int index) {
|
||||
connect(defaultArgumentsComboBox, &QComboBox::activated, this, [this, updateUi](int index) {
|
||||
m_defaultOptions = static_cast<DefaultBuildOptions>(index);
|
||||
updateUi();
|
||||
});
|
||||
|
@@ -69,8 +69,7 @@ PerfDataReader::PerfDataReader(QObject *parent) :
|
||||
m_remoteProcessStart(std::numeric_limits<qint64>::max()),
|
||||
m_lastRemoteTimestamp(0)
|
||||
{
|
||||
connect(&m_input, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
this, [this](int exitCode) {
|
||||
connect(&m_input, &QProcess::finished, this, [this](int exitCode) {
|
||||
emit processFinished();
|
||||
// process any remaining input before signaling finished()
|
||||
readFromDevice();
|
||||
|
@@ -165,7 +165,7 @@ QnxSettingsWidget::QnxSettingsWidget() :
|
||||
this, &QnxSettingsWidget::addConfiguration);
|
||||
connect(m_removeButton, &QAbstractButton::clicked,
|
||||
this, &QnxSettingsWidget::removeConfiguration);
|
||||
connect(m_configsCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_configsCombo, &QComboBox::currentIndexChanged,
|
||||
this, &QnxSettingsWidget::updateInformation);
|
||||
connect(m_generateKitsCheckBox, &QAbstractButton::toggled,
|
||||
this, &QnxSettingsWidget::generateKits);
|
||||
|
@@ -39,9 +39,10 @@ ColorSettings::ColorSettings(QWidget *parent)
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.m_colorThemeView->setEnabled(false);
|
||||
connect(m_ui.m_comboColorThemes, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui.m_comboColorThemes, &QComboBox::currentIndexChanged,
|
||||
this, &ColorSettings::selectTheme);
|
||||
connect(m_ui.m_colorThemeView, &ColorThemeView::colorChanged, this, &ColorSettings::updateCurrentColors);
|
||||
connect(m_ui.m_colorThemeView, &ColorThemeView::colorChanged,
|
||||
this, &ColorSettings::updateCurrentColors);
|
||||
connect(m_ui.m_addColorTheme, &QToolButton::clicked, this, &ColorSettings::createTheme);
|
||||
connect(m_ui.m_removeColorTheme, &QToolButton::clicked, this, &ColorSettings::removeTheme);
|
||||
|
||||
|
@@ -169,7 +169,7 @@ SerialOutputPane::SerialOutputPane(Settings &settings) :
|
||||
updateLineEndingsComboBox();
|
||||
inputLayout->addWidget(m_lineEndingsSelection);
|
||||
|
||||
connect(m_lineEndingsSelection, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_lineEndingsSelection, &QComboBox::currentIndexChanged,
|
||||
this, &SerialOutputPane::defaultLineEndingChanged);
|
||||
|
||||
layout->addLayout(inputLayout);
|
||||
@@ -383,7 +383,7 @@ void SerialOutputPane::createToolButtons()
|
||||
m_portsSelection->setModel(m_devicesModel);
|
||||
updatePortsList();
|
||||
connect(m_portsSelection, &ComboBox::opened, this, &SerialOutputPane::updatePortsList);
|
||||
connect(m_portsSelection, QOverload<int>::of(&ComboBox::currentIndexChanged),
|
||||
connect(m_portsSelection, &ComboBox::currentIndexChanged,
|
||||
this, &SerialOutputPane::activePortNameChanged);
|
||||
// TODO: the ports are not updated with the box opened (if the user wait for it) -> add a timer?
|
||||
|
||||
@@ -392,7 +392,7 @@ void SerialOutputPane::createToolButtons()
|
||||
m_baudRateSelection = new ComboBox;
|
||||
m_baudRateSelection->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
m_baudRateSelection->addItems(m_devicesModel->baudRates());
|
||||
connect(m_baudRateSelection, QOverload<int>::of(&ComboBox::currentIndexChanged),
|
||||
connect(m_baudRateSelection, &ComboBox::currentIndexChanged,
|
||||
this, &SerialOutputPane::activeBaudRateChanged);
|
||||
|
||||
if (m_settings.baudRate > 0)
|
||||
|
@@ -268,7 +268,7 @@ void TodoOutputPane::createScopeButtons()
|
||||
m_scopeButtons->addButton(m_wholeProjectButton);
|
||||
m_scopeButtons->addButton(m_currentFileButton);
|
||||
m_scopeButtons->addButton(m_subProjectButton);
|
||||
connect(m_scopeButtons, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
|
||||
connect(m_scopeButtons, &QButtonGroup::buttonClicked,
|
||||
this, &TodoOutputPane::scopeButtonClicked);
|
||||
|
||||
m_spacer = new QWidget;
|
||||
|
@@ -128,8 +128,7 @@ public:
|
||||
|
||||
connect(m_checkNowButton, &QPushButton::clicked,
|
||||
m_plugin, &UpdateInfoPlugin::startCheckForUpdates);
|
||||
connect(m_checkIntervalComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_checkIntervalComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &UpdateInfoSettingsPageWidget::updateNextCheckDate);
|
||||
connect(m_plugin, &UpdateInfoPlugin::lastCheckDateChanged,
|
||||
this, &UpdateInfoSettingsPageWidget::updateLastCheckDate);
|
||||
|
@@ -95,7 +95,7 @@ BookmarkDialog::BookmarkDialog(BookmarkManager *manager, const QString &title,
|
||||
&QStandardItemModel::itemChanged,
|
||||
this, &BookmarkDialog::itemChanged);
|
||||
|
||||
connect(ui.bookmarkFolders, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(ui.bookmarkFolders, &QComboBox::currentIndexChanged,
|
||||
this, &BookmarkDialog::selectBookmarkFolder);
|
||||
|
||||
connect(ui.treeView, &TreeView::customContextMenuRequested,
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
BacktraceCollector::BacktraceCollector(QObject *parent) :
|
||||
QObject(parent), d(new BacktraceCollectorPrivate)
|
||||
{
|
||||
connect(&d->debugger, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
connect(&d->debugger, &QProcess::finished,
|
||||
this, &BacktraceCollector::onDebuggerFinished);
|
||||
connect(&d->debugger, &QProcess::errorOccurred,
|
||||
this, &BacktraceCollector::onDebuggerError);
|
||||
|
Reference in New Issue
Block a user