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

List:       kde-commits
Subject:    KDE_3_2_BRANCH: kdegraphics/kghostview
From:       Luís Pedro Coelho <luis () luispedro ! org>
Date:       2004-01-20 1:59:36
Message-ID: 20040120015936.48AA91A27 () office ! kde ! org
[Download RAW message or body]

CVS commit by luis_pedro: 

Backport of fix for 72864 by Andy Neitzke.


  M +10 -4     kpswidget.cpp   1.137.2.1
  M +1 -1      kpswidget.h   1.75.2.1


--- kdegraphics/kghostview/kpswidget.cpp  #1.137:1.137.2.1
@@ -180,5 +180,5 @@ bool KPSWidget::sendPS( FILE* fp, unsign
     // Start processing the queue.
     if( _stdinReady )
-        gs_input();
+        gs_input(_process);
 
     return true;
@@ -371,5 +371,5 @@ bool KPSWidget::startInterpreter()
              this, SLOT( gs_output( KProcess*, char*, int ) ) );
     connect( _process, SIGNAL( wroteStdin( KProcess*) ),
-             this, SLOT( gs_input() ) );
+             this, SLOT( gs_input( KProcess* ) ) );
 
     kapp->flushX();
@@ -449,8 +449,14 @@ void KPSWidget::gs_output( KProcess*, ch
 }
 
-void KPSWidget::gs_input()
+void KPSWidget::gs_input( KProcess* process )
 {
     kdDebug(4500) << "KPSWidget: gs_input" << endl;
 
+    if (process != _process)
+    {
+      kdDebug(4500) << "KPSWidget::gs_input(): process != _process" << endl;
+      return;
+    }
+    
     _stdinReady = true;
     const unsigned bufferSize = 8192;
@@ -483,5 +489,5 @@ void KPSWidget::gs_input()
             _currentRecord->begin += bytesRead;
             _currentRecord->len -= bytesRead;
-            if( _process && _process->writeStdin( _inputBuffer, bytesRead ) )
+            if( process && process->writeStdin( _inputBuffer, bytesRead ) )
                 _stdinReady = false;
             else

--- kdegraphics/kghostview/kpswidget.h  #1.75:1.75.2.1
@@ -197,5 +197,5 @@ protected:
 
 protected slots:
-    void gs_input();
+    void gs_input( KProcess* );
     void gs_output( KProcess*, char* buffer, int len );
     void interpreterFailed();


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

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