summaryrefslogtreecommitdiff
authordrw <drw>2003-03-19 23:37:49 (UTC)
committer drw <drw>2003-03-19 23:37:49 (UTC)
commitdbb584139c579e55cf340eaed5eb873ecb69baf5 (patch) (side-by-side diff)
tree9f616be06919da82a49bce071c83537ffd4ba82f
parenta83c7aed577b15e23a8baf7c21af61f4b40ffbb0 (diff)
downloadopie-dbb584139c579e55cf340eaed5eb873ecb69baf5.zip
opie-dbb584139c579e55cf340eaed5eb873ecb69baf5.tar.gz
opie-dbb584139c579e55cf340eaed5eb873ecb69baf5.tar.bz2
Fix for bug #733
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/processinfo.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp
index 2232771..1de1a19 100644
--- a/noncore/settings/sysinfo/processinfo.cpp
+++ b/noncore/settings/sysinfo/processinfo.cpp
@@ -156,39 +156,43 @@ void ProcessInfo::updateData()
delete procdir;
}
void ProcessInfo::slotSendClicked()
{
QListViewItem *currprocess = ProcessView->currentItem();
if ( !currprocess )
{
return;
}
QString capstr = tr( "You really want to send\n" );
capstr.append( SignalCB->currentText() );
capstr.append( "\nto this process?" );
- if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr,
- QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
+ if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr,
+ QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
{
- QString sigstr = SignalCB->currentText();
- sigstr.truncate(2);
- int sigid = sigstr.toUInt();
- kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid );
+ currprocess = ProcessView->currentItem();
+ if ( currprocess )
+ {
+ QString sigstr = SignalCB->currentText();
+ sigstr.truncate(2);
+ int sigid = sigstr.toUInt();
+ kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid );
+ }
}
}
void ProcessInfo::viewProcess( QListViewItem *process )
{
QString pid= process->text( 0 ).stripWhiteSpace();
QString command = process->text( 1 );
ProcessDtl->setCaption( pid + " - " + command );
FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r");
if ( statfile )
{
char line[81];
fgets( line, 81, statfile );
ProcessDtl->detailView->setText( line );
while ( fgets( line, 81, statfile ) )