author | zecke <zecke> | 2004-03-14 16:13:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 16:13:28 (UTC) |
commit | f3d284849df36ef281dcb5aa2d00f613e3a354d8 (patch) (unidiff) | |
tree | 65406b10a839ffa1ba683f59e61ef7227a0093d1 /noncore/apps | |
parent | f12af18557c8f376f0c6c30e80a85737ff6c592e (diff) | |
download | opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.zip opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.gz opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.bz2 |
Fix up depends on LIBOPIE1
Proper signature for signal and slots and namespaces
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_bt.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_irda.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/sz_transfer.cpp | 4 |
5 files changed, 10 insertions, 12 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 | |||
@@ -11,50 +11,50 @@ | |||
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | #include "advancedfm.h" | 12 | #include "advancedfm.h" |
13 | #include "output.h" | 13 | #include "output.h" |
14 | #include "filePermissions.h" | 14 | #include "filePermissions.h" |
15 | 15 | ||
16 | #include <qpe/lnkproperties.h> | 16 | #include <qpe/lnkproperties.h> |
17 | #include <qpe/qpeapplication.h> | 17 | #include <qpe/qpeapplication.h> |
18 | #include <qpe/applnk.h> | 18 | #include <qpe/applnk.h> |
19 | 19 | ||
20 | #include <qmessagebox.h> | 20 | #include <qmessagebox.h> |
21 | 21 | ||
22 | 22 | ||
23 | #include <qpopupmenu.h> | 23 | #include <qpopupmenu.h> |
24 | #include <qlistview.h> | 24 | #include <qlistview.h> |
25 | 25 | ||
26 | #include <errno.h> | 26 | #include <errno.h> |
27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
30 | #include <dirent.h> | 30 | #include <dirent.h> |
31 | #include <sys/sendfile.h> | 31 | #include <sys/sendfile.h> |
32 | #include <fcntl.h> | 32 | #include <fcntl.h> |
33 | 33 | ||
34 | 34 | ||
35 | using namespace Opie::Core; | 35 | using namespace Opie::Core; |
36 | using namespace Opie::Core; | 36 | using namespace Opie::Core; |
37 | void AdvancedFm::doDirChange() { | 37 | void AdvancedFm::doDirChange() { |
38 | QString pathItem = CurrentView()->currentItem()->text(0); | 38 | QString pathItem = CurrentView()->currentItem()->text(0); |
39 | if( pathItem == "../") { | 39 | if( pathItem == "../") { |
40 | ListClicked( CurrentView()->currentItem()); | 40 | ListClicked( CurrentView()->currentItem()); |
41 | } else { | 41 | } else { |
42 | if( pathItem.find(" -> ",0,TRUE) != -1) | 42 | if( pathItem.find(" -> ",0,TRUE) != -1) |
43 | pathItem = dealWithSymName((const QString&)pathItem)+"/"; | 43 | pathItem = dealWithSymName((const QString&)pathItem)+"/"; |
44 | // qWarning(pathItem); | 44 | // qWarning(pathItem); |
45 | gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) ); | 45 | gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) ); |
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||
49 | void AdvancedFm::showMenuHidden() { | 49 | void AdvancedFm::showMenuHidden() { |
50 | if (b) { | 50 | if (b) { |
51 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 51 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
52 | OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 52 | OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
53 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 53 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
54 | } else { | 54 | } else { |
55 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 55 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
56 | OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 56 | OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
57 | fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); | 57 | fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); |
58 | } | 58 | } |
59 | b = !b; | 59 | b = !b; |
60 | populateView(); | 60 | populateView(); |
@@ -684,52 +684,52 @@ void AdvancedFm::doBeam() { | |||
684 | } | 684 | } |
685 | Ir *file = new Ir(this, "IR"); | 685 | Ir *file = new Ir(this, "IR"); |
686 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*))); | 686 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*))); |
687 | file->send( curFilePath, curFile ); | 687 | file->send( curFilePath, curFile ); |
688 | } | 688 | } |
689 | } | 689 | } |
690 | } | 690 | } |
691 | } | 691 | } |
692 | 692 | ||
693 | void AdvancedFm::fileBeamFinished( Ir *) { | 693 | void AdvancedFm::fileBeamFinished( Ir *) { |
694 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); | 694 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); |
695 | } | 695 | } |
696 | 696 | ||
697 | void AdvancedFm::selectAll() { | 697 | void 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 | ||
703 | void AdvancedFm::startProcess(const QString & cmd) { | 703 | void 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 | ||
721 | void AdvancedFm::processEnded(OProcess *) { | 721 | void AdvancedFm::processEnded(OProcess *) { |
722 | rePopulate(); | 722 | rePopulate(); |
723 | } | 723 | } |
724 | 724 | ||
725 | void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { | 725 | void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { |
726 | // qWarning("received stderrt %d bytes", buflen); | 726 | // qWarning("received stderrt %d bytes", buflen); |
727 | 727 | ||
728 | QString lineStr = buffer; | 728 | QString lineStr = buffer; |
729 | QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); | 729 | QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); |
730 | } | 730 | } |
731 | 731 | ||
732 | bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { | 732 | bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { |
733 | if ( o->inherits( "QLineEdit" ) ) { | 733 | if ( o->inherits( "QLineEdit" ) ) { |
734 | if ( e->type() == QEvent::KeyPress ) { | 734 | if ( e->type() == QEvent::KeyPress ) { |
735 | QKeyEvent *ke = (QKeyEvent*)e; | 735 | QKeyEvent *ke = (QKeyEvent*)e; |
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 | |||
@@ -126,52 +126,52 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, | |||
126 | setName( tr("Output")); | 126 | setName( tr("Output")); |
127 | resize( 196, 269 ); | 127 | resize( 196, 269 ); |
128 | setCaption( name ); | 128 | setCaption( name ); |
129 | 129 | ||
130 | OutputLayout = new QGridLayout( this ); | 130 | OutputLayout = new QGridLayout( this ); |
131 | OutputLayout->setSpacing( 2); | 131 | OutputLayout->setSpacing( 2); |
132 | OutputLayout->setMargin( 2); | 132 | OutputLayout->setMargin( 2); |
133 | 133 | ||
134 | QPushButton *docButton; | 134 | QPushButton *docButton; |
135 | docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); | 135 | docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); |
136 | docButton->setFixedSize( QSize( 20, 20 ) ); | 136 | docButton->setFixedSize( QSize( 20, 20 ) ); |
137 | connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); | 137 | connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); |
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 | ||
166 | OutputEdit->append(tr("Process could not start") ); | 166 | OutputEdit->append(tr("Process could not start") ); |
167 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 167 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
168 | perror("Error: "); | 168 | perror("Error: "); |
169 | QString errorMsg=tr("Error\n")+(QString)strerror(errno); | 169 | QString errorMsg=tr("Error\n")+(QString)strerror(errno); |
170 | OutputEdit->append( errorMsg); | 170 | OutputEdit->append( errorMsg); |
171 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 171 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | Output::~Output() { | 175 | Output::~Output() { |
176 | } | 176 | } |
177 | 177 | ||
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,66 +1,65 @@ | |||
1 | 1 | ||
2 | #include "io_bt.h" | 2 | #include "io_bt.h" |
3 | 3 | ||
4 | using namespace Opie::Core; | 4 | using namespace Opie::Core; |
5 | using namespace Opie::Core; | ||
6 | IOBt::IOBt( const Profile &config ) : IOSerial( config ) { | 5 | IOBt::IOBt( const Profile &config ) : IOSerial( config ) { |
7 | m_attach = 0; | 6 | m_attach = 0; |
8 | } | 7 | } |
9 | 8 | ||
10 | 9 | ||
11 | IOBt::~IOBt() { | 10 | IOBt::~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 | ||
18 | void IOBt::close() { | 17 | void IOBt::close() { |
19 | 18 | ||
20 | IOSerial::close(); | 19 | IOSerial::close(); |
21 | // still need error handling | 20 | // still need error handling |
22 | if ( m_attach ) { | 21 | if ( m_attach ) { |
23 | delete m_attach; | 22 | delete m_attach; |
24 | m_attach = 0; | 23 | m_attach = 0; |
25 | } | 24 | } |
26 | } | 25 | } |
27 | 26 | ||
28 | bool IOBt::open() { | 27 | bool IOBt::open() { |
29 | bool ret = false; | 28 | bool ret = false; |
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 | ||
55 | ret =IOSerial::open(); | 54 | ret =IOSerial::open(); |
56 | } | 55 | } |
57 | return ret; | 56 | return ret; |
58 | } | 57 | } |
59 | 58 | ||
60 | void IOBt::reload( const Profile &config ) { | 59 | void IOBt::reload( const Profile &config ) { |
61 | m_device = config.readEntry("Device", BT_DEFAULT_DEVICE); | 60 | m_device = config.readEntry("Device", BT_DEFAULT_DEVICE); |
62 | m_mac = config.readEntry("Mac", BT_DEFAULT_MAC); | 61 | m_mac = config.readEntry("Mac", BT_DEFAULT_MAC); |
63 | m_baud = config.readNumEntry("Baud", BT_DEFAULT_BAUD); | 62 | m_baud = config.readNumEntry("Baud", BT_DEFAULT_BAUD); |
64 | m_parity = config.readNumEntry("Parity", BT_DEFAULT_PARITY); | 63 | m_parity = config.readNumEntry("Parity", BT_DEFAULT_PARITY); |
65 | m_dbits = config.readNumEntry("DataBits", BT_DEFAULT_DBITS); | 64 | m_dbits = config.readNumEntry("DataBits", BT_DEFAULT_DBITS); |
66 | m_sbits = config.readNumEntry("StopBits", BT_DEFAULT_SBITS); | 65 | m_sbits = config.readNumEntry("StopBits", BT_DEFAULT_SBITS); |
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,57 +1,56 @@ | |||
1 | 1 | ||
2 | #include "io_irda.h" | 2 | #include "io_irda.h" |
3 | 3 | ||
4 | using namespace Opie::Core; | 4 | using namespace Opie::Core; |
5 | using namespace Opie::Core; | ||
6 | IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { | 5 | IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { |
7 | m_attach = 0; | 6 | m_attach = 0; |
8 | } | 7 | } |
9 | 8 | ||
10 | 9 | ||
11 | IOIrda::~IOIrda() { | 10 | IOIrda::~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 | ||
18 | void IOIrda::close() { | 17 | void IOIrda::close() { |
19 | 18 | ||
20 | IOSerial::close(); | 19 | IOSerial::close(); |
21 | // still need error handling | 20 | // still need error handling |
22 | delete m_attach; | 21 | delete m_attach; |
23 | } | 22 | } |
24 | 23 | ||
25 | bool IOIrda::open() { | 24 | bool 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 | ||
46 | void IOIrda::reload( const Profile &config ) { | 45 | void IOIrda::reload( const Profile &config ) { |
47 | m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); | 46 | m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); |
48 | m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); | 47 | m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); |
49 | m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); | 48 | m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); |
50 | m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS); | 49 | m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS); |
51 | m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS); | 50 | m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS); |
52 | m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW); | 51 | m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW); |
53 | } | 52 | } |
54 | 53 | ||
55 | 54 | ||
56 | QString IOIrda::identifier() const { | 55 | QString IOIrda::identifier() const { |
57 | return "irda"; | 56 | return "irda"; |
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 | |||
@@ -9,51 +9,51 @@ | |||
9 | using namespace Opie::Core; | 9 | using namespace Opie::Core; |
10 | using namespace Opie::Core; | 10 | using namespace Opie::Core; |
11 | SzTransfer::SzTransfer(Type t, IOLayer *layer) : FileTransferLayer(layer), m_t(t) | 11 | SzTransfer::SzTransfer(Type t, IOLayer *layer) : FileTransferLayer(layer), m_t(t) |
12 | { | 12 | { |
13 | } | 13 | } |
14 | 14 | ||
15 | SzTransfer::~SzTransfer() { | 15 | SzTransfer::~SzTransfer() { |
16 | } | 16 | } |
17 | 17 | ||
18 | void SzTransfer::sendFile(const QFile& file) { | 18 | void SzTransfer::sendFile(const QFile& file) { |
19 | 19 | ||
20 | sendFile(file.name()); | 20 | sendFile(file.name()); |
21 | } | 21 | } |
22 | 22 | ||
23 | void SzTransfer::sendFile(const QString& file) { | 23 | void 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 | ||
42 | void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { | 42 | void 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); |
48 | for (uint i = 0; i < data.count(); i++ ) { | 48 | for (uint i = 0; i < data.count(); i++ ) { |
49 | printf("%c", buffer[i] ); | 49 | printf("%c", buffer[i] ); |
50 | } | 50 | } |
51 | printf("\n"); | 51 | printf("\n"); |
52 | 52 | ||
53 | // send out through the io layer | 53 | // send out through the io layer |
54 | layer()->send(data); | 54 | layer()->send(data); |
55 | } | 55 | } |
56 | 56 | ||
57 | void SzTransfer::SzReceivedStderr(OProcess *, char *buffer, int length) { | 57 | void SzTransfer::SzReceivedStderr(OProcess *, char *buffer, int length) { |
58 | 58 | ||
59 | // parse and show data in a progress dialog/widget | 59 | // parse and show data in a progress dialog/widget |