Skip to content

Unused self parameters in Q*Application methods #1205

Open
@jnbooth

Description

@jnbooth

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🥳🎉 1.0This issue is part of stabilization for 1.0 release🪲 bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions