Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run connection wizard when quitting the application #1478

Merged
merged 5 commits into from
Oct 16, 2019

Conversation

sryze
Copy link
Contributor

@sryze sryze commented Oct 5, 2019

Problem: When you quit Nextcloud it shows the "New connection" wizard briefly before exit every time.

I nailed it down to the accountRemoved signal of AccountManager which is handled in Application::slotAccountStateRemoved(). That handler runs the connection wizard when there are no accounts left. Because all the accounts are removed from AccountManager during application shutdown, this event gets triggered at that time.

As a "fix" I added a new flag _isQuitting to the Application class that is set in the aboutToQuit handler (slotCleanup). This is probably a little ugly and there might be a better way to do it, e.g. remove the signal handler for accountRemoved instead of setting a flag, but I'm not 100% sure this would not break something, so I chose a safer route 😃

Signed-off-by: Sergey Zolotarev <sryze@protonmail.com>
@DominiqueFuchs
Copy link
Contributor

Hi @sryze , thanks a lot for reporting this and contributing! Will review in a bit

Copy link
Contributor

@DominiqueFuchs DominiqueFuchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some remarks / discussion points. Maybe @misch7 or @camilasan find the time to throw in their opinion. Thanks again! :-)

src/gui/application.cpp Outdated Show resolved Hide resolved
src/gui/application.cpp Outdated Show resolved Hide resolved
src/gui/application.cpp Outdated Show resolved Hide resolved
sryze and others added 2 commits October 9, 2019 11:07
Copy link
Member

@misch7 misch7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good catch, thanks! 🎉

One problem less on our list :-)

@misch7 misch7 merged commit 09bae4d into nextcloud:master Oct 16, 2019
@misch7
Copy link
Member

misch7 commented Oct 16, 2019

/backport to stable-2.6

@backportbot-nextcloud
Copy link

The backport to stable-2.6 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants