[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdewebdev/kommander
From:       Michal Rudolf <mrudolf () kdewebdev ! org>
Date:       2004-09-30 22:28:12
Message-ID: 20040930222812.A78CA9911 () office ! kde ! org
[Download RAW message or body]

CVS commit by mrudolf: 

CCMAIL: kommander@mail.kdewebdev.org
Fix the problem with output not being sent to stdout by ExecButton.


  M +5 -0      widget/myprocess.cpp   1.10
  M +1 -0      widget/myprocess.h   1.4
  M +8 -2      widgets/execbutton.cpp   1.27


--- kdewebdev/kommander/widget/myprocess.cpp  #1.9:1.10
@@ -41,4 +41,9 @@ void MyProcess::setBlocking(bool blockin
 }
 
+QString MyProcess::output()
+{
+  return m_output;  
+}    
+    
 bool MyProcess::isBlocking()
 {

--- kdewebdev/kommander/widget/myprocess.h  #1.3:1.4
@@ -36,4 +36,5 @@ public:
   void setBlocking(bool blocking);
   bool isBlocking();
+  QString output();
 signals:
   void processExited(MyProcess*);

--- kdewebdev/kommander/widgets/execbutton.cpp  #1.26:1.27
@@ -32,5 +32,7 @@
 #include "execbutton.h"
 #include <myprocess.h>
-#include <cstdio>
+#include <iostream>
+
+using namespace std;
 
 ExecButton::ExecButton(QWidget* a_parent, const char* a_name)
@@ -104,9 +106,11 @@ void ExecButton::startProcess()
   process->setBlocking(m_blockGUI == GUI);
   connect(process, SIGNAL(processExited(MyProcess*)), SLOT(processExited(MyProcess*)));
-  m_output = process->run(at);
+  process->run(at);
   if (m_blockGUI == GUI)
   {
     setEnabled(true);
     KApplication::restoreOverrideCursor();
+    if (writeStdout())
+      cout << process->output();
   }
 }
@@ -137,4 +141,6 @@ void ExecButton::processExited(MyProcess
   if (blockGUI() != None)
     setEnabled(true);
+  if (writeStdout())
+    cout << p->output();
   delete p;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic