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

Unused self parameters in Q*Application methods #1205

Open
jnbooth opened this issue Mar 1, 2025 · 1 comment · May be fixed by #1216
Open

Unused self parameters in Q*Application methods #1205

jnbooth opened this issue Mar 1, 2025 · 1 comment · May be fixed by #1216
Labels
🪲 bug Something isn't working 🥳🎉 1.0 This issue is part of stabilization for 1.0 release

Comments

@jnbooth
Copy link
Contributor

jnbooth commented Mar 1, 2025

In QCoreApplication, QGuiApplication, and QApplication, static methods are handled in three different ways, arbitrarily:

  1. No self parameter
  2. &self
  3. Pin<&mut Self>

The first approach is the only correct one. The second approach has an unused parameter, but at least it doesn't do anything with it. The third approach adds pinning and mutability logic that, again, is completely unused. It's passing around and wrapping and unwrapping a mutable pointer to an object that nothing happens to.

Obviously, removing those parameters would cause breaking changes, but I think it should probably be done in time for 1.0.

@LeonMatthesKDAB LeonMatthesKDAB added 🪲 bug Something isn't working 🥳🎉 1.0 This issue is part of stabilization for 1.0 release labels Mar 5, 2025
@LeonMatthesKDAB
Copy link
Collaborator

That sounds strange indeed, let's consider this a bug, so should be fixed pre-1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working 🥳🎉 1.0 This issue is part of stabilization for 1.0 release
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants