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

Feature/improve desktop integration dialog #400

Conversation

azubieta
Copy link
Collaborator

@azubieta azubieta commented Feb 12, 2021

Replace the inline "Desktop Integration" dialog with a class. This will allow us to customize the dialog in the future.

Screenshot_20210326_170333

@azubieta
Copy link
Collaborator Author

This is the first PR of many, the main focus will be to improve the integration dialog, please review.

@azubieta azubieta requested a review from TheAssassin February 12, 2021 03:18
@vadi2
Copy link

vadi2 commented Feb 20, 2021

Any updates?

Copy link
Owner

@TheAssassin TheAssassin left a comment

Choose a reason for hiding this comment

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

Sorry it took so long, but I only got to having a look at your PR now. I like the change overall, but found a few things I'd like to be changed, mostly minor stuff.

I'd highly appreciate an example screenshot in UI-related PRs by the way. I also try to always provide screenshots in projects I contribute to.

src/ui/main.cpp Show resolved Hide resolved
src/ui/integration_dialog.cpp Outdated Show resolved Hide resolved
src/ui/integration_dialog.cpp Outdated Show resolved Hide resolved
src/ui/integration_dialog.cpp Outdated Show resolved Hide resolved
src/ui/integration_dialog.cpp Outdated Show resolved Hide resolved
@TheAssassin
Copy link
Owner

Your screenshot looks pretty good, although the window should probably expand vertically, like the old dialog did.

We fear that it may cause errors somewhere else as the documentation says nothing about if it's safe or not.
@azubieta azubieta requested a review from TheAssassin March 29, 2021 19:22
// cannot use messageBox.exec(), will produce SEGFAULTS as QCoreApplications can't show message boxes
messageBox->show();
// As the integration dialog is the only window in our application we can safely use its exec method
integrationDialog->exec();
Copy link
Owner

Choose a reason for hiding this comment

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

Now I'm curious: why are you calling the dialog's exec() now? I'm pretty sure you used to call QApplication::exec().

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this scenario the QDialog is the only window and the only part of the code that relies on the QEventsLoop. Which meas that once the dialog exits we will not required the events loop enymore.

The QDialog::exec method starts an evenstloop for its sole use, therefore is a good fit. We would have to use the QAppliaction::exec if there were other events (signals/slots) to be processed after the dialog is closed.

Copy link
Owner

Choose a reason for hiding this comment

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

Exactly what I was thinking, too. Thanks for clarifying. We can always fix/improve if we get rid of the solely synchronous workflow (although I'm sure there's higher priorities).

@TheAssassin TheAssassin merged commit 52d7ace into TheAssassin:master Mar 29, 2021
@TheAssassin
Copy link
Owner

Thanks again!

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

Successfully merging this pull request may close these issues.

3 participants