Diffstat (limited to 'noncore/apps/advancedfm/output.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp index 7dc2416..0bba1d8 100644 --- a/noncore/apps/advancedfm/output.cpp +++ b/noncore/apps/advancedfm/output.cpp | |||
@@ -132,35 +132,35 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, | |||
132 | QPushButton *docButton; | 132 | QPushButton *docButton; |
133 | docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); | 133 | docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); |
134 | docButton->setFixedSize( QSize( 20, 20 ) ); | 134 | docButton->setFixedSize( QSize( 20, 20 ) ); |
135 | connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); | 135 | connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); |
136 | // docButton->setFlat(TRUE); | 136 | // docButton->setFlat(TRUE); |
137 | OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); | 137 | OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); |
138 | 138 | ||
139 | OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); | 139 | OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); |
140 | OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); | 140 | OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); |
141 | 141 | ||
142 | proc = new OProcess(); | 142 | proc = new OProcess(); |
143 | 143 | ||
144 | connect(proc, SIGNAL(processExited(OProcess *)), | 144 | connect(proc, SIGNAL(processExited(OProcess*)), |
145 | this, SLOT( processFinished())); | 145 | this, SLOT( processFinished())); |
146 | 146 | ||
147 | connect(proc, SIGNAL(receivedStdout(OProcess *, char *, int)), | 147 | connect(proc, SIGNAL(receivedStdout(OProcess*,char*,int)), |
148 | this, SLOT(commandStdout(OProcess *, char *, int))); | 148 | this, SLOT(commandStdout(OProcess*,char*,int))); |
149 | 149 | ||
150 | connect(proc, SIGNAL(receivedStderr(OProcess *, char *, int)), | 150 | connect(proc, SIGNAL(receivedStderr(OProcess*,char*,int)), |
151 | this, SLOT(commandStderr(OProcess *, char *, int))); | 151 | this, SLOT(commandStderr(OProcess*,char*,int))); |
152 | 152 | ||
153 | // connect( , SIGNAL(received(const QByteArray &)), | 153 | // connect( , SIGNAL(received(const QByteArray&)), |
154 | // this, SLOT(commandStdin(const QByteArray &))); | 154 | // this, SLOT(commandStdin(const QByteArray&))); |
155 | 155 | ||
156 | // * proc << commands.latin1(); | 156 | // * proc << commands.latin1(); |
157 | for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { | 157 | for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { |
158 | qDebug( "%s", (*it).latin1() ); | 158 | qDebug( "%s", (*it).latin1() ); |
159 | * proc << (*it).latin1(); | 159 | * proc << (*it).latin1(); |
160 | } | 160 | } |
161 | 161 | ||
162 | if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { | 162 | if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { |
163 | 163 | ||
164 | OutputEdit->append(tr("Process could not start") ); | 164 | OutputEdit->append(tr("Process could not start") ); |
165 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 165 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
166 | perror("Error: "); | 166 | perror("Error: "); |
@@ -231,26 +231,26 @@ void Output::commandStderr(OProcess*, char *buffer, int buflen) { | |||
231 | QString lineStr = buffer; | 231 | QString lineStr = buffer; |
232 | // lineStr=lineStr.left(lineStr.length()-1); | 232 | // lineStr=lineStr.left(lineStr.length()-1); |
233 | OutputEdit->append(lineStr); | 233 | OutputEdit->append(lineStr); |
234 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 234 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
235 | } | 235 | } |
236 | 236 | ||
237 | void Output::processFinished() { | 237 | void Output::processFinished() { |
238 | 238 | ||
239 | delete proc; | 239 | delete proc; |
240 | OutputEdit->append( tr("\nFinished\n") ); | 240 | OutputEdit->append( tr("\nFinished\n") ); |
241 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); | 241 | OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); |
242 | // close(); | 242 | // close(); |
243 | // disconnect( layer(), SIGNAL(received(const QByteArray &)), | 243 | // disconnect( layer(), SIGNAL(received(const QByteArray&)), |
244 | // this, SLOT(commandStdin(const QByteArray &))); | 244 | // this, SLOT(commandStdin(const QByteArray&))); |
245 | } | 245 | } |
246 | 246 | ||
247 | //============================== | 247 | //============================== |
248 | 248 | ||
249 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 249 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
250 | : QDialog( parent, name, modal, fl ) | 250 | : QDialog( parent, name, modal, fl ) |
251 | { | 251 | { |
252 | if ( !name ) | 252 | if ( !name ) |
253 | setName( "InputDialog" ); | 253 | setName( "InputDialog" ); |
254 | resize( 234, 50 ); | 254 | resize( 234, 50 ); |
255 | setMaximumSize( QSize( 240, 50 ) ); | 255 | setMaximumSize( QSize( 240, 50 ) ); |
256 | setCaption( tr(name ) ); | 256 | setCaption( tr(name ) ); |