summaryrefslogtreecommitdiffstats
path: root/khelpcenter/kcmhelpcenter.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-03 09:14:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-03 09:14:57 +0000
commit27856879bf962f178d88e79144e37a47e731b122 (patch)
treea3bd3f489b755cd2941e7c53b90d12d6bfd4fbe3 /khelpcenter/kcmhelpcenter.cpp
parentc5228d52f504d6d2c0fefdd625ec08ebb8e91f85 (diff)
downloadtdebase-27856879bf962f178d88e79144e37a47e731b122.tar.gz
tdebase-27856879bf962f178d88e79144e37a47e731b122.zip
* Massive import of OpenSUSE patches, primarily for bugfixes
* Added some infrastructure created by OpenSUSE to allow for future addition of the Kickoff menu as an option * Minor Slackware compilation fixes git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1171255 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khelpcenter/kcmhelpcenter.cpp')
-rw-r--r--khelpcenter/kcmhelpcenter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/khelpcenter/kcmhelpcenter.cpp b/khelpcenter/kcmhelpcenter.cpp
index c3b3e3094..aadce700a 100644
--- a/khelpcenter/kcmhelpcenter.cpp
+++ b/khelpcenter/kcmhelpcenter.cpp
@@ -321,6 +321,7 @@ bool KCMHelpCenter::save()
void KCMHelpCenter::load()
{
+ findWriteableIndexDir();
mIndexDirLabel->setText( Prefs::indexDirectory() );
mListView->clear();
@@ -675,6 +676,12 @@ void KCMHelpCenter::checkSelection()
enableButtonOK( count != 0 );
}
+void KCMHelpCenter::findWriteableIndexDir()
+{
+ TQFileInfo currentDir( Prefs::indexDirectory() );
+ if ( !currentDir.isWritable() )
+ Prefs::setIndexDirectory( KGlobal::dirs()->saveLocation("data", "khelpcenter/index/") );
+}
#include "kcmhelpcenter.moc"
// vim:ts=2:sw=2:et