Commit 405d1294 authored by David Edmundson's avatar David Edmundson
Browse files

Port old style connects

parent efd99b9b
......@@ -127,15 +127,15 @@ AdapterSettings::AdapterSettings(BluezQt::AdapterPtr adapter, KCModule *parent)
m_layout->labelForField(m_discoverTimeWidget)->setEnabled(m_temporaryVisibleOrig);
connect(m_adapter.data(), &BluezQt::Adapter::adapterChanged, this, &AdapterSettings::readChanges);
connect(m_name, SIGNAL(textEdited(QString)), this, SLOT(slotSettingsChanged()));
connect(m_hidden, SIGNAL(toggled(bool)), this, SLOT(visibilityChanged()));
connect(m_hidden, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
connect(m_alwaysVisible, SIGNAL(toggled(bool)), this, SLOT(visibilityChanged()));
connect(m_alwaysVisible, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
connect(m_temporaryVisible, SIGNAL(toggled(bool)), this, SLOT(visibilityChanged()));
connect(m_temporaryVisible, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
connect(m_discoverTime, SIGNAL(valueChanged(int)), this, SLOT(slotSettingsChanged()));
connect(m_powered, SIGNAL(stateChanged(int)), this, SLOT(slotSettingsChanged()));
connect(m_name, &QLineEdit::textEdited, this, &AdapterSettings::slotSettingsChanged);
connect(m_hidden, &QAbstractButton::toggled, this, &AdapterSettings::visibilityChanged);
connect(m_hidden, &QAbstractButton::toggled, this, &AdapterSettings::slotSettingsChanged);
connect(m_alwaysVisible, &QAbstractButton::toggled, this, &AdapterSettings::visibilityChanged);
connect(m_alwaysVisible, &QAbstractButton::toggled, this, &AdapterSettings::slotSettingsChanged);
connect(m_temporaryVisible, &QAbstractButton::toggled, this, &AdapterSettings::visibilityChanged);
connect(m_temporaryVisible, &QAbstractButton::toggled, this, &AdapterSettings::slotSettingsChanged);
connect(m_discoverTime, &QAbstractSlider::valueChanged, this, &AdapterSettings::slotSettingsChanged);
connect(m_powered, &QCheckBox::stateChanged, this, &AdapterSettings::slotSettingsChanged);
const QString &hci = adapterHciString(adapter->ubi());
if (!hci.isEmpty()) {
......@@ -388,8 +388,8 @@ void KCMBlueDevilAdapters::fillAdaptersInformation()
Q_FOREACH (BluezQt::AdapterPtr adapter, m_manager->adapters()) {
AdapterSettings *const adapterSettings = new AdapterSettings(adapter, this);
connect(adapterSettings, SIGNAL(settingsChanged(bool)),
this, SLOT(adapterConfigurationChanged(bool)));
connect(adapterSettings, &AdapterSettings::settingsChanged,
this, &KCMBlueDevilAdapters::adapterConfigurationChanged);
m_adapterSettingsMap.insert(adapter, adapterSettings);
m_layout->addWidget(adapterSettings);
}
......
......@@ -76,7 +76,7 @@ void SystemCheck::createWarnings(QVBoxLayout *layout)
m_blockedError->setText(i18n("Bluetooth is disabled."));
QAction *fixBlocked = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to enable Bluetooth adapter", "Enable"), m_blockedError);
connect(fixBlocked, SIGNAL(triggered(bool)), this, SLOT(fixBlockedError()));
connect(fixBlocked, &QAction::triggered, this, &SystemCheck::fixBlockedError);
m_blockedError->addAction(fixBlocked);
layout->insertWidget(0, m_blockedError);
......@@ -87,7 +87,7 @@ void SystemCheck::createWarnings(QVBoxLayout *layout)
m_noUsableAdapterError->setText(i18n("Your Bluetooth adapter is powered off."));
QAction *fixNoUsableAdapter = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to turn on Bluetooth adapter", "Turn On"), m_noUsableAdapterError);
connect(fixNoUsableAdapter, SIGNAL(triggered(bool)), this, SLOT(fixNoUsableAdapterError()));
connect(fixNoUsableAdapter, &QAction::triggered, this, &SystemCheck::fixNoUsableAdapterError);
m_noUsableAdapterError->addAction(fixNoUsableAdapter);
layout->insertWidget(0, m_noUsableAdapterError);
......@@ -97,7 +97,7 @@ void SystemCheck::createWarnings(QVBoxLayout *layout)
m_notDiscoverableAdapterError->setCloseButtonVisible(false);
QAction *fixNotDiscoverableAdapter = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to fix a problem", "Fix it"), m_notDiscoverableAdapterError);
connect(fixNotDiscoverableAdapter, SIGNAL(triggered(bool)), this, SLOT(fixNotDiscoverableAdapterError()));
connect(fixNotDiscoverableAdapter, &QAction::triggered, this, &SystemCheck::fixNotDiscoverableAdapterError);
m_notDiscoverableAdapterError->addAction(fixNotDiscoverableAdapter);
m_notDiscoverableAdapterError->setText(i18n("Your default Bluetooth adapter is not visible for remote devices."));
......@@ -108,7 +108,7 @@ void SystemCheck::createWarnings(QVBoxLayout *layout)
m_disabledNotificationsError->setCloseButtonVisible(false);
QAction *fixDisabledNotifications = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to fix a problem", "Fix it"), m_disabledNotificationsError);
connect(fixDisabledNotifications, SIGNAL(triggered(bool)), this, SLOT(fixDisabledNotificationsError()));
connect(fixDisabledNotifications, &QAction::triggered, this, &SystemCheck::fixDisabledNotificationsError);
m_disabledNotificationsError->addAction(fixDisabledNotifications);
m_disabledNotificationsError->setText(i18n("Interaction with Bluetooth system is not optimal."));
......@@ -119,7 +119,7 @@ void SystemCheck::createWarnings(QVBoxLayout *layout)
m_noKdedRunningError->setCloseButtonVisible(false);
QAction *fixNoKDEDRunning = new QAction(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")), i18nc("Action to fix a problem", "Fix it"), m_noKdedRunningError);
connect(fixNoKDEDRunning, SIGNAL(triggered(bool)), this, SLOT(fixNoKDEDRunning()));
connect(fixNoKDEDRunning, &QAction::triggered, this, &SystemCheck::fixNoKDEDRunning);
m_noKdedRunningError->addAction(fixNoKDEDRunning);
m_noKdedRunningError->setText(i18n("Bluetooth is not completely enabled."));
......
......@@ -68,7 +68,7 @@ void BluezAgent::authorizeService(BluezQt::DevicePtr device, const QString &uuid
qCDebug(BLUEDAEMON) << "AGENT-AuthorizeService" << device->name() << "Service:" << uuid;
RequestAuthorization *helper = new RequestAuthorization(device, this);
connect(helper, &RequestAuthorization::done, this, [this, device, request](RequestAuthorization::Result result) {
connect(helper, &RequestAuthorization::done, this, [ device, request](RequestAuthorization::Result result) {
processAuthorizationRequest(device, request, result);
});
}
......@@ -78,7 +78,7 @@ void BluezAgent::requestPinCode(BluezQt::DevicePtr device, const BluezQt::Reques
qCDebug(BLUEDAEMON) << "AGENT-RequestPinCode " << device->name();
RequestPin *helper = new RequestPin(device, false, this);
connect(helper, &RequestPin::done, this, [this, request](const QString &result) {
connect(helper, &RequestPin::done, this, [ request](const QString &result) {
if (!result.isEmpty()) {
qCDebug(BLUEDAEMON) << "Introducing PIN...";
request.accept(result);
......@@ -95,7 +95,7 @@ void BluezAgent::requestPasskey(BluezQt::DevicePtr device, const BluezQt::Reques
qCDebug(BLUEDAEMON) << "AGENT-RequestPasskey " << device->name();
RequestPin *helper = new RequestPin(device, true, this);
connect(helper, &RequestPin::done, this, [this, request](const QString &result) {
connect(helper, &RequestPin::done, this, [ request](const QString &result) {
bool ok;
quint32 passkey = result.toInt(&ok);
if (ok) {
......@@ -114,7 +114,7 @@ void BluezAgent::requestConfirmation(BluezQt::DevicePtr device, const QString &p
qCDebug(BLUEDAEMON) << "AGENT-RequestConfirmation " << device->name() << passkey;
RequestConfirmation *helper = new RequestConfirmation(device, passkey, this);
connect(helper, &RequestConfirmation::done, this, [this, request](RequestConfirmation::Result result) {
connect(helper, &RequestConfirmation::done, this, [ request](RequestConfirmation::Result result) {
if (result == RequestConfirmation::Accept) {
qCDebug(BLUEDAEMON) << "Accepting request";
request.accept();
......@@ -131,7 +131,7 @@ void BluezAgent::requestAuthorization(BluezQt::DevicePtr device, const BluezQt::
qCDebug(BLUEDAEMON) << "AGENT-RequestAuthorization";
RequestAuthorization *helper = new RequestAuthorization(device, this);
connect(helper, &RequestAuthorization::done, this, [this, device, request](RequestAuthorization::Result result) {
connect(helper, &RequestAuthorization::done, this, [ device, request](RequestAuthorization::Result result) {
processAuthorizationRequest(device, request, result);
});
}
......
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