summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-03-23 14:39:42 (UTC)
committer llornkcor <llornkcor>2003-03-23 14:39:42 (UTC)
commit376aa038c75b3fbccdcb2e81d5b2ac3de787a447 (patch) (side-by-side diff)
treedfbcd8cfd1a6c37eb5d3b0f8f003a0c41154fd59
parent47d6402958e3d95a49a116552979407b4b731670 (diff)
downloadopie-376aa038c75b3fbccdcb2e81d5b2ac3de787a447.zip
opie-376aa038c75b3fbccdcb2e81d5b2ac3de787a447.tar.gz
opie-376aa038c75b3fbccdcb2e81d5b2ac3de787a447.tar.bz2
add stderr messagebox to oprocess
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.h4
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp20
2 files changed, 20 insertions, 4 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 3250a66..f31956c 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -15,6 +15,7 @@
#define QT_QWS_OPIE
//#include <opie/otabwidget.h>
+#include <opie/oprocess.h>
#include <qpe/ir.h>
#include <qvariant.h>
@@ -163,7 +164,8 @@ private:
void removeCustomDir();
private slots:
- void processEnded();
+ void processEnded(OProcess *);
+ void oprocessStderr(OProcess *, char *, int);
void gotoCustomDir(const QString &);
};
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index a82d69a..eac13f6 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -724,22 +724,36 @@ void AdvancedFm::startProcess(const QString & cmd)
OProcess *process;
process = new OProcess();
connect(process, SIGNAL(processExited(OProcess *)),
- this, SLOT( processEnded()));
+ this, SLOT( processEnded(OProcess *)));
+
+ connect(process, SIGNAL( receivedStderr(OProcess *, char *, int)),
+ this, SLOT( oprocessStderr(OProcess *, char *, int)));
command << "/bin/sh";
command << "-c";
command << cmd.latin1();
*process << command;
- if(!process->start(OProcess::NotifyOnExit) )
+ if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
qDebug("could not start process");
}
-void AdvancedFm::processEnded()
+void AdvancedFm::processEnded(OProcess *)
{
// populateLocalView();
populateView();
}
+void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int buflen) {
+ qWarning("received stderrt %d bytes", buflen);
+
+ QString lineStr = buffer;
+// lineStr=lineStr.left(lineStr.length()-1);
+ QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
+
+// OutputEdit->append(lineStr);
+// OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
+}
+
bool AdvancedFm::eventFilter( QObject * o, QEvent * e )
{
if ( o->inherits( "QLineEdit" ) )