summaryrefslogtreecommitdiff
authorpaule <paule>2007-07-15 10:07:39 (UTC)
committer paule <paule>2007-07-15 10:07:39 (UTC)
commit15fbd2a9189281ca84d89ad6a77261d0046add36 (patch) (side-by-side diff)
treedac2df5ba719b26ab536fe1bb505325749d3c975
parentfdc3476cebdffd6574fa7e874c1051b0b8bc6145 (diff)
downloadopie-15fbd2a9189281ca84d89ad6a77261d0046add36.zip
opie-15fbd2a9189281ca84d89ad6a77261d0046add36.tar.gz
opie-15fbd2a9189281ca84d89ad6a77261d0046add36.tar.bz2
Remove erroneous #ifdef BLUETOOTH around code which is for IR only. Patch courtesy of Marek Vasut <marek.vasut@gmail.com>.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obexsend.cpp4
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