Changeset View
Changeset View
Standalone View
Standalone View
gui/ksysguard.cpp
Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Line(s) | 350 | { | |||
---|---|---|---|---|---|
360 | return KXmlGuiWindow::event( e ); | 360 | return KXmlGuiWindow::event( e ); | ||
361 | } | 361 | } | ||
362 | 362 | | |||
363 | void TopLevel::timerEvent( QTimerEvent* ) | 363 | void TopLevel::timerEvent( QTimerEvent* ) | ||
364 | { | 364 | { | ||
365 | if ( statusBar()->isVisibleTo( this ) ) { | 365 | if ( statusBar()->isVisibleTo( this ) ) { | ||
366 | /* Request some info about the memory status. The requested | 366 | /* Request some info about the memory status. The requested | ||
367 | * information will be received by answerReceived(). */ | 367 | * information will be received by answerReceived(). */ | ||
368 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), QStringLiteral("cpu/idle"), | 368 | const auto localhostString = QStringLiteral("localhost"); | ||
369 | KSGRD::SensorMgr->sendRequest( localhostString, QStringLiteral("cpu/idle"), | ||||
369 | (KSGRD::SensorClient*)this, 1 ); | 370 | (KSGRD::SensorClient*)this, 1 ); | ||
370 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), QStringLiteral("mem/physical/free"), | 371 | KSGRD::SensorMgr->sendRequest( localhostString, QStringLiteral("mem/physical/free"), | ||
371 | (KSGRD::SensorClient*)this, 2 ); | 372 | (KSGRD::SensorClient*)this, 2 ); | ||
372 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), QStringLiteral("mem/physical/used"), | 373 | KSGRD::SensorMgr->sendRequest( localhostString, QStringLiteral("mem/physical/used"), | ||
373 | (KSGRD::SensorClient*)this, 3 ); | 374 | (KSGRD::SensorClient*)this, 3 ); | ||
374 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), QStringLiteral("mem/physical/application"), | 375 | KSGRD::SensorMgr->sendRequest( localhostString, QStringLiteral("mem/physical/application"), | ||
375 | (KSGRD::SensorClient*)this, 4 ); | 376 | (KSGRD::SensorClient*)this, 4 ); | ||
376 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), QStringLiteral("mem/swap/free"), | 377 | KSGRD::SensorMgr->sendRequest( localhostString, QStringLiteral("mem/swap/free"), | ||
377 | (KSGRD::SensorClient*)this, 5 ); | 378 | (KSGRD::SensorClient*)this, 5 ); | ||
378 | KSGRD::SensorMgr->sendRequest( QStringLiteral("localhost"), QStringLiteral("mem/swap/used"), | 379 | KSGRD::SensorMgr->sendRequest( localhostString, QStringLiteral("mem/swap/used"), | ||
379 | (KSGRD::SensorClient*)this, 6 ); | 380 | (KSGRD::SensorClient*)this, 6 ); | ||
380 | } | 381 | } | ||
381 | } | 382 | } | ||
382 | 383 | | |||
383 | void TopLevel::updateProcessCount() { | 384 | void TopLevel::updateProcessCount() { | ||
384 | const int count = mLocalProcessController->processList()->visibleProcessesCount(); | 385 | const int count = mLocalProcessController->processList()->visibleProcessesCount(); | ||
385 | const QString s = i18np( "1 process", "%1 processes", count ) + "\xc2\x9c" + QString::number( count ); | 386 | const QString s = i18np( "1 process", "%1 processes", count ) + "\xc2\x9c" + QString::number( count ); | ||
386 | sbProcessCount->setText( s ); | 387 | sbProcessCount->setText( s ); | ||
▲ Show 20 Lines • Show All 248 Lines • Show Last 20 Lines |