diff --git a/dataengines/hotplug/hotplugengine.h b/dataengines/hotplug/hotplugengine.h --- a/dataengines/hotplug/hotplugengine.h +++ b/dataengines/hotplug/hotplugengine.h @@ -48,7 +48,7 @@ void onDeviceRemoved(const QString &udi); private: - void onDeviceAdded(Solid::Device &dev, bool added = true); + void handleDeviceAdded(Solid::Device &dev, bool added = true); void findPredicates(); QStringList predicatesForDevice(Solid::Device &device) const; QVariantList actionsForPredicates(const QStringList &predicates) const; diff --git a/dataengines/hotplug/hotplugengine.cpp b/dataengines/hotplug/hotplugengine.cpp --- a/dataengines/hotplug/hotplugengine.cpp +++ b/dataengines/hotplug/hotplugengine.cpp @@ -78,8 +78,8 @@ m_startList.insert(dev.udi(), dev); } - connect(Solid::DeviceNotifier::instance(), SIGNAL(deviceAdded(QString)), - this, SLOT(onDeviceAdded(QString))); + connect(Solid::DeviceNotifier::instance(), &Solid::DeviceNotifier::deviceAdded, + this, &HotplugEngine::onDeviceAdded); connect(Solid::DeviceNotifier::instance(), &Solid::DeviceNotifier::deviceRemoved, this, &HotplugEngine::onDeviceRemoved); @@ -98,7 +98,7 @@ if (!m_startList.isEmpty()) { QHash::iterator it = m_startList.begin(); //Solid::Device dev = const_cast(m_startList.takeFirst()); - onDeviceAdded(it.value(), false); + handleDeviceAdded(it.value(), false); m_startList.erase(it); } @@ -153,7 +153,7 @@ data.insert(QStringLiteral("actions"), actionsForPredicates(predicates)); setData(udi, data); } else { - onDeviceAdded(device, false); + handleDeviceAdded(device, false); } } else if (!m_encryptedPredicate.matches(device) && sources().contains(udi)) { removeSource(udi); @@ -201,10 +201,10 @@ void HotplugEngine::onDeviceAdded(const QString &udi) { Solid::Device device(udi); - onDeviceAdded(device); + handleDeviceAdded(device); } -void HotplugEngine::onDeviceAdded(Solid::Device &device, bool added) +void HotplugEngine::handleDeviceAdded(Solid::Device &device, bool added) { //qDebug() << "adding" << device.udi(); #ifdef HOTPLUGENGINE_TIMING