-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 13954c5..58f97fa 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -23,24 +23,28 @@ #include "rfcommassigndialogimpl.h" #include "forwarder.h" #include "servicesdialog.h" #include <termios.h> #include <string.h> #include <errno.h> /* OPIE */ #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> #include <opie2/odebug.h> +#ifdef Q_WS_QWS +#include <qpe/qcopenvelope_qws.h> +#endif + using namespace Opie::Core; /* QT */ #include <qframe.h> #include <qlabel.h> #include <qpushbutton.h> #include <qlayout.h> #include <qvariant.h> #include <qimage.h> #include <qpixmap.h> #include <qtabwidget.h> #include <qscrollview.h> @@ -679,24 +683,32 @@ void BlueBase::startScan() void BlueBase::setInfo() { StatusLabel->setText( status() ); } /** * Decontructor */ BlueBase::~BlueBase() { writeSavedDevices(); + if (forwarder) { +#if defined(Q_WS_QWS) && !defined(QT_NO_COP) + QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) + << QPEApplication::Enable; +#endif + delete forwarder; + forwarder = NULL; + } delete m_iconLoader; } /** * find searches the ListView for a BTDeviceItem containig * the same Device if found return true else false * @param dev RemoteDevice to find * @return returns true if found */ bool BlueBase::find( const RemoteDevice& rem ) { @@ -729,31 +741,39 @@ void BlueBase::doForward() return; } QString str = serDevName->text(); 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) { QMessageBox::critical(this, tr("Forwarder Error"), tr("Forwarder start error:") + tr(strerror(errno))); return; } runButton->setText("stop gateway"); +#if defined(Q_WS_QWS) && !defined(QT_NO_COP) + QCopEnvelope("QPE/System", "setScreenSaverMode(int)") + << QPEApplication::DisableSuspend; +#endif } /** * React on the process end */ void BlueBase::forwardExit(Opie::Core::OProcess* proc) { +#if defined(Q_WS_QWS) && !defined(QT_NO_COP) + QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) + << QPEApplication::Enable; +#endif if (proc->exitStatus() != 0) QMessageBox::critical(this, tr("Forwarder Error"), tr("Forwarder start error")); delete proc; forwarder = NULL; runButton->setText("start gateway"); } /** * Encrypt entered passkey * doit - do encryption of the key */ |