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

Qt: Save UI settings and geometry safely on closeEvent #14060

Merged
merged 1 commit into from Jun 29, 2023

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Jun 20, 2023

  • Parameters may have changed before the destructor of Qt objects have been called, save UI geometry and settings in closeEvent instead.
  • Save to disk once the dialog or main window is closed so force application termination or powerloss won't cause the settings to be lost. (but not too frequantly because it can spam the disk)

@elad335 elad335 force-pushed the save-safe branch 3 times, most recently from 552583c to 3f91a95 Compare June 20, 2023 16:53
@elad335 elad335 marked this pull request as draft June 20, 2023 17:12
@Megamouse
Copy link
Contributor

This is all unrelated

@Megamouse Megamouse closed this Jun 20, 2023
@Megamouse Megamouse reopened this Jun 20, 2023
@Megamouse
Copy link
Contributor

Sorry, wrong button

@elad335 elad335 changed the title Qt: Save UI setting safely on closeEvent Game List: Fix sorting by space on disk Jun 21, 2023
@elad335 elad335 marked this pull request as ready for review June 21, 2023 05:42
@elad335 elad335 force-pushed the save-safe branch 2 times, most recently from 1e8ee9f to e10a293 Compare June 21, 2023 06:01
@elad335
Copy link
Contributor Author

elad335 commented Jun 21, 2023

Fixed properly now.

@Megamouse
Copy link
Contributor

The whole sorting makes no sense unless you already scrolled through the entire list.
That's why I never bothered.
With this change, scrolling the list should be very unintuitive since it sorts while you are navigating.

Also, 50% of these changes seem entirely random and unrelated to the issue.

@Megamouse Megamouse added the GUI label Jun 21, 2023
@elad335 elad335 force-pushed the save-safe branch 2 times, most recently from 4dad3bd to e82cde1 Compare June 29, 2023 09:43
@elad335 elad335 changed the title Game List: Fix sorting by space on disk Qt: Save UI settings and geometry safely on closeEvent Jun 29, 2023
@elad335
Copy link
Contributor Author

elad335 commented Jun 29, 2023

Changed the purpose of the pr.

@Megamouse
Copy link
Contributor

I don't understand why this is necessary.
I never had any issues with any of this.

@elad335
Copy link
Contributor Author

elad335 commented Jun 29, 2023

I think @Darkhost1999 posted it fixed the geomtery saving for his setup on discord.

rpcs3/rpcs3qt/pad_settings_dialog.cpp Show resolved Hide resolved
Comment on lines 2223 to 2229
WaitAndAbortSizeCalcThreads();
WaitAndAbortRepaintThreads();
gui::utils::stop_future_watcher(m_parsing_watcher, true);
gui::utils::stop_future_watcher(m_refresh_watcher, true);

SaveSettings();

Copy link
Contributor

Choose a reason for hiding this comment

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

There seems to be a fundamental misunderstanding of the QDockWidget::closeEvent...
This event is only triggered if you manually click the X in the dock.
So this change is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

main_windoww::closeEvent also calls m_game_list_frame->SaveSettings().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it.

Copy link
Contributor

Choose a reason for hiding this comment

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

main_windoww::closeEvent also calls m_game_list_frame->SaveSettings().

Well. now it probably isn't saved when you actually use the closeEvent.
I don't understand the constant need to change everything seemingly just out of boredom

@Megamouse Megamouse merged commit 593f850 into RPCS3:master Jun 29, 2023
4 of 5 checks passed
@elad335 elad335 deleted the save-safe branch June 29, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants