-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 | |||
@@ -149,72 +149,68 @@ void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) { | |||
149 | for(QMap<QString, QString>::ConstIterator it = str.begin(); | 149 | for(QMap<QString, QString>::ConstIterator it = str.begin(); |
150 | it != str.end(); ++it ) { | 150 | it != str.end(); ++it ) { |
151 | int id = addReceiver(it.key(), "obex/bt.png"); | 151 | int id = addReceiver(it.key(), "obex/bt.png"); |
152 | m_bt.insert( id, Pair( it.key(), it.data() ) ); | 152 | m_bt.insert( id, Pair( it.key(), it.data() ) ); |
153 | } | 153 | } |
154 | btStatus->setText(tr("ready.")); | 154 | btStatus->setText(tr("ready.")); |
155 | m_btIt = m_bt.begin(); | 155 | m_btIt = m_bt.begin(); |
156 | 156 | ||
157 | #else | 157 | #else |
158 | (void)str; | 158 | (void)str; |
159 | #endif | 159 | #endif |
160 | } | 160 | } |
161 | void SendWidget::slotSelectedDevice( int, int ) { | 161 | void SendWidget::slotSelectedDevice( int, int ) { |
162 | /* if ( name == m_irDeSearch ) { | 162 | /* if ( name == m_irDeSearch ) { |
163 | for (QMap<int, QString>::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it ) | 163 | for (QMap<int, QString>::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it ) |
164 | m_devBox->removeDevice( it.key() ); | 164 | m_devBox->removeDevice( it.key() ); |
165 | 165 | ||
166 | QCopEnvelope e2("QPE/IrDaApplet", "listDevices()"); | 166 | QCopEnvelope e2("QPE/IrDaApplet", "listDevices()"); |
167 | }*/ | 167 | }*/ |
168 | } | 168 | } |
169 | void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) { | 169 | void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) { |
170 | if ( str == "devices(QStringList)" ) { | 170 | if ( str == "devices(QStringList)" ) { |
171 | QDataStream stream( ar, IO_ReadOnly ); | 171 | QDataStream stream( ar, IO_ReadOnly ); |
172 | QStringList list; | 172 | QStringList list; |
173 | stream >> list; | 173 | stream >> list; |
174 | slotIrDaDevices( list ); | 174 | slotIrDaDevices( list ); |
175 | } | 175 | } |
176 | } | 176 | } |
177 | void SendWidget::slotIrError( int ) { | 177 | void SendWidget::slotIrError( int ) { |
178 | irdaStatus->setText(tr("error :(")); | 178 | irdaStatus->setText(tr("error :(")); |
179 | } | 179 | } |
180 | void SendWidget::slotIrSent( bool b) { | 180 | void SendWidget::slotIrSent( bool b) { |
181 | #ifdef BLUETOOTH | ||
182 | QString text = b ? tr("Sent") : tr("Failure"); | 181 | QString text = b ? tr("Sent") : tr("Failure"); |
183 | setReceiverStatus( m_irDaIt.key(), text ); | 182 | setReceiverStatus( m_irDaIt.key(), text ); |
184 | ++m_irDaIt; | 183 | ++m_irDaIt; |
185 | slotStartIrda(); | 184 | slotStartIrda(); |
186 | #else | ||
187 | (void)b; | ||
188 | #endif | ||
189 | } | 185 | } |
190 | void SendWidget::slotIrTry(unsigned int trI) { | 186 | void SendWidget::slotIrTry(unsigned int trI) { |
191 | setReceiverStatus(m_irDaIt.key(), tr("Try %1").arg( QString::number( trI ) )); | 187 | setReceiverStatus(m_irDaIt.key(), tr("Try %1").arg( QString::number( trI ) )); |
192 | } | 188 | } |
193 | void SendWidget::slotStartIrda() { | 189 | void SendWidget::slotStartIrda() { |
194 | if ( !m_irDa.count() ) | 190 | if ( !m_irDa.count() ) |
195 | return; | 191 | return; |
196 | if ( m_irDaIt == m_irDa.end() || !receiverSelected(m_irDaIt.key())) { | 192 | if ( m_irDaIt == m_irDa.end() || !receiverSelected(m_irDaIt.key())) { |
197 | irdaStatus->setText(tr("complete.")); | 193 | irdaStatus->setText(tr("complete.")); |
198 | m_irDaIt = m_irDa.begin(); | 194 | m_irDaIt = m_irDa.begin(); |
199 | return; | 195 | return; |
200 | } | 196 | } |
201 | setReceiverStatus( m_irDaIt.key(), tr("Start sending") ); | 197 | setReceiverStatus( m_irDaIt.key(), tr("Start sending") ); |
202 | irdaStatus->setText(tr("sending.")); | 198 | irdaStatus->setText(tr("sending.")); |
203 | m_obex->send( m_file, tr("noaddress") ); | 199 | m_obex->send( m_file, tr("noaddress") ); |
204 | } | 200 | } |
205 | 201 | ||
206 | void SendWidget::dispatchBt( const QCString& str, const QByteArray& ar ) { | 202 | void SendWidget::dispatchBt( const QCString& str, const QByteArray& ar ) { |
207 | if ( str == "devices(QStringMap)" ) { | 203 | if ( str == "devices(QStringMap)" ) { |
208 | QDataStream stream( ar, IO_ReadOnly ); | 204 | QDataStream stream( ar, IO_ReadOnly ); |
209 | QMap<QString, QString> btmap; | 205 | QMap<QString, QString> btmap; |
210 | stream >> btmap; | 206 | stream >> btmap; |
211 | slotBTDevices( btmap ); | 207 | slotBTDevices( btmap ); |
212 | } | 208 | } |
213 | } | 209 | } |
214 | void SendWidget::slotBtError( int ) { | 210 | void SendWidget::slotBtError( int ) { |
215 | btStatus->setText(tr("error :(")); | 211 | btStatus->setText(tr("error :(")); |
216 | } | 212 | } |
217 | void SendWidget::slotBtSent( bool b) { | 213 | void SendWidget::slotBtSent( bool b) { |
218 | #ifdef BLUETOOTH | 214 | #ifdef BLUETOOTH |
219 | QString text = b ? tr("Sent") : tr("Failure"); | 215 | QString text = b ? tr("Sent") : tr("Failure"); |
220 | setReceiverStatus( m_btIt.key(), text ); | 216 | setReceiverStatus( m_btIt.key(), text ); |