Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
d08a0ab1
Commit
d08a0ab1
authored
Mar 05, 2021
by
Christoph Cullmann
🐮
Browse files
better init and config update
parent
20591b48
Changes
2
Hide whitespace changes
Inline
Side-by-side
addons/project/kateprojectplugin.cpp
View file @
d08a0ab1
...
...
@@ -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
());
...
...
addons/project/kateprojectplugin.h
View file @
d08a0ab1
...
...
@@ -182,15 +182,22 @@ private:
*/
KateProjectCompletion
m_completion
;
bool
m_autoGit
;
bool
m_auto
Subversion
;
bool
m_auto
Mercurial
;
bool
m_
indexEnabled
;
bool
m_multiProjectCompletion
;
bool
m_multiProjectGoto
;
bool
m_
gitNumStat
;
// auto discovery on per default
bool
m_auto
Git
=
true
;
bool
m_auto
Subversion
=
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
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment