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

Fix the crash in the interface for managing preference packs #18726

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

xtemp09
Copy link
Contributor

@xtemp09 xtemp09 commented Dec 26, 2024

Closes #18725. The cause of the crash is a direct invocation of QDialog::showEvent(QShowEvent *event) with nullptr, leading to the segmentation fault. 1 Simple minuscule refactoring fixes it.

Footnotes

  1. https://github.com/qt/qtbase/blob/d89cef439f5c1a58aeff879a12d9a33292764b7f/src/widgets/dialogs/qdialog.cpp#L851-L860

@github-actions github-actions bot added the Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Dec 26, 2024
@luzpaz
Copy link
Contributor

luzpaz commented Dec 27, 2024

Lint complaining about something in your commit:

redundant void argument list in function definition [modernize-redundant-void-arg]

@xtemp09
Copy link
Contributor Author

xtemp09 commented Dec 27, 2024

If I declare a function as fun(),I have a strange feeling that I have forgotten something. If I write fun(void), it feels like everything is in place. Empty parentheses can be confused with operator().

Fortunately, if it violates coding standards, pre-commit hooks will fix it before merge.

@yorikvanhavre
Copy link
Member

We are trying to make our best to reduce lint warnings... @xtemp09 could you make the change? Apparently precommit didn't fix it.

@xtemp09
Copy link
Contributor Author

xtemp09 commented Jan 6, 2025

Done

@chennes chennes merged commit 2fcbe6e into FreeCAD:main Jan 20, 2025
9 checks passed
@xtemp09 xtemp09 deleted the DPPMI-fix branch January 21, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preferences: Crash in Preferences → "Manage Preference Packs"
4 participants