-rw-r--r-- | core/obex/obexsend.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp index d58b4e9..a401a40 100644 --- a/core/obex/obexsend.cpp +++ b/core/obex/obexsend.cpp @@ -133,104 +133,100 @@ void SendWidget::setReceiverStatus( int id, const QString& status ) { receivers[id]->setText(3, status ); } void SendWidget::slotIrDaDevices( const QStringList& list) { for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { int id = addReceiver(*it, "obex/irda.png"); m_irDa.insert( id, (*it) ); } irdaStatus->setText( tr("ready.")); m_irDaIt = m_irDa.begin(); } void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) { #ifdef BLUETOOTH for(QMap<QString, QString>::ConstIterator it = str.begin(); it != str.end(); ++it ) { int id = addReceiver(it.key(), "obex/bt.png"); m_bt.insert( id, Pair( it.key(), it.data() ) ); } btStatus->setText(tr("ready.")); m_btIt = m_bt.begin(); #else (void)str; #endif } void SendWidget::slotSelectedDevice( int, int ) { /* if ( name == m_irDeSearch ) { for (QMap<int, QString>::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it ) m_devBox->removeDevice( it.key() ); QCopEnvelope e2("QPE/IrDaApplet", "listDevices()"); }*/ } void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) { if ( str == "devices(QStringList)" ) { QDataStream stream( ar, IO_ReadOnly ); QStringList list; stream >> list; slotIrDaDevices( list ); } } void SendWidget::slotIrError( int ) { irdaStatus->setText(tr("error :(")); } void SendWidget::slotIrSent( bool b) { -#ifdef BLUETOOTH QString text = b ? tr("Sent") : tr("Failure"); setReceiverStatus( m_irDaIt.key(), text ); ++m_irDaIt; slotStartIrda(); -#else - (void)b; -#endif } void SendWidget::slotIrTry(unsigned int trI) { setReceiverStatus(m_irDaIt.key(), tr("Try %1").arg( QString::number( trI ) )); } void SendWidget::slotStartIrda() { if ( !m_irDa.count() ) return; if ( m_irDaIt == m_irDa.end() || !receiverSelected(m_irDaIt.key())) { irdaStatus->setText(tr("complete.")); m_irDaIt = m_irDa.begin(); return; } setReceiverStatus( m_irDaIt.key(), tr("Start sending") ); irdaStatus->setText(tr("sending.")); m_obex->send( m_file, tr("noaddress") ); } void SendWidget::dispatchBt( const QCString& str, const QByteArray& ar ) { if ( str == "devices(QStringMap)" ) { QDataStream stream( ar, IO_ReadOnly ); QMap<QString, QString> btmap; stream >> btmap; slotBTDevices( btmap ); } } void SendWidget::slotBtError( int ) { btStatus->setText(tr("error :(")); } void SendWidget::slotBtSent( bool b) { #ifdef BLUETOOTH QString text = b ? tr("Sent") : tr("Failure"); setReceiverStatus( m_btIt.key(), text ); ++m_btIt; slotStartBt(); #else (void)b; #endif } void SendWidget::slotBtTry(unsigned int trI) { #ifdef BLUETOOTH setReceiverStatus( m_btIt.key(), tr("Try %1").arg( QString::number( trI ) ) ); #else (void)trI; #endif } void SendWidget::slotStartBt() { #ifdef BLUETOOTH // skip past unselected receivers |