Репозитории ALT
5.1: | 3.5.10-alt20.M51.2 |
4.1: | 3.5.10-alt16.M41.1 |
4.0: | 3.5.9-alt1.M40.1 |
3.0: | 3.4.1-alt12 |
+updates: | 3.4.1-alt12.1.M30 |
+backports: | 3.5.6-alt7.0.M30 |
Группа :: Графические оболочки/KDE
Пакет: kdebase
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: khelpcenter-localindices.patch
Скачать
Скачать
--- khelpcenter/kcmhelpcenter.cpp
+++ khelpcenter/kcmhelpcenter.cpp
@@ -321,6 +321,7 @@
void KCMHelpCenter::load()
{
+ findWriteableIndexDir();
mIndexDirLabel->setText( Prefs::indexDirectory() );
mListView->clear();
@@ -675,6 +676,12 @@
enableButtonOK( count != 0 );
}
+void KCMHelpCenter::findWriteableIndexDir()
+{
+ QFileInfo currentDir( Prefs::indexDirectory() );
+ if ( !currentDir.isWritable() )
+ Prefs::setIndexDirectory( KGlobal::dirs()->saveLocation("data", "khelpcenter/index/") );
+}
#include "kcmhelpcenter.moc"
// vim:ts=2:sw=2:et
--- khelpcenter/kcmhelpcenter.h
+++ khelpcenter/kcmhelpcenter.h
@@ -146,6 +146,11 @@
void advanceProgress();
+ /**
+ * Find a user-writeable location for the indices, if the current location
+ * is not.
+ */
+ void findWriteableIndexDir();
private:
KHC::SearchEngine *mEngine;