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
Plasma
Plasma Workspace
Commits
6ad02472
Commit
6ad02472
authored
Mar 19, 2021
by
Marco Martin
Browse files
documentation++
parent
11026042
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/containmentlayoutmanager/appletslayout.cpp
View file @
6ad02472
...
...
@@ -45,6 +45,8 @@ AppletsLayout::AppletsLayout(QQuickItem *parent)
m_saveLayoutTimer
->
setInterval
(
100
);
connect
(
m_layoutManager
,
&
AbstractLayoutManager
::
layoutNeedsSaving
,
m_saveLayoutTimer
,
QOverload
<>::
of
(
&
QTimer
::
start
));
connect
(
m_saveLayoutTimer
,
&
QTimer
::
timeout
,
this
,
[
this
]()
{
// We can't save the layout during bootup, for performance reasons and to avoid race consitions as much as possible, so if we needto save and still starting up,
// don't actually savenow, but we will when Corona::startupCompleted is emitted
if
(
!
m_configKey
.
isEmpty
()
&&
m_containment
&&
m_containment
->
corona
()
->
isStartupCompleted
())
{
const
QString
serializedConfig
=
m_layoutManager
->
serializeLayout
();
m_containment
->
config
().
writeEntry
(
m_configKey
,
serializedConfig
);
...
...
@@ -502,6 +504,7 @@ void AppletsLayout::componentComplete()
}
if
(
m_containment
&&
m_containment
->
corona
())
{
// We inhibit save during startup, so actually save now that startup is completed
connect
(
m_containment
->
corona
(),
&
Plasma
::
Corona
::
startupCompleted
,
this
,
[
this
]()
{
save
();
});
...
...
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