summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/output.cpp
Unidiff
Diffstat (limited to 'noncore/apps/advancedfm/output.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/output.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp
index 6906298..8c585f4 100644
--- a/noncore/apps/advancedfm/output.cpp
+++ b/noncore/apps/advancedfm/output.cpp
@@ -5,19 +5,22 @@
5****************************************************************************/ 5****************************************************************************/
6#include "output.h" 6#include "output.h"
7 7
8/* OPIE */
9#include <opie2/odebug.h>
8#include <qpe/qpeapplication.h> 10#include <qpe/qpeapplication.h>
9#include <qpe/applnk.h> 11#include <qpe/applnk.h>
12using namespace Opie::Core;
10 13
14/* QT */
11#include <qfile.h> 15#include <qfile.h>
12#include <qmultilineedit.h> 16#include <qmultilineedit.h>
13#include <qpushbutton.h> 17#include <qpushbutton.h>
14#include <qlayout.h> 18#include <qlayout.h>
15 19
20/* STD */
16#include <errno.h> 21#include <errno.h>
17 22
18/* XPM */ 23/* XPM */
19using namespace Opie::Core;
20using namespace Opie::Core;
21static char * filesave_xpm[] = { 24static char * filesave_xpm[] = {
22"16 16 78 1", 25"16 16 78 1",
23" c None", 26" c None",
@@ -121,7 +124,7 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name,
121 QStringList cmmds; 124 QStringList cmmds;
122// cmmds=QStringList::split( " ", commands, false); 125// cmmds=QStringList::split( " ", commands, false);
123 cmmds=commands; 126 cmmds=commands;
124// qDebug("count %d", cmmds.count()); 127// odebug << "count " << cmmds.count() << "" << oendl;
125 if ( !name ) 128 if ( !name )
126 setName( tr("Output")); 129 setName( tr("Output"));
127 resize( 196, 269 ); 130 resize( 196, 269 );
@@ -157,7 +160,7 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name,
157 160
158// * proc << commands.latin1(); 161// * proc << commands.latin1();
159 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { 162 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) {
160 qDebug( "%s", (*it).latin1() ); 163 odebug << "" << (*it).latin1() << "" << oendl;
161 * proc << (*it).latin1(); 164 * proc << (*it).latin1();
162 } 165 }
163 166
@@ -186,7 +189,7 @@ void Output::saveOutput() {
186 filename+="/"; 189 filename+="/";
187 QString name = fileDlg->LineEdit1->text(); 190 QString name = fileDlg->LineEdit1->text();
188 filename+="text/plain/"+name; 191 filename+="text/plain/"+name;
189 qDebug(filename); 192 odebug << filename << oendl;
190 193
191 QFile f(filename); 194 QFile f(filename);
192 f.open( IO_WriteOnly); 195 f.open( IO_WriteOnly);
@@ -196,16 +199,16 @@ void Output::saveOutput() {
196 lnk.setFile(filename); //sets File property 199 lnk.setFile(filename); //sets File property
197 lnk.setType("text/plain"); 200 lnk.setType("text/plain");
198 if(!lnk.writeLink()) { 201 if(!lnk.writeLink()) {
199 qDebug("Writing doclink did not work"); 202 odebug << "Writing doclink did not work" << oendl;
200 } 203 }
201 } else 204 } else
202 qWarning("Could not write file"); 205 owarn << "Could not write file" << oendl;
203 f.close(); 206 f.close();
204 } 207 }
205} 208}
206 209
207void Output::commandStdout(OProcess*, char *buffer, int buflen) { 210void Output::commandStdout(OProcess*, char *buffer, int buflen) {
208 qWarning("received stdout %d bytes", buflen); 211 owarn << "received stdout " << buflen << " bytes" << oendl;
209 212
210// QByteArray data(buflen); 213// QByteArray data(buflen);
211// data.fill(*buffer, buflen); 214// data.fill(*buffer, buflen);
@@ -222,13 +225,13 @@ void Output::commandStdout(OProcess*, char *buffer, int buflen) {
222 225
223 226
224void Output::commandStdin( const QByteArray &data) { 227void Output::commandStdin( const QByteArray &data) {
225 qWarning("received stdin %d bytes", data.size()); 228 owarn << "received stdin " << data.size() << " bytes" << oendl;
226 // recieved data from the io layer goes to sz 229 // recieved data from the io layer goes to sz
227 proc->writeStdin(data.data(), data.size()); 230 proc->writeStdin(data.data(), data.size());
228} 231}
229 232
230void Output::commandStderr(OProcess*, char *buffer, int buflen) { 233void Output::commandStderr(OProcess*, char *buffer, int buflen) {
231 qWarning("received stderrt %d bytes", buflen); 234 owarn << "received stderrt " << buflen << " bytes" << oendl;
232 235
233 QString lineStr = buffer; 236 QString lineStr = buffer;
234// lineStr=lineStr.left(lineStr.length()-1); 237// lineStr=lineStr.left(lineStr.length()-1);