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
Network
KAccounts Integration
Commits
a04759de
Commit
a04759de
authored
Sep 23, 2020
by
Nicolas Fella
Browse files
Avoid container detaching
parent
d9c7e984
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/accountservicetogglejob.cpp
View file @
a04759de
...
...
@@ -70,7 +70,8 @@ void AccountServiceToggleJob::start()
Accounts
::
Service
service
=
accountsManager
->
service
(
d
->
serviceId
);
if
(
!
service
.
isValid
())
{
// qWarning() << "Looks like we might have been given a name instead of an ID for the service, which will be expected when using the Ubuntu AccountServiceModel, which only gives you the name";
for
(
const
Accounts
::
Service
&
aService
:
account
->
services
())
{
const
auto
services
=
account
->
services
();
for
(
const
Accounts
::
Service
&
aService
:
services
)
{
if
(
aService
.
displayName
()
==
d
->
serviceId
)
{
service
=
aService
;
break
;
...
...
@@ -86,7 +87,8 @@ void AccountServiceToggleJob::start()
account
->
setEnabled
(
true
);
}
else
{
bool
shouldStayEnabled
=
false
;
for
(
const
Accounts
::
Service
&
accountService
:
account
->
services
())
{
const
auto
services
=
account
->
services
();
for
(
const
Accounts
::
Service
&
accountService
:
services
)
{
// Skip the current service, that is not synced to the account yet
// so it would return the state before the user clicked the checkbox
if
(
accountService
==
service
)
{
...
...
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