summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obexsend.cpp4
-rw-r--r--core/obex/obexsend.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp
index 0da57ca..1b19c6b 100644
--- a/core/obex/obexsend.cpp
+++ b/core/obex/obexsend.cpp
@@ -153,32 +153,36 @@ void SendWidget::slotIrSent( bool b) {
QString text = b ? tr("Sent") : tr("Failure");
m_devBox->setStatus( m_irDaIt.key(), text );
++m_irDaIt;
slotStartIrda();
}
void SendWidget::slotIrTry(unsigned int trI) {
m_devBox->setStatus( m_irDaIt.key(), tr("Try %1").arg( QString::number( trI ) ) );
}
void SendWidget::slotStartIrda() {
if (m_irDaIt == m_irDa.end() ) {
m_irDeSearch = m_devBox->addDevice(tr("Search again for IrDa."), DeviceBox::Search );
return;
}
m_devBox->setStatus( m_irDaIt.key(), tr("Start sending") );
m_obex->send( m_file );
}
+void SendWidget::closeEvent( QCloseEvent* e) {
+ e->accept(); // make sure
+ QTimer::singleShot(0, this, SLOT(slotDone() ) );
+}
void SendWidget::slotDone() {
QCopEnvelope e0("QPE/IrDaApplet", "disableIrda()");
QCopEnvelope e1("QPE/Bluetooth", "disableBluetooth()");
emit done();
}
QString SendWidget::file()const {
return m_file;
}
DeviceBox::DeviceBox( QWidget* parent )
: QTextBrowser( parent ) {
}
DeviceBox::~DeviceBox() {
}
int DeviceBox::addDevice( const QString& name, int dev, const QString& status ) {
diff --git a/core/obex/obexsend.h b/core/obex/obexsend.h
index 02100f7..bf901cb 100644
--- a/core/obex/obexsend.h
+++ b/core/obex/obexsend.h
@@ -26,32 +26,35 @@ namespace OpieObex {
: m_first(first), m_second(second ) {
}
QString first()const{ return m_first; }
QString second()const { return m_second; }
private:
QString m_first;
QString m_second;
};
class SendWidget : public QWidget{
Q_OBJECT
public:
SendWidget( QWidget* parent = 0, const char* name = 0);
~SendWidget();
QString file()const;
+ protected:
+ void closeEvent( QCloseEvent* );
+
public slots:
void send( const QString& file, const QString& desc );
signals:
void done();
private slots: // QCOP slots
/* IrDa Names*/
void slotIrDaDevices( const QStringList& );
/* Bt Names + BD-Addr */
void slotBTDevices( const QMap<QString, QString>& );
void slotSelectedDevice( int id, int dev );
void dispatchIrda( const QCString& str, const QByteArray& ar );
void dispatchBt( const QCString& str, const QByteArray& ar );
void slotIrError( int );