summaryrefslogtreecommitdiff
path: root/noncore/tools/remote/recorddialog.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/tools/remote/recorddialog.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/tools/remote/recorddialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/recorddialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/tools/remote/recorddialog.cpp b/noncore/tools/remote/recorddialog.cpp
index cfab730..1ce5472 100644
--- a/noncore/tools/remote/recorddialog.cpp
+++ b/noncore/tools/remote/recorddialog.cpp
@@ -28,51 +28,51 @@ RecordDialog::RecordDialog(QWidget *parent, const char *name)
28 layout->insertSpacing(-1, 5); 28 layout->insertSpacing(-1, 5);
29 layout->insertLayout(-1, hlayout); 29 layout->insertLayout(-1, hlayout);
30 layout->insertSpacing(-1, 5); 30 layout->insertSpacing(-1, 5);
31 31
32 hlayout->insertSpacing(0, 5); 32 hlayout->insertSpacing(0, 5);
33 input = new QLineEdit(this, "input"); 33 input = new QLineEdit(this, "input");
34 hlayout->insertWidget(-1, input, 1); 34 hlayout->insertWidget(-1, input, 1);
35 hlayout->insertSpacing(-1, 5); 35 hlayout->insertSpacing(-1, 5);
36 36
37 QPushButton *ret = new QPushButton("Return", this, "return"); 37 QPushButton *ret = new QPushButton("Return", this, "return");
38 hlayout->insertWidget(-1, ret); 38 hlayout->insertWidget(-1, ret);
39 hlayout->insertSpacing(-1, 5); 39 hlayout->insertSpacing(-1, 5);
40 connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) ); 40 connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) );
41 where = 0; 41 where = 0;
42 42
43 record = new OProcess; 43 record = new OProcess;
44} 44}
45 45
46void RecordDialog::retPressed() 46void RecordDialog::retPressed()
47{ 47{
48 printf("RecordDialog::retPressed: ret pressed\n"); 48 printf("RecordDialog::retPressed: ret pressed\n");
49 49
50 if(where == 0) 50 if(where == 0)
51 { 51 {
52 connect(record, SIGNAL(receivedStdout(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) ); 52 connect(record, SIGNAL(receivedStdout(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) );
53 connect(record, SIGNAL(receivedStderr(OProcess *, char *, int)), this, SLOT(incoming(OProcess *, char *, int)) ); 53 connect(record, SIGNAL(receivedStderr(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) );
54 connect(record, SIGNAL(processExited(OProcess *)), this, SLOT(done(OProcess *)) ); 54 connect(record, SIGNAL(processExited(OProcess*)), this, SLOT(done(OProcess*)) );
55 printf("RecordDialog::retPressed: starting irrecord\n"); 55 printf("RecordDialog::retPressed: starting irrecord\n");
56 QString file = "/tmp/" + input->text(); 56 QString file = "/tmp/" + input->text();
57 *record<<"irrecord"<<file.latin1(); 57 *record<<"irrecord"<<file.latin1();
58 if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput)) 58 if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput))
59 { 59 {
60 QMessageBox *mb = new QMessageBox("Error!", 60 QMessageBox *mb = new QMessageBox("Error!",
61 "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord", 61 "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord",
62 QMessageBox::NoIcon, 62 QMessageBox::NoIcon,
63 QMessageBox::Ok, 63 QMessageBox::Ok,
64 QMessageBox::NoButton, 64 QMessageBox::NoButton,
65 QMessageBox::NoButton); 65 QMessageBox::NoButton);
66 mb->exec(); 66 mb->exec();
67 return; 67 return;
68 } 68 }
69 // record->resume(); 69 // record->resume();
70 where = 1; 70 where = 1;
71 } 71 }
72} 72}
73 73
74void RecordDialog::incoming(OProcess *proc, char *buffer, int len) 74void RecordDialog::incoming(OProcess *proc, char *buffer, int len)
75{ 75{
76 //output->setText(output->text() + QString(buffer).truncate(len-1)); 76 //output->setText(output->text() + QString(buffer).truncate(len-1));
77 printf("RecordDialog::incoming: got text from irrecord\n"); 77 printf("RecordDialog::incoming: got text from irrecord\n");
78} 78}