Commit d08a0ab1 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

better init and config update

parent 20591b48
......@@ -48,12 +48,6 @@ const QStringList DefaultConfig = QStringList() << GitConfig << SubversionConfig
KateProjectPlugin::KateProjectPlugin(QObject *parent, const QList<QVariant> &)
: KTextEditor::Plugin(parent)
, m_completion(this)
, m_autoGit(true)
, m_autoSubversion(true)
, m_autoMercurial(true)
, m_indexEnabled(false)
, m_multiProjectCompletion(false)
, m_multiProjectGoto(false)
{
qRegisterMetaType<KateProjectSharedQStandardItem>("KateProjectSharedQStandardItem");
qRegisterMetaType<KateProjectSharedQHashStringItem>("KateProjectSharedQHashStringItem");
......@@ -369,21 +363,11 @@ void KateProjectPlugin::setMultiProject(bool completion, bool gotoSymbol)
void KateProjectPlugin::readConfig()
{
KConfigGroup config(KSharedConfig::openConfig(), "project");
QStringList autorepository = config.readEntry("autorepository", DefaultConfig);
m_autoGit = m_autoSubversion = m_autoMercurial = false;
if (autorepository.contains(GitConfig)) {
m_autoGit = true;
}
if (autorepository.contains(SubversionConfig)) {
m_autoSubversion = true;
}
if (autorepository.contains(MercurialConfig)) {
m_autoMercurial = true;
}
const QStringList autorepository = config.readEntry("autorepository", DefaultConfig);
m_autoGit = autorepository.contains(GitConfig);
m_autoSubversion = autorepository.contains(SubversionConfig);
m_autoMercurial = autorepository.contains(MercurialConfig);
m_indexEnabled = config.readEntry("index", false);
m_indexDirectory = config.readEntry("indexDirectory", QUrl());
......
......@@ -182,15 +182,22 @@ private:
*/
KateProjectCompletion m_completion;
bool m_autoGit;
bool m_autoSubversion;
bool m_autoMercurial;
bool m_indexEnabled;
bool m_multiProjectCompletion;
bool m_multiProjectGoto;
bool m_gitNumStat;
// auto discovery on per default
bool m_autoGit = true;
bool m_autoSubversion = true;
bool m_autoMercurial = true;
// indexing is expensive, default off
bool m_indexEnabled = false;
QUrl m_indexDirectory;
// some more features default off, too
bool m_multiProjectCompletion = false;
bool m_multiProjectGoto = false;
// git features
bool m_gitNumStat = true;
/**
* thread pool for our workers
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment