Changeset View
Changeset View
Standalone View
Standalone View
daemon/actions/bundled/wirelesspowersavingconfig.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 101 | for (auto it = permissions.constBegin(); it != permissions.constEnd(); ++it) { | |||
---|---|---|---|---|---|
106 | } | 106 | } | ||
107 | } | 107 | } | ||
108 | 108 | | |||
109 | QList< QPair< QString, QWidget* > > retlist; | 109 | QList< QPair< QString, QWidget* > > retlist; | ||
110 | retlist.append(qMakePair< QString, QWidget* >(i18n("Wi-Fi"), m_wifiCombobox)); | 110 | retlist.append(qMakePair< QString, QWidget* >(i18n("Wi-Fi"), m_wifiCombobox)); | ||
111 | retlist.append(qMakePair< QString, QWidget* >(i18n("Mobile broadband"), m_wwanCombobox)); | 111 | retlist.append(qMakePair< QString, QWidget* >(i18n("Mobile broadband"), m_wwanCombobox)); | ||
112 | retlist.append(qMakePair< QString, QWidget* >(i18n("Bluetooth"), m_btCombobox)); | 112 | retlist.append(qMakePair< QString, QWidget* >(i18n("Bluetooth"), m_btCombobox)); | ||
113 | 113 | | |||
114 | connect(m_wifiCombobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &WirelessPowerSavingConfig::setChanged); | 114 | #if (QT_VERSION <= QT_VERSION_CHECK(5, 15, 0)) | ||
115 | connect(m_wwanCombobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &WirelessPowerSavingConfig::setChanged); | 115 | const auto comboIndexChanged = QOverload<int, const QString&>::of(&QComboBox::currentIndexChanged); | ||
116 | connect(m_btCombobox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &WirelessPowerSavingConfig::setChanged); | 116 | #else | ||
117 | const auto comboIndexChanged = QOverload<int>::of(&QComboBox::currentIndexChanged); | ||||
118 | #endif | ||||
119 | connect(m_wifiCombobox, comboIndexChanged, this, &WirelessPowerSavingConfig::setChanged); | ||||
120 | connect(m_wwanCombobox, comboIndexChanged, this, &WirelessPowerSavingConfig::setChanged); | ||||
121 | connect(m_btCombobox, comboIndexChanged, this, &WirelessPowerSavingConfig::setChanged); | ||||
117 | 122 | | |||
118 | return retlist; | 123 | return retlist; | ||
119 | } | 124 | } | ||
120 | 125 | | |||
121 | } | 126 | } | ||
122 | } | 127 | } | ||
123 | 128 | | |||
124 | #include "wirelesspowersavingconfig.moc" | 129 | #include "wirelesspowersavingconfig.moc" |