Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / konqueror / settings / performance / system.cpp
blob821a673a57584daf4b165fb27abff440e82b1e9f
1 /*
2 * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #include "system.h"
21 #include <kconfig.h>
23 #include <QtGui/QCheckBox>
24 #include <QtGui/QLabel>
25 #include <klocale.h>
27 namespace KCMPerformance
30 SystemWidget::SystemWidget( QWidget* parent_P )
31 : System_ui( parent_P )
33 QString tmp =
34 i18n( "<p>During startup KDE needs to perform a check of its system configuration"
35 " (mimetypes, installed applications, etc.), and in case the configuration"
36 " has changed since the last time, the system configuration cache (KSyCoCa)"
37 " needs to be updated.</p>"
38 "<p>This option delays the check, which avoid scanning all directories containing"
39 " files describing the system during KDE startup, thus"
40 " making KDE startup faster. However, in the rare case the system configuration"
41 " has changed since the last time, and the change is needed before this"
42 " delayed check takes place, this option may lead to various problems"
43 " (missing applications in the K Menu, reports from applications about missing"
44 " required mimetypes, etc.).</p>"
45 "<p>Changes of system configuration mostly happen by (un)installing applications."
46 " It is therefore recommended to turn this option temporarily off while"
47 " (un)installing applications.</p>" );
48 cb_disable_kbuildsycoca->setWhatsThis( tmp );
49 label_kbuildsycoca->setWhatsThis( tmp );
50 connect( cb_disable_kbuildsycoca, SIGNAL( clicked()), SIGNAL( changed()));
51 defaults();
54 void SystemWidget::load()
56 KConfig _cfg( "kdedrc" );
57 KConfigGroup cfg(&_cfg, "General" );
58 cb_disable_kbuildsycoca->setChecked( cfg.readEntry( "DelayedCheck", false));
61 void SystemWidget::save()
63 KConfig _cfg( "kdedrc" );
64 KConfigGroup cfg(&_cfg, "General" );
65 cfg.writeEntry( "DelayedCheck", cb_disable_kbuildsycoca->isChecked());
68 void SystemWidget::defaults()
70 cb_disable_kbuildsycoca->setChecked( false );
73 } // namespace
75 #include "system.moc"