Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.3.0 Feature Freeze
Description
In QAction
QAction has a property called "shortcut" and related methods shortcut(), shortcuts(), setShortcut(), and setShortcuts().
These names imply the involvement of QShortcut, but actually the "shortcut" property holds the primary QKeySequence.
In QShortcut
QShortcut has a property called "key" and related methods key() and setKey().
These names imply a singular key, but actually the "key" property holds a QKeySequence (multiple keys).
In QML Shortcut
Shortcut has 2 properties called "sequence" and "sequences". Their 'setters' are analogous to QAction::setShortcut() and QAction::setShortcuts()
Main suggestion
Use more consistent and unambiguous property/accessor names; unify the Widget versions with their QML counterparts.
Possible candidates:
- QShortcut::setKeySequence(const QKeySequence &)
- QAction::setPrimaryKeySequence(const QKeySequence &)
- QAction::setKeySequences(const QList<QKeySequence> &)
- Shortcut.primaryKeySequence
- Shortcut.keySequences
Secondary suggestion
Revisit the design, naming, and relationships between QMenu, QAction, QKeySequence, QShortcut. (For example: Should an "Action" be checkable? Should an "Action" have a menu role?)
Keep the Widget versions consistent with their QML counterparts.