-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index 7122b40..267714e 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp | |||
@@ -198,37 +198,37 @@ void IrdaApplet::showDiscovered ( ) | |||
198 | QMap <QString, QString>::Iterator it; | 198 | QMap <QString, QString>::Iterator it; |
199 | 199 | ||
200 | for ( it = m_devices. begin ( ); it != m_devices. end ( ); ++it ) | 200 | for ( it = m_devices. begin ( ); it != m_devices. end ( ); ++it ) |
201 | it. data ( ). prepend ( "+++" ); | 201 | it. data ( ). prepend ( "+++" ); |
202 | 202 | ||
203 | for ( QStringList::Iterator lit = list. begin ( ); lit != list. end ( ); ++lit ) { | 203 | for ( QStringList::Iterator lit = list. begin ( ); lit != list. end ( ); ++lit ) { |
204 | const QString &line = *lit; | 204 | const QString &line = *lit; |
205 | 205 | ||
206 | if ( line. startsWith ( "nickname:" )) { | 206 | if ( line. startsWith ( "nickname:" )) { |
207 | discoveredDevice = line. mid ( line. find ( ':' ) + 2, line. find ( ',' ) - line. find ( ':' ) - 2 ); | 207 | discoveredDevice = line. mid ( line. find ( ':' ) + 2, line. find ( ',' ) - line. find ( ':' ) - 2 ); |
208 | deviceAddr = line. mid ( line. find ( "daddr:" ) + 9, 8 ); | 208 | deviceAddr = line. mid ( line. find ( "daddr:" ) + 9, 8 ); |
209 | 209 | ||
210 | // odebug << discoveredDevice + "(" + deviceAddr + ")" << oendl; | 210 | // odebug << discoveredDevice + "(" + deviceAddr + ")" << oendl; |
211 | 211 | ||
212 | if ( !m_devices. contains ( deviceAddr )) { | 212 | if ( !m_devices. contains ( deviceAddr )) { |
213 | popup ( tr( "Found:" ) + " " + discoveredDevice ); | 213 | popup ( tr( "Found:" ) + " " + discoveredDevice ); |
214 | //snd_found. play ( ); | 214 | //snd_found. play ( ); |
215 | qcopsend = true; | 215 | qcopsend = true; |
216 | } | 216 | } |
217 | m_devices. replace ( deviceAddr, discoveredDevice ); | 217 | m_devices. replace ( deviceAddr, discoveredDevice ); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
221 | for ( it = m_devices. begin ( ); it != m_devices. end ( ); ) { | 221 | for ( it = m_devices. begin ( ); it != m_devices. end ( ); ) { |
222 | // odebug << "IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?" << oendl; | 222 | // odebug << "IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?" << oendl; |
223 | 223 | ||
224 | if ( it. data ( ). left ( 3 ) == "+++" ) { | 224 | if ( it. data ( ). left ( 3 ) == "+++" ) { |
225 | popup ( tr( "Lost:" ) + " " + it. data ( ). mid ( 3 )); | 225 | popup ( tr( "Lost:" ) + " " + it. data ( ). mid ( 3 )); |
226 | //snd_lost. play ( ); | 226 | //snd_lost. play ( ); |
227 | 227 | ||
228 | QMap <QString, QString>::Iterator tmp = it; | 228 | QMap <QString, QString>::Iterator tmp = it; |
229 | tmp++; | 229 | tmp++; |
230 | m_devices. remove ( it ); // in contrast to QValueListIterator this remove doesn't return the next Iterator | 230 | m_devices. remove ( it ); // in contrast to QValueListIterator this remove doesn't return the next Iterator |
231 | it = tmp; | 231 | it = tmp; |
232 | 232 | ||
233 | qcopsend = true; | 233 | qcopsend = true; |
234 | } | 234 | } |
@@ -322,25 +322,25 @@ void IrdaApplet::paintEvent ( QPaintEvent * ) | |||
322 | p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); | 322 | p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); |
323 | 323 | ||
324 | if ( m_receive_active ) | 324 | if ( m_receive_active ) |
325 | p. drawPixmap( 0, 1, m_receiveActivePixmap ); | 325 | p. drawPixmap( 0, 1, m_receiveActivePixmap ); |
326 | } | 326 | } |
327 | /* | 327 | /* |
328 | * We know 3 calls | 328 | * We know 3 calls |
329 | * a) enable | 329 | * a) enable |
330 | * b) disable | 330 | * b) disable |
331 | * a and b will temp enable the IrDa device and disable will disable it again if it wasn't on | 331 | * a and b will temp enable the IrDa device and disable will disable it again if it wasn't on |
332 | * c) listDevices: We will return a list of known devices | 332 | * c) listDevices: We will return a list of known devices |
333 | */ | 333 | */ |
334 | void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ar ) { | 334 | void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ) { |
335 | if ( str == "enableIrda()") { | 335 | if ( str == "enableIrda()") { |
336 | m_wasOn = checkIrdaStatus(); | 336 | m_wasOn = checkIrdaStatus(); |
337 | m_wasDiscover = checkIrdaDiscoveryStatus(); | 337 | m_wasDiscover = checkIrdaDiscoveryStatus(); |
338 | if (!m_wasOn) { | 338 | if (!m_wasOn) { |
339 | setIrdaStatus( true ); | 339 | setIrdaStatus( true ); |
340 | } | 340 | } |
341 | if ( !m_wasDiscover ) { | 341 | if ( !m_wasDiscover ) { |
342 | setIrdaDiscoveryStatus ( true ); | 342 | setIrdaDiscoveryStatus ( true ); |
343 | } | 343 | } |
344 | } else if ( str == "disableIrda()") { | 344 | } else if ( str == "disableIrda()") { |
345 | if (!m_wasOn) { | 345 | if (!m_wasOn) { |
346 | setIrdaStatus( false ); | 346 | setIrdaStatus( false ); |