author | zecke <zecke> | 2003-02-16 17:12:10 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-16 17:12:10 (UTC) |
commit | e9e20c4e64b8b228af928822e3d4a49ed773dc2e (patch) (unidiff) | |
tree | 17cdd250d08093d4c1564b7e61015d764da7e590 | |
parent | 7280d00082163307ecc09d8f4b98397dda460dd5 (diff) | |
download | opie-e9e20c4e64b8b228af928822e3d4a49ed773dc2e.zip opie-e9e20c4e64b8b228af928822e3d4a49ed773dc2e.tar.gz opie-e9e20c4e64b8b228af928822e3d4a49ed773dc2e.tar.bz2 |
Debug output
disabled some features inside the QTextView..
fixed two typos and the order of filename + description
it's sending now again
-rw-r--r-- | core/obex/obex.cc | 5 | ||||
-rw-r--r-- | core/obex/obexhandler.cpp | 2 | ||||
-rw-r--r-- | core/obex/obexsend.cpp | 19 |
3 files changed, 15 insertions, 11 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc index 83d1faf..92cd317 100644 --- a/core/obex/obex.cc +++ b/core/obex/obex.cc | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #include <qapplication.h> | 2 | #include <qapplication.h> |
3 | #include <qfile.h> | ||
3 | #include <qmessagebox.h> | 4 | #include <qmessagebox.h> |
4 | #include <qpe/qcopenvelope_qws.h> | 5 | #include <qpe/qcopenvelope_qws.h> |
@@ -49,5 +50,5 @@ void Obex::send( const QString& fileName) { // if currently receiving stop it se | |||
49 | m_count = 0; | 50 | m_count = 0; |
50 | m_file = fileName; | 51 | m_file = fileName; |
51 | qWarning("send"); | 52 | qWarning("send %s", fileName.latin1() ); |
52 | if (m_rec != 0 ) { | 53 | if (m_rec != 0 ) { |
53 | qWarning("running"); | 54 | qWarning("running"); |
@@ -76,5 +77,5 @@ void Obex::sendNow(){ | |||
76 | m_send = new OProcess(); | 77 | m_send = new OProcess(); |
77 | *m_send << "irobex_palm3"; | 78 | *m_send << "irobex_palm3"; |
78 | *m_send << m_file; | 79 | *m_send << QFile::encodeName(m_file); |
79 | 80 | ||
80 | // connect to slots Exited and and StdOut | 81 | // connect to slots Exited and and StdOut |
diff --git a/core/obex/obexhandler.cpp b/core/obex/obexhandler.cpp index f71a233..16e1c2f 100644 --- a/core/obex/obexhandler.cpp +++ b/core/obex/obexhandler.cpp | |||
@@ -57,5 +57,5 @@ void ObexHandler::irdaMessage( const QCString& msg, const QByteArray& data) { | |||
57 | m_wasRec = (m_receiver != 0 ); | 57 | m_wasRec = (m_receiver != 0 ); |
58 | doReceive( false ); | 58 | doReceive( false ); |
59 | doSend(name, desc); | 59 | doSend(desc, name); |
60 | }else if (msg == "receive(int)") { | 60 | }else if (msg == "receive(int)") { |
61 | int rec; | 61 | int rec; |
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp index a2e4c16..d5ebd81 100644 --- a/core/obex/obexsend.cpp +++ b/core/obex/obexsend.cpp | |||
@@ -33,9 +33,9 @@ void SendWidget::initUI() { | |||
33 | QCopChannel* chan = new QCopChannel("QPE/IrDaAppletBack", this ); | 33 | QCopChannel* chan = new QCopChannel("QPE/IrDaAppletBack", this ); |
34 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), | 34 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), |
35 | this, SLOT(dispatchBt(const QCString&, const QByteArray& ) ) ); | 35 | this, SLOT(dispatchIrda(const QCString&, const QByteArray& ) ) ); |
36 | 36 | ||
37 | chan = new QCopChannel("QPE/BluetoothBack", this ); | 37 | chan = new QCopChannel("QPE/BluetoothBack", this ); |
38 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), | 38 | connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), |
39 | this, SLOT(dispatchIrda(const QCString&, const QByteArray& ) ) ); | 39 | this, SLOT(dispatchBt(const QCString&, const QByteArray& ) ) ); |
40 | 40 | ||
41 | QVBoxLayout* lay = new QVBoxLayout(this); | 41 | QVBoxLayout* lay = new QVBoxLayout(this); |
@@ -104,12 +104,13 @@ void SendWidget::send( const QString& file, const QString& desc ) { | |||
104 | QCopEnvelope e3("QPE/Bluetooth", "listDevices()"); | 104 | QCopEnvelope e3("QPE/Bluetooth", "listDevices()"); |
105 | } | 105 | } |
106 | QTimer::singleShot(5000, this, SLOT(testIt() ) ); | ||
107 | } | 106 | } |
108 | void SendWidget::slotIrDaDevices( const QStringList& list) { | 107 | void SendWidget::slotIrDaDevices( const QStringList& list) { |
108 | qWarning("slot it irda devices "); | ||
109 | m_irDa = list; | 109 | m_irDa = list; |
110 | m_start = 0; | 110 | m_start = 0; |
111 | for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) | 111 | for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) |
112 | m_devBox->addDevice( (*it), DeviceBox::IrDa, tr("Scheduling for beam.") ); | 112 | m_devBox->addDevice( (*it), DeviceBox::IrDa, tr("Scheduling for beam.") ); |
113 | m_devBox->removeDevice( tr("Search for IrDa Devices.") ); | 113 | |
114 | m_devBox->removeDevice( tr("Searching for IrDa Devices.") ); | ||
114 | 115 | ||
115 | slotStartIrda(); | 116 | slotStartIrda(); |
@@ -127,4 +128,5 @@ void SendWidget::slotSelectedDevice( const QString& name, int dev ) { | |||
127 | for (QStringList::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it ) | 128 | for (QStringList::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it ) |
128 | m_devBox->removeDevice( (*it) ); | 129 | m_devBox->removeDevice( (*it) ); |
130 | |||
129 | QCopEnvelope e2("QPE/IrDaApplet", "listDevices()"); | 131 | QCopEnvelope e2("QPE/IrDaApplet", "listDevices()"); |
130 | } | 132 | } |
@@ -132,5 +134,5 @@ void SendWidget::slotSelectedDevice( const QString& name, int dev ) { | |||
132 | void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) { | 134 | void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) { |
133 | qWarning("dispatch irda %s", str.data() ); | 135 | qWarning("dispatch irda %s", str.data() ); |
134 | if ( str == "listDevices(QStringList)" ) { | 136 | if ( str == "devices(QStringList)" ) { |
135 | QDataStream stream( ar, IO_ReadOnly ); | 137 | QDataStream stream( ar, IO_ReadOnly ); |
136 | QStringList list; | 138 | QStringList list; |
@@ -146,11 +148,12 @@ void SendWidget::slotIrError( int ) { | |||
146 | } | 148 | } |
147 | void SendWidget::slotIrSent( bool b) { | 149 | void SendWidget::slotIrSent( bool b) { |
150 | qWarning("irda sent!!"); | ||
148 | QString text = b ? tr("Sent") : tr("Failure"); | 151 | QString text = b ? tr("Sent") : tr("Failure"); |
149 | m_devBox->setStatus( m_irDa[m_start], text ); | 152 | // m_devBox->setStatus( m_irDa[m_start], text ); |
150 | m_start++; | 153 | m_start++; |
151 | slotStartIrda(); | 154 | slotStartIrda(); |
152 | } | 155 | } |
153 | void SendWidget::slotIrTry(unsigned int trI) { | 156 | void SendWidget::slotIrTry(unsigned int trI) { |
154 | m_devBox->setStatus( m_irDa[m_start], tr("Try %1").arg( QString::number( trI ) ) ); | 157 | // m_devBox->setStatus( m_irDa[m_start], tr("Try %1").arg( QString::number( trI ) ) ); |
155 | } | 158 | } |
156 | void SendWidget::slotStartIrda() { | 159 | void SendWidget::slotStartIrda() { |
@@ -159,5 +162,5 @@ void SendWidget::slotStartIrda() { | |||
159 | return; | 162 | return; |
160 | } | 163 | } |
161 | m_devBox->setStatus( m_irDa[m_start], tr("Start sending") ); | 164 | // m_devBox->setStatus( m_irDa[m_start], tr("Start sending") ); |
162 | m_obex->send( m_file ); | 165 | m_obex->send( m_file ); |
163 | } | 166 | } |