[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/lib/util
From: Jens Dagerbo <jens.dagerbo () swipnet ! se>
Date: 2004-02-20 5:01:21
Message-ID: 20040220050121.E60989970 () office ! kde ! org
[Download RAW message or body]
CVS commit by dagerbo:
Clear buffers before starting a new job. Previously, a terminated job
could leave data in the processlinemaker buffers.
Also, (hopefully) fixes a case where terminating a grep operation would
freeze KDevelop (seemed more likely to happen on SMP setups).
M +6 -0 processlinemaker.cpp 1.3
M +2 -0 processlinemaker.h 1.3
M +6 -1 processwidget.cpp 1.20
--- kdevelop/lib/util/processlinemaker.cpp #1.2:1.3
@@ -89,2 +89,8 @@ void ProcessLineMaker::slotReceivedStder
slotReceivedStderr( QString::fromLocal8Bit( buffer ) );
}
+
+void ProcessLineMaker::clearBuffers( )
+{
+ stderrbuf = "";
+ stdoutbuf = "";
+}
--- kdevelop/lib/util/processlinemaker.h #1.2:1.3
@@ -33,4 +33,6 @@ public:
ProcessLineMaker( const KProcess* );
+ void clearBuffers();
+
public slots:
void slotReceivedStdout(const QString&);
--- kdevelop/lib/util/processwidget.cpp #1.19:1.20
@@ -88,4 +88,7 @@ ProcessWidget::~ProcessWidget()
void ProcessWidget::startJob(const QString &dir, const QString &command)
{
+ procLineMaker->clearBuffers();
+ procLineMaker->blockSignals( false );
+
clear();
insertItem(new ProcessListBoxItem(command, ProcessListBoxItem::Diagnostic));
@@ -103,4 +106,6 @@ void ProcessWidget::startJob(const QStri
void ProcessWidget::killJob( int signo )
{
+ procLineMaker->blockSignals( true );
+
childproc->kill( signo );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic