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

Use qOverload directly (scripted)

parent 5eb742e1
Pipeline #77325 passed with stage
in 16 minutes and 24 seconds
......@@ -65,7 +65,7 @@ void SessionThread::doInit()
Q_ASSERT(QThread::currentThread() == thread());
m_socket = std::make_unique<QSslSocket>();
connect(m_socket.get(), &QSslSocket::readyRead, this, &SessionThread::slotDataReceived);
connect(m_socket.get(), QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::errorOccurred), this, &SessionThread::slotSocketError);
connect(m_socket.get(), qOverload<QAbstractSocket::SocketError>(&QAbstractSocket::errorOccurred), this, &SessionThread::slotSocketError);
connect(m_socket.get(), &QSslSocket::disconnected, this, &SessionThread::socketDisconnected);
connect(m_socket.get(), &QSslSocket::connected, this, &SessionThread::socketConnected);
}
......
......@@ -64,7 +64,7 @@ void SelectConvertParameterWidget::initialize()
mWidth->setMaximum(9999);
mWidth->setValue(300);
hbox->addWidget(mWidth);
connect(mWidth, QOverload<int>::of(&QSpinBox::valueChanged), this, &SelectConvertParameterWidget::valueChanged);
connect(mWidth, qOverload<int>(&QSpinBox::valueChanged), this, &SelectConvertParameterWidget::valueChanged);
auto lab = new QLabel(QStringLiteral("x"), this);
hbox->addWidget(lab);
......@@ -76,5 +76,5 @@ void SelectConvertParameterWidget::initialize()
mHeight->setValue(200);
hbox->addWidget(mHeight);
connect(mHeight, QOverload<int>::of(&QSpinBox::valueChanged), this, &SelectConvertParameterWidget::valueChanged);
connect(mHeight, qOverload<int>(&QSpinBox::valueChanged), this, &SelectConvertParameterWidget::valueChanged);
}
......@@ -16,7 +16,7 @@ SelectMatchTypeComboBox::SelectMatchTypeComboBox(SieveEditorGraphicalModeWidget
{
mHasRegexCapability = sieveGraphicalModeWidget->sieveCapabilities().contains(QLatin1String("regex"));
initialize();
connect(this, QOverload<int>::of(&SelectMatchTypeComboBox::activated), this, &SelectMatchTypeComboBox::slotValueChanged);
connect(this, qOverload<int>(&SelectMatchTypeComboBox::activated), this, &SelectMatchTypeComboBox::slotValueChanged);
}
SelectMatchTypeComboBox::~SelectMatchTypeComboBox()
......
......@@ -14,7 +14,7 @@ SelectMimeTypeComboBox::SelectMimeTypeComboBox(QWidget *parent)
: QComboBox(parent)
{
initialize();
connect(this, QOverload<int>::of(&SelectMimeTypeComboBox::activated), this, &SelectMimeTypeComboBox::valueChanged);
connect(this, qOverload<int>(&SelectMimeTypeComboBox::activated), this, &SelectMimeTypeComboBox::valueChanged);
}
SelectMimeTypeComboBox::~SelectMimeTypeComboBox()
......
......@@ -37,7 +37,7 @@ QWidget *SieveActionExtractText::createParamWidget(QWidget *parent) const
nbCharacters->setMaximum(99999);
nbCharacters->setObjectName(QStringLiteral("numberOfCharacters"));
grid->addWidget(nbCharacters, 0, 1);
connect(nbCharacters, QOverload<int>::of(&QSpinBox::valueChanged), this, &SieveActionExtractText::valueChanged);
connect(nbCharacters, qOverload<int>(&QSpinBox::valueChanged), this, &SieveActionExtractText::valueChanged);
lab = new QLabel(i18n("Stored in variable name:"));
grid->addWidget(lab, 1, 0);
......
......@@ -51,7 +51,7 @@ QWidget *SieveActionVacation::createParamWidget(QWidget *parent) const
day->setMinimum(1);
day->setMaximum(999);
day->setObjectName(QStringLiteral("day"));
connect(day, QOverload<int>::of(&QSpinBox::valueChanged), this, &SieveActionVacation::valueChanged);
connect(day, qOverload<int>(&QSpinBox::valueChanged), this, &SieveActionVacation::valueChanged);
grid->addWidget(day, 0, 1);
lab = new QLabel(i18n("Message subject:"));
......
......@@ -13,7 +13,7 @@ SelectAddHeaderPositionCombobox::SelectAddHeaderPositionCombobox(QWidget *parent
: QComboBox(parent)
{
initialize();
connect(this, QOverload<int>::of(&SelectAddHeaderPositionCombobox::activated), this, &SelectAddHeaderPositionCombobox::valueChanged);
connect(this, qOverload<int>(&SelectAddHeaderPositionCombobox::activated), this, &SelectAddHeaderPositionCombobox::valueChanged);
}
SelectAddHeaderPositionCombobox::~SelectAddHeaderPositionCombobox()
......
......@@ -14,7 +14,7 @@ SelectImportanceCombobox::SelectImportanceCombobox(QWidget *parent)
: QComboBox(parent)
{
initialize();
connect(this, QOverload<int>::of(&SelectImportanceCombobox::activated), this, &SelectImportanceCombobox::valueChanged);
connect(this, qOverload<int>(&SelectImportanceCombobox::activated), this, &SelectImportanceCombobox::valueChanged);
}
SelectImportanceCombobox::~SelectImportanceCombobox()
......
......@@ -14,7 +14,7 @@ SelectVacationComboBox::SelectVacationComboBox(QWidget *parent)
: QComboBox(parent)
{
initialize();
connect(this, QOverload<int>::of(&SelectVacationComboBox::activated), this, &SelectVacationComboBox::valueChanged);
connect(this, qOverload<int>(&SelectVacationComboBox::activated), this, &SelectVacationComboBox::valueChanged);
}
SelectVacationComboBox::~SelectVacationComboBox()
......
......@@ -14,7 +14,7 @@ SelectVariableModifierComboBox::SelectVariableModifierComboBox(QWidget *parent)
: QComboBox(parent)
{
initialize();
connect(this, QOverload<int>::of(&SelectVariableModifierComboBox::activated), this, &SelectVariableModifierComboBox::valueChanged);
connect(this, qOverload<int>(&SelectVariableModifierComboBox::activated), this, &SelectVariableModifierComboBox::valueChanged);
}
SelectVariableModifierComboBox::~SelectVariableModifierComboBox()
......
......@@ -160,7 +160,7 @@ void SieveActionWidget::initWidget()
updateGeometry();
connect(mComboBox, QOverload<int>::of(&QComboBox::activated), this, &SieveActionWidget::slotActionChanged);
connect(mComboBox, qOverload<int>(&QComboBox::activated), this, &SieveActionWidget::slotActionChanged);
mAdd = new QPushButton(this);
mAdd->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
......
......@@ -35,7 +35,7 @@ QWidget *SieveConditionExists::createParamWidget(QWidget *parent) const
combo->addItem(i18n("exists"), QStringLiteral("exists"));
combo->addItem(i18n("not exists"), QStringLiteral("not exists"));
lay->addWidget(combo);
connect(combo, QOverload<int>::of(&QComboBox::activated), this, &SieveConditionExists::valueChanged);
connect(combo, qOverload<int>(&QComboBox::activated), this, &SieveConditionExists::valueChanged);
auto lab = new QLabel(i18n("headers:"));
lay->addWidget(lab);
......
......@@ -33,7 +33,7 @@ QWidget *SieveConditionSize::createParamWidget(QWidget *parent) const
combo->addItem(i18n("under"), QStringLiteral(":under"));
combo->addItem(i18n("over"), QStringLiteral(":over"));
lay->addWidget(combo);
connect(combo, QOverload<int>::of(&QComboBox::activated), this, &SieveConditionSize::valueChanged);
connect(combo, qOverload<int>(&QComboBox::activated), this, &SieveConditionSize::valueChanged);
auto sizeWidget = new SelectSizeWidget;
connect(sizeWidget, &SelectSizeWidget::valueChanged, this, &SieveConditionSize::valueChanged);
......
......@@ -54,7 +54,7 @@ QWidget *SieveConditionSpamTest::createParamWidget(QWidget *parent) const
spinbox->setMaximum(10);
spinbox->setMinimum(0);
spinbox->setObjectName(QStringLiteral("value"));
connect(spinbox, QOverload<int>::of(&QSpinBox::valueChanged), this, &SieveConditionSpamTest::valueChanged);
connect(spinbox, qOverload<int>(&QSpinBox::valueChanged), this, &SieveConditionSpamTest::valueChanged);
lay->addWidget(spinbox);
return w;
}
......
......@@ -44,7 +44,7 @@ QWidget *SieveConditionVirusTest::createParamWidget(QWidget *parent) const
spinbox->setMaximum(5);
spinbox->setMinimum(0);
spinbox->setObjectName(QStringLiteral("value"));
connect(spinbox, QOverload<int>::of(&QSpinBox::valueChanged), this, &SieveConditionVirusTest::valueChanged);
connect(spinbox, qOverload<int>(&QSpinBox::valueChanged), this, &SieveConditionVirusTest::valueChanged);
lay->addWidget(spinbox);
return w;
}
......
......@@ -16,7 +16,7 @@ SelectAddressPartComboBox::SelectAddressPartComboBox(SieveEditorGraphicalModeWid
{
mHasSubaddressCapability = sieveGraphicalModeWidget->sieveCapabilities().contains(QLatin1String("subaddress"));
initialize();
connect(this, QOverload<int>::of(&SelectAddressPartComboBox::activated), this, &SelectAddressPartComboBox::valueChanged);
connect(this, qOverload<int>(&SelectAddressPartComboBox::activated), this, &SelectAddressPartComboBox::valueChanged);
}
SelectAddressPartComboBox::~SelectAddressPartComboBox()
......
......@@ -35,7 +35,7 @@ void SelectBodyTypeWidget::initialize()
mBodyCombobox->addItem(i18n("raw"), QStringLiteral(":raw"));
mBodyCombobox->addItem(i18n("content"), QStringLiteral(":content"));
mBodyCombobox->addItem(i18n("text"), QStringLiteral(":text"));
connect(mBodyCombobox, QOverload<int>::of(&QComboBox::activated), this, &SelectBodyTypeWidget::slotBodyTypeChanged);
connect(mBodyCombobox, qOverload<int>(&QComboBox::activated), this, &SelectBodyTypeWidget::slotBodyTypeChanged);
mBodyLineEdit = new QLineEdit(this);
new KPIM::LineEditCatchReturnKey(mBodyLineEdit, this);
......
......@@ -11,7 +11,7 @@ using namespace KSieveUi;
SelectComparatorComboBox::SelectComparatorComboBox(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget, QWidget *parent)
: QComboBox(parent)
{
connect(this, QOverload<int>::of(&SelectComparatorComboBox::activated), this, &SelectComparatorComboBox::valueChanged);
connect(this, qOverload<int>(&SelectComparatorComboBox::activated), this, &SelectComparatorComboBox::valueChanged);
initialize(sieveGraphicalModeWidget->sieveCapabilities());
}
......
......@@ -36,7 +36,7 @@ void SelectDateWidget::initialize()
lay->setContentsMargins({});
mDateType = new QComboBox(this);
connect(mDateType, QOverload<int>::of(&QComboBox::activated), this, &SelectDateWidget::slotDateTypeActivated);
connect(mDateType, qOverload<int>(&QComboBox::activated), this, &SelectDateWidget::slotDateTypeActivated);
mDateType->addItem(i18n("Year"), QVariant::fromValue(KSieveUi::SelectDateWidget::Year));
mDateType->addItem(i18n("Month"), QVariant::fromValue(KSieveUi::SelectDateWidget::Month));
mDateType->addItem(i18n("Day"), QVariant::fromValue(KSieveUi::SelectDateWidget::Day));
......@@ -65,7 +65,7 @@ void SelectDateWidget::initialize()
mDateValue = new SieveDateSpinBox(this);
mStackWidget->addWidget(mDateValue);
connect(mDateValue, QOverload<int>::of(&QSpinBox::valueChanged), this, &SelectDateWidget::valueChanged);
connect(mDateValue, qOverload<int>(&QSpinBox::valueChanged), this, &SelectDateWidget::valueChanged);
mDateEdit = new KDateComboBox(this);
mStackWidget->addWidget(mDateEdit);
......
......@@ -201,7 +201,7 @@ SelectHeaderTypeComboBox::SelectHeaderTypeComboBox(bool onlyEnvelopType, QWidget
initialize(onlyEnvelopType);
connect(this, &SelectHeaderTypeComboBox::textActivated, this, &SelectHeaderTypeComboBox::slotSelectItem);
connect(this, &SelectHeaderTypeComboBox::editTextChanged, this, &SelectHeaderTypeComboBox::valueChanged);
connect(this, QOverload<int>::of(&SelectHeaderTypeComboBox::activated), this, &SelectHeaderTypeComboBox::valueChanged);
connect(this, qOverload<int>(&SelectHeaderTypeComboBox::activated), this, &SelectHeaderTypeComboBox::valueChanged);
}
SelectHeaderTypeComboBox::~SelectHeaderTypeComboBox()
......
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