Commit afafbc19 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use qOverload directly (scripted)

parent 1853009a
Pipeline #77323 passed with stage
in 7 minutes and 26 seconds
......@@ -320,7 +320,7 @@ void RichTextComposerActions::createActions(KActionCollection *ac)
ac->addAction(QStringLiteral("format_list_style"), d->action_list_style);
}
connect(d->action_list_style, &KSelectAction::indexTriggered, this, &RichTextComposerActions::setListStyle);
connect(d->action_list_style, QOverload<bool>::of(&QAction::triggered), this, &RichTextComposerActions::slotUpdateMiscActions);
connect(d->action_list_style, qOverload<bool>(&QAction::triggered), this, &RichTextComposerActions::slotUpdateMiscActions);
d->action_paste_quotation = new QAction(i18n("Pa&ste as Quotation"), this);
d->action_paste_quotation->setObjectName(QStringLiteral("paste_quoted"));
if (ac) {
......
......@@ -110,7 +110,7 @@ void RichTextExternalComposer::startExternalEditor()
(*d->externalEditorProcess) << d->extEditorTempFile->fileName();
}
connect(d->externalEditorProcess, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), this, &RichTextExternalComposer::slotEditorFinished);
connect(d->externalEditorProcess, qOverload<int, QProcess::ExitStatus>(&KProcess::finished), this, &RichTextExternalComposer::slotEditorFinished);
d->externalEditorProcess->start();
if (!d->externalEditorProcess->waitForStarted()) {
d->cannotStartProcess(commandLine);
......
......@@ -81,7 +81,7 @@ public:
width->setEnabled(false);
width->setSuffix(i18n(" px"));
lab->setBuddy(width);
q->connect(width, QOverload<int>::of(&QSpinBox::valueChanged), q, [this](int val) {
q->connect(width, qOverload<int>(&QSpinBox::valueChanged), q, [this](int val) {
_k_slotImageWidthChanged(val);
});
hbox->addWidget(lab);
......@@ -96,7 +96,7 @@ public:
height->setEnabled(false);
height->setSuffix(i18n(" px"));
lab->setBuddy(height);
q->connect(height, QOverload<int>::of(&QSpinBox::valueChanged), q, [this](int val) {
q->connect(height, qOverload<int>(&QSpinBox::valueChanged), q, [this](int val) {
_k_slotImageHeightChanged(val);
});
hbox->addWidget(lab);
......
......@@ -47,7 +47,7 @@ public:
gridLayout->addWidget(mBorder, 2, 1);
mTypeOfLength = new QComboBox;
q->connect(mTypeOfLength, QOverload<int>::of(&QComboBox::activated), q, &InsertTableWidget::slotTypeOfLengthChanged);
q->connect(mTypeOfLength, qOverload<int>(&QComboBox::activated), q, &InsertTableWidget::slotTypeOfLengthChanged);
// xgettext: no-c-format
mTypeOfLength->addItem(i18n("% of windows"), QTextLength::PercentageLength);
mTypeOfLength->addItem(i18n("pixels"), QTextLength::FixedLength);
......
......@@ -55,7 +55,7 @@ void TextEditorCompleter::TextEditorCompleterPrivate::createCompleter()
completer->setModelSorting(QCompleter::CaseSensitivelySortedModel);
completer->setCaseSensitivity(Qt::CaseInsensitive);
completer->setCompletionMode(QCompleter::PopupCompletion);
connect(completer, QOverload<const QString &>::of(&QCompleter::activated), q, &TextEditorCompleter::slotCompletion);
connect(completer, qOverload<const QString &>(&QCompleter::activated), q, &TextEditorCompleter::slotCompletion);
}
QString TextEditorCompleter::TextEditorCompleterPrivate::wordUnderCursor() const
......
......@@ -51,19 +51,19 @@ TextToSpeechConfigWidget::TextToSpeechConfigWidget(QWidget *parent)
mAvailableEngine = new QComboBox(this);
mAvailableEngine->setObjectName(QStringLiteral("engine"));
layout->addRow(i18n("Engine:"), mAvailableEngine);
connect(mAvailableEngine, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::slotEngineChanged);
connect(mAvailableEngine, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::valueChanged);
connect(mAvailableEngine, qOverload<int>(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::slotEngineChanged);
connect(mAvailableEngine, qOverload<int>(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::valueChanged);
mLanguage = new KPIMTextEdit::TextToSpeechLanguageComboBox(this);
mLanguage->setObjectName(QStringLiteral("language"));
layout->addRow(i18n("Language:"), mLanguage);
connect(mAvailableEngine, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::slotLanguageChanged);
connect(mLanguage, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::valueChanged);
connect(mAvailableEngine, qOverload<int>(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::slotLanguageChanged);
connect(mLanguage, qOverload<int>(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::valueChanged);
mVoice = new QComboBox(this);
mVoice->setObjectName(QStringLiteral("voice"));
layout->addRow(i18n("Voice:"), mVoice);
connect(mVoice, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::valueChanged);
connect(mVoice, qOverload<int>(&QComboBox::currentIndexChanged), this, &TextToSpeechConfigWidget::valueChanged);
QTimer::singleShot(0, this, &TextToSpeechConfigWidget::slotUpdateSettings);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment