summaryrefslogtreecommitdiff
authordrw <drw>2003-03-19 23:37:49 (UTC)
committer drw <drw>2003-03-19 23:37:49 (UTC)
commitdbb584139c579e55cf340eaed5eb873ecb69baf5 (patch) (unidiff)
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
@@ -160,31 +160,35 @@ void ProcessInfo::slotSendClicked()
160{ 160{
161 QListViewItem *currprocess = ProcessView->currentItem(); 161 QListViewItem *currprocess = ProcessView->currentItem();
162 if ( !currprocess ) 162 if ( !currprocess )
163 { 163 {
164 return; 164 return;
165 } 165 }
166 166
167 QString capstr = tr( "You really want to send\n" ); 167 QString capstr = tr( "You really want to send\n" );
168 capstr.append( SignalCB->currentText() ); 168 capstr.append( SignalCB->currentText() );
169 capstr.append( "\nto this process?" ); 169 capstr.append( "\nto this process?" );
170 170
171 171
172 if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, 172 if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr,
173 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) 173 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
174 { 174 {
175 QString sigstr = SignalCB->currentText(); 175 currprocess = ProcessView->currentItem();
176 sigstr.truncate(2); 176 if ( currprocess )
177 int sigid = sigstr.toUInt(); 177 {
178 kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid ); 178 QString sigstr = SignalCB->currentText();
179 sigstr.truncate(2);
180 int sigid = sigstr.toUInt();
181 kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid );
182 }
179 } 183 }
180 184
181} 185}
182 186
183void ProcessInfo::viewProcess( QListViewItem *process ) 187void ProcessInfo::viewProcess( QListViewItem *process )
184{ 188{
185 QString pid= process->text( 0 ).stripWhiteSpace(); 189 QString pid= process->text( 0 ).stripWhiteSpace();
186 QString command = process->text( 1 ); 190 QString command = process->text( 1 );
187 ProcessDtl->setCaption( pid + " - " + command ); 191 ProcessDtl->setCaption( pid + " - " + command );
188 FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r"); 192 FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r");
189 if ( statfile ) 193 if ( statfile )
190 { 194 {