summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/obex/btobex.cpp1
-rw-r--r--core/obex/obexsend.cpp29
2 files changed, 20 insertions, 10 deletions
diff --git a/core/obex/btobex.cpp b/core/obex/btobex.cpp
index b8556da..886f3dc 100644
--- a/core/obex/btobex.cpp
+++ b/core/obex/btobex.cpp
@@ -34,7 +34,6 @@ BtObex::BtObex( QObject *parent, const char* name )
};
BtObex::~BtObex() {
- if (btManager)
delete btManager;
delete m_rec;
delete m_send;
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp
index dbbb7b3..8432d16 100644
--- a/core/obex/obexsend.cpp
+++ b/core/obex/obexsend.cpp
@@ -92,7 +92,8 @@ void SendWidget::setReceiverStatus( int id, const QString& status ) {
}
void SendWidget::slotIrDaDevices( const QStringList& list) {
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
+ for (QStringList::ConstIterator it = list.begin();
+ it != list.end(); ++it ) {
int id = addReceiver(*it, "obex/irda.png");
m_irDa.insert( id, (*it) );
}
@@ -102,7 +103,8 @@ void SendWidget::slotIrDaDevices( const QStringList& list) {
}
void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) {
- for(QMap<QString, QString>::ConstIterator it = str.begin(); it != str.end(); ++it ) {
+ 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() ) );
}
@@ -139,8 +141,9 @@ 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() ) {
+ if ( !m_irDa.count() )
+ return;
+ if ( m_irDaIt == m_irDa.end() || !receiverSelected(m_irDaIt.key())) {
irdaStatus->setText(tr("complete."));
return;
}
@@ -222,14 +225,22 @@ void SendWidget::toggle_receiver(QListViewItem* item)
if(item->pixmap(2))
item->setPixmap(2,QPixmap());
else
- item->setPixmap(2,Resource::loadPixmap("backup/check.png"));
+ item->setPixmap(2,Resource::loadPixmap("obex/check.png"));
}
-void SendWidget::closeEvent( QCloseEvent* e) {
- obexSendBase::closeEvent(e);
- QCopEnvelope e0("QPE/IrDaApplet", "disableIrda()");
- QCopEnvelope e1("QPE/Bluetooth", "disableBluetooth()");
+void SendWidget::closeEvent( QCloseEvent* evt) {
+ delete m_obex;
+ m_obex = NULL;
+ delete m_btobex;
+ m_btobex = NULL;
+ obexSendBase::closeEvent(evt);
+ {
+ QCopEnvelope e("QPE/IrDaApplet", "disableIrda()");
+ }
+ {
+ QCopEnvelope e("QPE/Bluetooth", "disableBluetooth()");
+ }
}
void SendWidget::userDone() {