Changeset View
Changeset View
Standalone View
Standalone View
src/MediaDeviceMonitor.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | void | 54 | void | ||
55 | MediaDeviceMonitor::init() | 55 | MediaDeviceMonitor::init() | ||
56 | { | 56 | { | ||
57 | DEBUG_BLOCK | 57 | DEBUG_BLOCK | ||
58 | 58 | | |||
59 | // connect to device cache so new devices are tested too | 59 | // connect to device cache so new devices are tested too | ||
60 | connect( MediaDeviceCache::instance(), SIGNAL(deviceAdded(QString)), | 60 | connect( MediaDeviceCache::instance(), &MediaDeviceCache::deviceAdded, | ||
61 | SLOT(deviceAdded(QString)) ); | 61 | this, &MediaDeviceMonitor::deviceAdded ); | ||
62 | connect( MediaDeviceCache::instance(), SIGNAL(deviceRemoved(QString)), | 62 | connect( MediaDeviceCache::instance(), &MediaDeviceCache::deviceRemoved, | ||
63 | SLOT(slotDeviceRemoved(QString)) ); | 63 | this, &MediaDeviceMonitor::slotDeviceRemoved ); | ||
64 | connect( MediaDeviceCache::instance(), SIGNAL(accessibilityChanged(bool,QString)), | 64 | connect( MediaDeviceCache::instance(), &MediaDeviceCache::accessibilityChanged, | ||
65 | SLOT(slotAccessibilityChanged(bool,QString)) ); | 65 | this, &MediaDeviceMonitor::slotAccessibilityChanged ); | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | QStringList | 68 | QStringList | ||
69 | MediaDeviceMonitor::getDevices() | 69 | MediaDeviceMonitor::getDevices() | ||
70 | { | 70 | { | ||
71 | DEBUG_BLOCK | 71 | DEBUG_BLOCK | ||
72 | /* get list of devices */ | 72 | /* get list of devices */ | ||
73 | MediaDeviceCache::instance()->refreshCache(); | 73 | MediaDeviceCache::instance()->refreshCache(); | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 133 | { | |||
137 | // a chance to recognize devices, put it in a queue for | 137 | // a chance to recognize devices, put it in a queue for | ||
138 | // later device checking | 138 | // later device checking | ||
139 | 139 | | |||
140 | if ( assistant->wait() ) | 140 | if ( assistant->wait() ) | ||
141 | { | 141 | { | ||
142 | // keep track of this type of device from now on | 142 | // keep track of this type of device from now on | ||
143 | m_waitingassistants << assistant; | 143 | m_waitingassistants << assistant; | ||
144 | 144 | | |||
145 | QTimer::singleShot( 1000, this, SLOT(slotDequeueWaitingAssistant()) ); | 145 | QTimer::singleShot( 1000, this, &MediaDeviceMonitor::slotDequeueWaitingAssistant ); | ||
146 | } | 146 | } | ||
147 | else | 147 | else | ||
148 | { | 148 | { | ||
149 | // keep track of this type of device from now on | 149 | // keep track of this type of device from now on | ||
150 | m_assistants << assistant; | 150 | m_assistants << assistant; | ||
151 | 151 | | |||
152 | // start initial check for devices of this type | 152 | // start initial check for devices of this type | ||
153 | checkDevicesFor( assistant ); | 153 | checkDevicesFor( assistant ); | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |