summaryrefslogtreecommitdiff
path: root/noncore/apps
Unidiff
Diffstat (limited to 'noncore/apps') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp4
-rw-r--r--noncore/apps/advancedfm/output.cpp4
-rw-r--r--noncore/apps/opie-console/io_bt.cpp3
-rw-r--r--noncore/apps/opie-console/io_irda.cpp3
-rw-r--r--noncore/apps/opie-console/sz_transfer.cpp4
5 files changed, 8 insertions, 10 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index a694b70..6d41ac3 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -696,28 +696,28 @@ void AdvancedFm::fileBeamFinished( Ir *) {
696 696
697void AdvancedFm::selectAll() { 697void AdvancedFm::selectAll() {
698 QListView *thisView = CurrentView(); 698 QListView *thisView = CurrentView();
699 thisView->selectAll(true); 699 thisView->selectAll(true);
700 thisView->setSelected( thisView->firstChild(),false); 700 thisView->setSelected( thisView->firstChild(),false);
701} 701}
702 702
703void AdvancedFm::startProcess(const QString & cmd) { 703void AdvancedFm::startProcess(const QString & cmd) {
704 QStringList command; 704 QStringList command;
705 OProcess *process; 705 OProcess *process;
706 process = new OProcess(); 706 process = new OProcess();
707 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), 707 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
708 this, SLOT( processEnded(OProcess*))); 708 this, SLOT( processEnded(Opie::Core::OProcess*)));
709 709
710 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), 710 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
711 this, SLOT( oprocessStderr(OProcess*,char*,int))); 711 this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
712 712
713 command << "/bin/sh"; 713 command << "/bin/sh";
714 command << "-c"; 714 command << "-c";
715 command << cmd.latin1(); 715 command << cmd.latin1();
716 *process << command; 716 *process << command;
717 if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) 717 if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
718 qDebug("could not start process"); 718 qDebug("could not start process");
719} 719}
720 720
721void AdvancedFm::processEnded(OProcess *) { 721void AdvancedFm::processEnded(OProcess *) {
722 rePopulate(); 722 rePopulate();
723} 723}
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp
index 16a0992..6906298 100644
--- a/noncore/apps/advancedfm/output.cpp
+++ b/noncore/apps/advancedfm/output.cpp
@@ -138,28 +138,28 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name,
138 // docButton->setFlat(TRUE); 138 // docButton->setFlat(TRUE);
139 OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); 139 OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 );
140 140
141 OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); 141 OutputEdit = new QMultiLineEdit( this, "OutputEdit" );
142 OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); 142 OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 );
143 143
144 proc = new OProcess(); 144 proc = new OProcess();
145 145
146 connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), 146 connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)),
147 this, SLOT( processFinished())); 147 this, SLOT( processFinished()));
148 148
149 connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), 149 connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),
150 this, SLOT(commandStdout(OProcess*,char*,int))); 150 this, SLOT(commandStdout(Opie::Core::OProcess*,char*,int)));
151 151
152 connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), 152 connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),
153 this, SLOT(commandStderr(OProcess*,char*,int))); 153 this, SLOT(commandStderr(Opie::Core::OProcess*,char*,int)));
154 154
155// connect( , SIGNAL(received(const QByteArray&)), 155// connect( , SIGNAL(received(const QByteArray&)),
156// this, SLOT(commandStdin(const QByteArray&))); 156// this, SLOT(commandStdin(const QByteArray&)));
157 157
158// * proc << commands.latin1(); 158// * proc << commands.latin1();
159 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { 159 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) {
160 qDebug( "%s", (*it).latin1() ); 160 qDebug( "%s", (*it).latin1() );
161 * proc << (*it).latin1(); 161 * proc << (*it).latin1();
162 } 162 }
163 163
164 if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { 164 if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) {
165 165
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp
index 35a328f..a29fa8e 100644
--- a/noncore/apps/opie-console/io_bt.cpp
+++ b/noncore/apps/opie-console/io_bt.cpp
@@ -1,17 +1,16 @@
1 1
2#include "io_bt.h" 2#include "io_bt.h"
3 3
4using namespace Opie::Core; 4using namespace Opie::Core;
5using namespace Opie::Core;
6IOBt::IOBt( const Profile &config ) : IOSerial( config ) { 5IOBt::IOBt( const Profile &config ) : IOSerial( config ) {
7 m_attach = 0; 6 m_attach = 0;
8} 7}
9 8
10 9
11IOBt::~IOBt() { 10IOBt::~IOBt() {
12 if ( m_attach ) { 11 if ( m_attach ) {
13 delete m_attach; 12 delete m_attach;
14 } 13 }
15} 14}
16 15
17 16
@@ -30,25 +29,25 @@ bool IOBt::open() {
30 29
31 // only set up bt stuff if mac address was set, otherwise use the device set 30 // only set up bt stuff if mac address was set, otherwise use the device set
32 if ( !m_mac.isEmpty() ) { 31 if ( !m_mac.isEmpty() ) {
33 32
34 // now it should also be checked, if there is a connection to the device with that mac allready 33 // now it should also be checked, if there is a connection to the device with that mac allready
35 // hciattach here 34 // hciattach here
36 m_attach = new OProcess(); 35 m_attach = new OProcess();
37 *m_attach << "hciattach /dev/ttyS2 any 57600"; 36 *m_attach << "hciattach /dev/ttyS2 any 57600";
38 37
39 // then start hcid, then rcfomm handling (m_mac) 38 // then start hcid, then rcfomm handling (m_mac)
40 39
41 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), 40 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
42 this, SLOT( slotExited(OProcess*) ) ); 41 this, SLOT( slotExited(Opie::Core::OProcess*) ) );
43 42
44 if ( m_attach->start() ) { 43 if ( m_attach->start() ) {
45 ret = IOSerial::open(); 44 ret = IOSerial::open();
46 } else { 45 } else {
47 qWarning("could not attach to device"); 46 qWarning("could not attach to device");
48 delete m_attach; 47 delete m_attach;
49 m_attach = 0; 48 m_attach = 0;
50 } 49 }
51 } else { 50 } else {
52 // directly to the normal serial 51 // directly to the normal serial
53 // TODO: look first if the connection really exists. ( is set up ) 52 // TODO: look first if the connection really exists. ( is set up )
54 53
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index ba0b0e5..07c2b62 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -1,17 +1,16 @@
1 1
2#include "io_irda.h" 2#include "io_irda.h"
3 3
4using namespace Opie::Core; 4using namespace Opie::Core;
5using namespace Opie::Core;
6IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { 5IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) {
7 m_attach = 0; 6 m_attach = 0;
8} 7}
9 8
10 9
11IOIrda::~IOIrda() { 10IOIrda::~IOIrda() {
12 if ( m_attach ) { 11 if ( m_attach ) {
13 delete m_attach; 12 delete m_attach;
14 } 13 }
15} 14}
16 15
17 16
@@ -21,25 +20,25 @@ void IOIrda::close() {
21 // still need error handling 20 // still need error handling
22 delete m_attach; 21 delete m_attach;
23} 22}
24 23
25bool IOIrda::open() { 24bool IOIrda::open() {
26 bool ret; 25 bool ret;
27 26
28 // irdaattach here 27 // irdaattach here
29 m_attach = new OProcess(); 28 m_attach = new OProcess();
30 *m_attach << "irattach /dev/ttyS2 -s"; 29 *m_attach << "irattach /dev/ttyS2 -s";
31 30
32 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), 31 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
33 this, SLOT( slotExited(OProcess*) ) ); 32 this, SLOT( slotExited(Opie::Core::OProcess*) ) );
34 33
35 if ( m_attach->start() ) { 34 if ( m_attach->start() ) {
36 ret= IOSerial::open(); 35 ret= IOSerial::open();
37 } else { 36 } else {
38 // emit error!!! 37 // emit error!!!
39 qWarning("could not attach to device"); 38 qWarning("could not attach to device");
40 delete m_attach; 39 delete m_attach;
41 m_attach = 0l; 40 m_attach = 0l;
42 } 41 }
43 return ret; 42 return ret;
44} 43}
45 44
diff --git a/noncore/apps/opie-console/sz_transfer.cpp b/noncore/apps/opie-console/sz_transfer.cpp
index 5958e93..fbc5306 100644
--- a/noncore/apps/opie-console/sz_transfer.cpp
+++ b/noncore/apps/opie-console/sz_transfer.cpp
@@ -21,27 +21,27 @@ void SzTransfer::sendFile(const QFile& file) {
21} 21}
22 22
23void SzTransfer::sendFile(const QString& file) { 23void SzTransfer::sendFile(const QString& file) {
24 24
25 //setcbreak(2); /* raw no echo */ 25 //setcbreak(2); /* raw no echo */
26 26
27 proc = new OProcess; 27 proc = new OProcess;
28 *proc << "sz"; 28 *proc << "sz";
29 *proc << "-v" << "-v" << "-b" << file; 29 *proc << "-v" << "-v" << "-b" << file;
30 connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), 30 connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)),
31 this, SLOT(sent())); 31 this, SLOT(sent()));
32 connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), 32 connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),
33 this, SLOT(SzReceivedStdout(OProcess*,char*,int))); 33 this, SLOT(SzReceivedStdout(Opie::Core::OProcess*,char*,int)));
34 connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), 34 connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),
35 this, SLOT(SzReceivedStderr(OProcess*,char*,int))); 35 this, SLOT(SzReceivedStderr(Opie::Core::OProcess*,char*,int)));
36 connect(layer(), SIGNAL(received(const QByteArray&)), 36 connect(layer(), SIGNAL(received(const QByteArray&)),
37 this, SLOT(receivedStdin(const QByteArray&))); 37 this, SLOT(receivedStdin(const QByteArray&)));
38 proc->start(OProcess::NotifyOnExit, OProcess::All); 38 proc->start(OProcess::NotifyOnExit, OProcess::All);
39 39
40} 40}
41 41
42void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { 42void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) {
43 43
44 qWarning("recieved from sz on stdout %d bytes", buflen); 44 qWarning("recieved from sz on stdout %d bytes", buflen);
45 45
46 QByteArray data(buflen); 46 QByteArray data(buflen);
47 data.fill(*buffer, buflen); 47 data.fill(*buffer, buflen);