summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/sysloginfo.cpp
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo/sysloginfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/sysloginfo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/settings/sysinfo/sysloginfo.cpp b/noncore/settings/sysinfo/sysloginfo.cpp
index 21427f4..279c335 100644
--- a/noncore/settings/sysinfo/sysloginfo.cpp
+++ b/noncore/settings/sysinfo/sysloginfo.cpp
@@ -1,20 +1,18 @@
1/********************************************************************** 1/**********************************************************************
2** SyslogInfo 2** SyslogInfo
3** 3**
4** Display Syslog information 4** Display Syslog information
5** 5**
6** Copyright (C) 2004, Michael Lauer 6** Copyright (C) 2004-2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
7** mickey@tm.informatik.uni-frankfurt.de
8** http://www.Vanille.de
9** 7**
10** This file may be distributed and/or modified under the terms of the 8** This file may be distributed and/or modified under the terms of the
11** GNU General Public License version 2 as published by the Free Software 9** GNU General Public License version 2 as published by the Free Software
12** Foundation and appearing in the file LICENSE.GPL included in the 10** Foundation and appearing in the file LICENSE.GPL included in the
13** packaging of this file. 11** packaging of this file.
14** 12**
15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17** 15**
18**********************************************************************/ 16**********************************************************************/
19 17
20#include "sysloginfo.h" 18#include "sysloginfo.h"
@@ -60,25 +58,25 @@ char buf[bufsize];
60 58
61SyslogInfo::SyslogInfo( QWidget* parent, const char* name, WFlags fl ) 59SyslogInfo::SyslogInfo( QWidget* parent, const char* name, WFlags fl )
62 : QWidget( parent, name, fl ) 60 : QWidget( parent, name, fl )
63{ 61{
64 QGridLayout *layout = new QGridLayout( this ); 62 QGridLayout *layout = new QGridLayout( this );
65 layout->setSpacing( 2 ); 63 layout->setSpacing( 2 );
66 layout->setMargin( 0 ); 64 layout->setMargin( 0 );
67 65
68 syslogview = new QTextView( this ); 66 syslogview = new QTextView( this );
69 syslogview->setTextFormat( PlainText ); 67 syslogview->setTextFormat( PlainText );
70 OConfig cfg( "qpe" ); 68 OConfig cfg( "qpe" );
71 cfg.setGroup( "Appearance" ); 69 cfg.setGroup( "Appearance" );
72 syslogview->setFont( QFont( "Fixed", cfg.readNumEntry( "FontSize", 10 ) ) ); 70 syslogview->setFont( QFont( cfg.readEntry( "FixedFontFamily", "Fixed" ), cfg.readNumEntry( "FixedFontSize", 10 ) ) );
73 layout->addWidget( syslogview, 0, 0 ); 71 layout->addWidget( syslogview, 0, 0 );
74 syslogview->setText( "..." ); 72 syslogview->setText( "..." );
75 73
76 memset( buf, 0, bufsize ); 74 memset( buf, 0, bufsize );
77 ::klogctl( SYSLOG_READ_ALL, buf, bufsize ); 75 ::klogctl( SYSLOG_READ_ALL, buf, bufsize );
78 syslogview->setText( buf ); 76 syslogview->setText( buf );
79 77
80#ifdef APPEND 78#ifdef APPEND
81 fd = ::open( "/proc/kmsg", O_RDONLY|O_SYNC ); 79 fd = ::open( "/proc/kmsg", O_RDONLY|O_SYNC );
82 if ( fd == -1 ) 80 if ( fd == -1 )
83 { 81 {
84 syslogview->setText( "Couldn't open /proc/kmsg: " + QString( strerror( errno ) ) ); 82 syslogview->setText( "Couldn't open /proc/kmsg: " + QString( strerror( errno ) ) );