author | korovkin <korovkin> | 2006-04-30 08:54:54 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-04-30 08:54:54 (UTC) |
commit | 2f32b6d589d389848c5c73ba2e5ad13117c1da9e (patch) (side-by-side diff) | |
tree | ec8a086ad17e3fa9014baa9476ab9cc77c5c29dc | |
parent | b91d3399fbd3178085e9d0fc5faeefbe31c674b7 (diff) | |
download | opie-2f32b6d589d389848c5c73ba2e5ad13117c1da9e.zip opie-2f32b6d589d389848c5c73ba2e5ad13117c1da9e.tar.gz opie-2f32b6d589d389848c5c73ba2e5ad13117c1da9e.tar.bz2 |
Fixed bug with suspend reenabling.
Made some minor formatting.
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 39 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexftpdialog.cpp | 2 |
2 files changed, 29 insertions, 12 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 58f97fa..85385d8 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -696,4 +696,7 @@ BlueBase::~BlueBase() #if defined(Q_WS_QWS) && !defined(QT_NO_COP) - QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) - << QPEApplication::Enable; + { + odebug << "SUSP: Enable suspend mode" << oendl; + QCopEnvelope e("QPE/System", "setScreenSaverMode(int)" ); + e << QPEApplication::Enable; + } #endif @@ -740,2 +743,9 @@ void BlueBase::doForward() forwarder = NULL; +#if defined(Q_WS_QWS) && !defined(QT_NO_COP) + { + odebug << "SUSP: Enable suspend mode" << oendl; + QCopEnvelope e("QPE/System", "setScreenSaverMode(int)" ); + e << QPEApplication::Enable; + } +#endif return; @@ -744,4 +754,2 @@ void BlueBase::doForward() forwarder = new SerialForwarder(str, speeds[serSpeed->currentItem()].val); - connect(forwarder, SIGNAL(processExited(Opie::Core::OProcess*)), - this, SLOT(forwardExited(Opie::Core::OProcess*))); if (forwarder->start(OProcess::NotifyOnExit) < 0) { @@ -751,6 +759,11 @@ void BlueBase::doForward() } + connect(forwarder, SIGNAL(processExited(Opie::Core::OProcess*)), + this, SLOT(forwardExited(Opie::Core::OProcess*))); runButton->setText("stop gateway"); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) - QCopEnvelope("QPE/System", "setScreenSaverMode(int)") - << QPEApplication::DisableSuspend; + { + odebug << "SUSP: Disable suspend mode" << oendl; + QCopEnvelope e("QPE/System", "setScreenSaverMode(int)"); + e << QPEApplication::DisableSuspend; + } #endif @@ -763,5 +776,12 @@ void BlueBase::forwardExit(Opie::Core::OProcess* proc) { + odebug << "Process exited" << oendl; #if defined(Q_WS_QWS) && !defined(QT_NO_COP) - QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) - << QPEApplication::Enable; + if (forwarder) { + delete forwarder; + forwarder = NULL; + runButton->setText("start gateway"); + odebug << "SUSP: Enable suspend mode" << oendl; + QCopEnvelope e("QPE/System", "setScreenSaverMode(int)" ); + e << QPEApplication::Enable; + } #endif @@ -770,5 +790,2 @@ void BlueBase::forwardExit(Opie::Core::OProcess* proc) tr("Forwarder start error")); - delete proc; - forwarder = NULL; - runButton->setText("start gateway"); } diff --git a/noncore/net/opietooth/manager/obexftpdialog.cpp b/noncore/net/opietooth/manager/obexftpdialog.cpp index fd2015e..2f04ecf 100644 --- a/noncore/net/opietooth/manager/obexftpdialog.cpp +++ b/noncore/net/opietooth/manager/obexftpdialog.cpp @@ -280,3 +280,3 @@ void ObexFtpDialog::getFile() if (result < 0) { - log(file2get + QString(" receive ERROR:\n") + tr(strerror(errno))); + log(file2get + QString(" receive ERROR:\n") + tr(strerror(errno))); errBox(file2get + QString(" receive ERROR")); |