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
f4a75d28
Commit
f4a75d28
authored
Apr 30, 2021
by
Mark Nauwelaerts
Browse files
lspclient: reload config when restarting all servers
parent
73ee96c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientservermanager.cpp
View file @
f4a75d28
...
...
@@ -357,7 +357,7 @@ public:
}
}
}
restart
(
servers
);
restart
(
servers
,
server
==
nullptr
);
}
qint64
revision
(
KTextEditor
::
Document
*
doc
)
override
...
...
@@ -387,7 +387,7 @@ private:
}
// caller ensures that servers are no longer present in m_servers
void
restart
(
const
ServerList
&
servers
)
void
restart
(
const
ServerList
&
servers
,
bool
reload
=
false
)
{
// close docs
for
(
const
auto
&
server
:
servers
)
{
...
...
@@ -429,8 +429,14 @@ private:
// as for the start part
// trigger interested parties, which will again request a server as needed
// let's delay this; less chance for server instances to trip over each other
QTimer
::
singleShot
(
6
*
TIMEOUT_SHUTDOWN
,
this
,
[
this
]()
{
Q_EMIT
serverChanged
();
QTimer
::
singleShot
(
6
*
TIMEOUT_SHUTDOWN
,
this
,
[
this
,
reload
]()
{
// this may be a good time to refresh server config
if
(
reload
)
{
// will also trigger as mentioned above
updateServerConfig
();
}
else
{
Q_EMIT
serverChanged
();
}
});
}
...
...
Write
Preview
Markdown
is supported
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