author | zecke <zecke> | 2004-10-16 21:06:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-16 21:06:28 (UTC) |
commit | 999a0f2d22f132005bde62558ace48a0ce8b1dcc (patch) (side-by-side diff) | |
tree | 75f528b52a8a89289925e62bbd4c48d316c8ddcf /noncore/apps/opie-console/sz_transfer.cpp | |
parent | e70f226f5c4c2f488f6c4406034a04e128c0ca93 (diff) | |
download | opie-999a0f2d22f132005bde62558ace48a0ce8b1dcc.zip opie-999a0f2d22f132005bde62558ace48a0ce8b1dcc.tar.gz opie-999a0f2d22f132005bde62558ace48a0ce8b1dcc.tar.bz2 |
-Remove never finished classes by ibotty for the console widget
-Put setCurrent into ComboboxHelper and remove duplication from the
dialogs
-Remove old and unneeded debug output
-IOBt, IOIrda can share the implementation for sening,recieving
and supports with IOSerial
Diffstat (limited to 'noncore/apps/opie-console/sz_transfer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/sz_transfer.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/noncore/apps/opie-console/sz_transfer.cpp b/noncore/apps/opie-console/sz_transfer.cpp index f505998..3299e33 100644 --- a/noncore/apps/opie-console/sz_transfer.cpp +++ b/noncore/apps/opie-console/sz_transfer.cpp @@ -19,68 +19,51 @@ void SzTransfer::sendFile(const QFile& file) { sendFile(file.name()); } void SzTransfer::sendFile(const QString& file) { //setcbreak(2); /* raw no echo */ proc = new OProcess; *proc << "sz"; *proc << "-v" << "-v" << "-b" << file; connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT(sent())); connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), this, SLOT(SzReceivedStdout(Opie::Core::OProcess*,char*,int))); connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT(SzReceivedStderr(Opie::Core::OProcess*,char*,int))); connect(layer(), SIGNAL(received(const QByteArray&)), this, SLOT(receivedStdin(const QByteArray&))); proc->start(OProcess::NotifyOnExit, OProcess::All); } void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { - - owarn << "recieved from sz on stdout " << buflen << " bytes" << oendl; - QByteArray data(buflen); data.fill(*buffer, buflen); + +#ifdef DEBUG_RECEIVE for (uint i = 0; i < data.count(); i++ ) { printf("%c", buffer[i] ); } printf("\n"); +#endif // send out through the io layer layer()->send(data); } void SzTransfer::SzReceivedStderr(OProcess *, char *buffer, int length) { - - // parse and show data in a progress dialog/widget - printf("stderr:\n"); - //for (int i = 0; i < length; i++) - // printf("%c", buffer[i]); - //printf("\n"); } void SzTransfer::receivedStdin(const QByteArray &data) { - - owarn << "recieved from io_serial " << data.size() << " bytes" << oendl; - // recieved data from the io layer goes to sz proc->writeStdin(data.data(), data.size()); - } void SzTransfer::sent() { - - owarn << "sent file" << oendl; - - //setcbreak(0); /* default */ - - delete proc; disconnect(layer(), SIGNAL(received(const QByteArray&)), this, SLOT(receivedStdin(const QByteArray&))); - } |