author | korovkin <korovkin> | 2006-04-24 19:09:42 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-04-24 19:09:42 (UTC) |
commit | 8856190fa34ad67488adc137dc7c8646d0689795 (patch) (side-by-side diff) | |
tree | a9f6f610ec63a35dfec922020d3627026dc81884 /noncore/net/opietooth/manager/obexdialog.cpp | |
parent | 71722eacaa44f3b738318d68dc6148c9e2ff643d (diff) | |
download | opie-8856190fa34ad67488adc137dc7c8646d0689795.zip opie-8856190fa34ad67488adc137dc7c8646d0689795.tar.gz opie-8856190fa34ad67488adc137dc7c8646d0689795.tar.bz2 |
Improved diagnostic messages.
Added LOG saving functionality.
Diffstat (limited to 'noncore/net/opietooth/manager/obexdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/obexdialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index d3fdd14..8d7b593 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp @@ -64,77 +64,77 @@ ObexDialog::ObexDialog(const QString& device, QWidget* parent, const char* name connect(obexSend, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT(slotProcessExited(Opie::Core::OProcess*))); connect(obexSend, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int)), this, SLOT(slotPushOut(Opie::Core::OProcess*, char*, int))); connect(obexSend, SIGNAL(receivedStderr(Opie::Core::OProcess*, char*, int)), this, SLOT(slotPushErr(Opie::Core::OProcess*, char*, int))); } ObexDialog::~ObexDialog() { if (obexSend->isRunning()) obexSend->kill(); delete obexSend; obexSend = NULL; } void ObexDialog::browse() { MimeTypes types; QStringList all; all << "*/*"; types.insert("All Files", all ); QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); cmdLine->setText( str ); statLine->setText( tr("Ready") ); } void ObexDialog::sendData() { QString fileURL = cmdLine->text(); QString file = QFileInfo( fileURL ).fileName(); QString modifiedName = chNameLine->text(); QString execName = "ussp-push"; if (obexSend->isRunning()) return; obexSend->clearArguments(); // vom popupmenu beziehen if ( !modifiedName.isEmpty() ) { *obexSend << execName << "--timeo 30" << m_device << fileURL << modifiedName; } else { *obexSend << execName << "--timeo 30" << m_device << fileURL << file; } obexSend->setUseShell(true); if (!obexSend->start(OProcess::NotifyOnExit, OProcess::All) ) { statLine->setText( tr("Error: couln't start process") ); } - else - statLine->setText( tr("Sending") ); + else + statLine->setText( tr("Sending") ); } void ObexDialog::slotPushOut(OProcess*, char* buf, int len) { QCString str(buf, len); status->append(str); } void ObexDialog::slotPushErr(OProcess*, char* buf, int len) { QCString str(buf, len); status->append(str); } void ObexDialog::slotProcessExited(OProcess*) { if (obexSend == NULL) return; if (obexSend->normalExit()) { status->append( tr("Finished with result ") ); status->append( QString::number(obexSend->exitStatus()) ); status->append( tr("\n") ); odebug << obexSend->exitStatus() << oendl; statLine->setText( tr("Finished: ") + tr(strerror(obexSend->exitStatus())) ); } else { status->append( tr("Exited abnormally\n") ); statLine->setText( tr("Exited abnormally") ); } } |