Commit 3a5aca82 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix build with Qt 5.15

Summary: QComboBox::currentIndexChanged(int) got deprecated.

Test Plan: Builds

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27406
parent 436714ec
......@@ -111,9 +111,14 @@ QList< QPair< QString, QWidget* > > WirelessPowerSavingConfig::buildUi()
retlist.append(qMakePair< QString, QWidget* >(i18n("Mobile broadband"), m_wwanCombobox));
retlist.append(qMakePair< QString, QWidget* >(i18n("Bluetooth"), m_btCombobox));
connect(m_wifiCombobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &WirelessPowerSavingConfig::setChanged);
connect(m_wwanCombobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &WirelessPowerSavingConfig::setChanged);
connect(m_btCombobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &WirelessPowerSavingConfig::setChanged);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
const auto comboIndexChanged = QOverload<int, const QString&>::of(&QComboBox::currentIndexChanged);
#else
const auto comboIndexChanged = QOverload<int>::of(&QComboBox::currentIndexChanged);
#endif
connect(m_wifiCombobox, comboIndexChanged, this, &WirelessPowerSavingConfig::setChanged);
connect(m_wwanCombobox, comboIndexChanged, this, &WirelessPowerSavingConfig::setChanged);
connect(m_btCombobox, comboIndexChanged, this, &WirelessPowerSavingConfig::setChanged);
return retlist;
}
......
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