Commit 5ee2860a authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Fix connects for Windows build

The Windows build needs stuff deprecated in Qt 5.11.
parent a2a45abf
......@@ -228,7 +228,12 @@ DumpCertificateCommand::DumpCertificateCommand(const GpgME::Key &k)
void DumpCertificateCommand::Private::init()
{
connect(&process, &QProcess::finished, q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
#if QT_DEPRECATED_SINCE(5, 13)
connect(&process, qOverload<int, QProcess::ExitStatus>(&QProcess::finished),
#else
connect(&process, &QProcess::finished,
#endif
q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
connect(&process, &QProcess::readyReadStandardError, q, [this]() { slotProcessReadyReadStandardError(); });
connect(&process, &QProcess::readyReadStandardOutput, q, [this] { slotProcessReadyReadStandardOutput(); });
......
......@@ -271,7 +271,12 @@ DumpCrlCacheCommand::DumpCrlCacheCommand(QAbstractItemView *v, KeyListController
void DumpCrlCacheCommand::Private::init()
{
connect(&process, &QProcess::finished, q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
#if QT_DEPRECATED_SINCE(5, 13)
connect(&process, qOverload<int, QProcess::ExitStatus>(&QProcess::finished),
#else
connect(&process, &QProcess::finished,
#endif
q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
connect(&process, &QProcess::readyReadStandardError, q, [this]() { slotProcessReadyReadStandardError(); });
connect(&process, &QProcess::readyReadStandardOutput, q, [this] { slotProcessReadyReadStandardOutput(); });
}
......
......@@ -35,7 +35,11 @@ ExportPaperKeyCommand::ExportPaperKeyCommand(QAbstractItemView *v, KeyListContro
GnuPGProcessCommand(v, c),
mParent(v)
{
#if QT_DEPRECATED_SINCE(5, 13)
connect(&mPkProc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished),
#else
connect(&mPkProc, &QProcess::finished,
#endif
this, &ExportPaperKeyCommand::pkProcFinished);
mPkProc.setProgram(paperKeyInstallPath());
mPkProc.setArguments(QStringList() << QStringLiteral("--output-type=base16"));
......
......@@ -212,7 +212,12 @@ GnuPGProcessCommand::GnuPGProcessCommand(const GpgME::Key &key)
void GnuPGProcessCommand::Private::init()
{
connect(&process, &QProcess::finished, q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
#if QT_DEPRECATED_SINCE(5, 13)
connect(&process, qOverload<int, QProcess::ExitStatus>(&QProcess::finished),
#else
connect(&process, &QProcess::finished,
#endif
q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
q->m_procReadyReadStdErrConnection = connect(&process, &QProcess::readyReadStandardError, q, [this]() { slotProcessReadyReadStandardError(); });
}
......
......@@ -125,7 +125,12 @@ ImportCrlCommand::ImportCrlCommand(const QStringList &files, QAbstractItemView *
void ImportCrlCommand::Private::init()
{
connect(&process, &QProcess::finished, q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
#if QT_DEPRECATED_SINCE(5, 13)
connect(&process, qOverload<int, QProcess::ExitStatus>(&QProcess::finished),
#else
connect(&process, &QProcess::finished,
#endif
q, [this](int exitCode, QProcess::ExitStatus status) { slotProcessFinished(exitCode, status); });
connect(&process, &QProcess::readyReadStandardError, q, [this]() { slotProcessReadyReadStandardError(); });
}
......
......@@ -134,7 +134,11 @@ void CryptoOperationsConfigWidget::applyProfile(const QString &profile)
qDebug() << "Starting" << ei.fileName() << "with args" << gpgconf->arguments();
#if QT_DEPRECATED_SINCE(5, 13)
connect(gpgconf, qOverload<int, QProcess::ExitStatus>(&QProcess::finished),
#else
connect(gpgconf, &QProcess::finished,
#endif
this, [this, gpgconf, profile] () {
mApplyBtn->setEnabled(true);
if (gpgconf->exitStatus() != QProcess::NormalExit) {
......
......@@ -170,8 +170,13 @@ DirectoryServicesConfigurationPage::Private::Private(DirectoryServicesConfigurat
mMaxItems.createWidgets(q);
mMaxItems.label()->setText(i18n("&Maximum number of items returned by query:"));
mMaxItems.widget()->setMinimum(0);
#if QT_DEPRECATED_SINCE(5, 14)
connect(mMaxItems.widget(), qOverload<int>(&QSpinBox::valueChanged),
q, &DirectoryServicesConfigurationPage::markAsChanged);
#else
connect(mMaxItems.widget(), &QSpinBox::valueChanged,
q, &DirectoryServicesConfigurationPage::markAsChanged);
#endif
glay->addWidget(mMaxItems.label(), row, 0);
glay->addWidget(mMaxItems.widget(), row, 1);
......
......@@ -47,7 +47,11 @@ public:
#endif
auto changedSignal = &SMimeValidationConfigurationWidget::changed;
connect(ui.intervalRefreshCB, &QCheckBox::toggled, q, changedSignal);
#if QT_DEPRECATED_SINCE(5, 14)
connect(ui.intervalRefreshSB, qOverload<int>(&QSpinBox::valueChanged), q, changedSignal);
#else
connect(ui.intervalRefreshSB, &QSpinBox::valueChanged, q, changedSignal);
#endif
connect(ui.OCSPCB, &QCheckBox::toggled, q, changedSignal);
connect(ui.OCSPResponderURL, &QLineEdit::textChanged, q, changedSignal);
......
......@@ -93,8 +93,13 @@ public:
, inUnit{Days}
, ui{mode, q}
{
#if QT_DEPRECATED_SINCE(5, 14)
connect(ui.inSB, qOverload<int>(&QSpinBox::valueChanged),
q, [this] () { slotInAmountChanged(); });
#else
connect(ui.inSB, &QSpinBox::valueChanged,
q, [this] () { slotInAmountChanged(); });
#endif
connect(ui.inCB, qOverload<int>(&QComboBox::currentIndexChanged),
q, [this] () { slotInUnitChanged(); });
connect(ui.onCW, &QCalendarWidget::selectionChanged,
......
......@@ -81,7 +81,11 @@ void UpdateNotification::forceUpdateCheck(QWidget *parent)
<< QString::fromLocal8Bit(proc->readAllStandardError());
});
#if QT_DEPRECATED_SINCE(5, 13)
connect(proc, qOverload<int, QProcess::ExitStatus>(&QProcess::finished),
#else
connect(proc, &QProcess::finished,
#endif
[parent, progress, proc](int exitCode, QProcess::ExitStatus exitStatus) {
qCDebug(KLEOPATRA_LOG) << "Update force exited with status:" << exitStatus
<< "code:" << exitCode;
......
......@@ -131,7 +131,11 @@ KWatchGnuPGConfig::KWatchGnuPGConfig(QWidget *parent)
auto button = new QPushButton(i18n("Set &Unlimited"), group);
glay->addWidget(button, row, 2);
#if QT_DEPRECATED_SINCE(5, 14)
connect(mLoglenSB, qOverload<int>(&QSpinBox::valueChanged), this, &KWatchGnuPGConfig::slotChanged);
#else
connect(mLoglenSB, &QSpinBox::valueChanged, this, &KWatchGnuPGConfig::slotChanged);
#endif
connect(button, &QPushButton::clicked, this, &KWatchGnuPGConfig::slotSetHistorySizeUnlimited);
++row;
......
Supports Markdown
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