[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/parts/valgrind
From: Harald Fernengel <harald () trolltech ! com>
Date: 2002-12-30 21:30:53
[Download RAW message or body]
CVS commit by harald:
now able to use the STOP button to terminate valgrind
M +11 -3 valgrind_part.cpp 1.2
M +1 -0 valgrind_part.h 1.2
--- kdevelop/parts/valgrind/valgrind_part.cpp #1.1:1.2
@@ -35,4 +35,6 @@ ValgrindPart::ValgrindPart( QObject *par
connect( proc, SIGNAL(processExited( KProcess* )),
this, SLOT(processExited( KProcess* )) );
+ connect( core(), SIGNAL(stopButtonClicked()),
+ this, SLOT(slotKillValgrind()) );
m_widget = new ValgrindWidget( this );
@@ -109,8 +111,14 @@ void ValgrindPart::slotExecValgrind()
}
+void ValgrindPart::slotKillValgrind()
+{
+ if ( proc )
+ proc->kill();
+}
+
void ValgrindPart::runValgrind( const QString& exec, const QString& params, const \
QString& valExec, const QString& valParams ) {
if ( proc->isRunning() ) {
- KMessageBox::sorry( 0, "There is already an instance of valgrind running." );
+ KMessageBox::sorry( 0, i18n( "There is already an instance of valgrind running." \
) ); return;
// todo - ask for forced kill
@@ -126,5 +134,5 @@ void ValgrindPart::runValgrind( const QS
proc->start( KProcess::NotifyOnExit, KProcess::AllOutput );
topLevel()->raiseView( m_widget );
- // todo - connect the "stop" button
+ core()->running( this, true );
}
@@ -178,5 +186,5 @@ void ValgrindPart::processExited( KProce
currentMessage = QString::null;
lastPiece = QString::null;
- // TODO: disconnect stop button
+ core()->running( this, false );
}
}
--- kdevelop/parts/valgrind/valgrind_part.h #1.1:1.2
@@ -26,4 +26,5 @@ public:
private slots:
void slotExecValgrind();
+ void slotKillValgrind();
void receivedStdout( KProcess*, char*, int );
void receivedStderr( KProcess*, char*, int );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic