mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
libs: format and indent losofui library source files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
783ce4c022
commit
d134684c96
2 changed files with 18 additions and 12 deletions
|
@ -28,13 +28,13 @@
|
|||
#include "moc_LsofSearchWidget.cpp"
|
||||
#include "ui_LsofSearchWidget.h"
|
||||
|
||||
LsofSearchWidget::LsofSearchWidget(QWidget* parent, int pid )
|
||||
: KDialog( parent )
|
||||
LsofSearchWidget::LsofSearchWidget(QWidget* parent, int pid)
|
||||
: KDialog(parent)
|
||||
{
|
||||
setObjectName( "Renice Dialog" );
|
||||
setModal( true );
|
||||
setCaption( i18n("Renice Process") );
|
||||
setButtons( Close );
|
||||
setObjectName("Renice Dialog");
|
||||
setModal(true);
|
||||
setCaption(i18n("Renice Process"));
|
||||
setButtons(KDialog::Close);
|
||||
QWidget *widget = new QWidget(this);
|
||||
setMainWidget(widget);
|
||||
ui = new Ui_LsofSearchWidget();
|
||||
|
|
|
@ -64,27 +64,33 @@ void KLsofWidget::finished(int exitCode, QProcess::ExitStatus exitStatus)
|
|||
while (true) {
|
||||
qint64 lineLength = d->process->readLine(buf, sizeof(buf));
|
||||
|
||||
if (lineLength <= 0)
|
||||
if (lineLength <= 0) {
|
||||
break;
|
||||
if (buf[lineLength-1] == '\n')
|
||||
}
|
||||
if (buf[lineLength-1] == '\n') {
|
||||
lineLength--;
|
||||
}
|
||||
|
||||
switch(buf[0]) {
|
||||
/* Process related stuff */
|
||||
case 'f':
|
||||
case 'f': {
|
||||
process = new QTreeWidgetItem(this);
|
||||
process->setText(0,QString::fromUtf8(buf+1, lineLength - 1));
|
||||
break;
|
||||
case 't':
|
||||
}
|
||||
case 't': {
|
||||
if (process)
|
||||
process->setText(1,QString::fromUtf8(buf+1, lineLength - 1));
|
||||
break;
|
||||
case 'n':
|
||||
}
|
||||
case 'n': {
|
||||
if (process)
|
||||
process->setText(2,QString::fromUtf8(buf+1, lineLength - 1));
|
||||
break;
|
||||
default:
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue