-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workaround for an issue related to (QTBUG-79216), where dead keys whe…
…re simply ignored in web widgets
- Loading branch information
Showing
2 changed files
with
164 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,10 +170,19 @@ class UBGraphicsWidgetItem : public QGraphicsProxyWidget, public UBItem, public | |
QUrl mWidgetUrl; | ||
QMap<QString, QString> mDatastore; | ||
QMap<QString, QString> mPreferences; | ||
|
||
#ifndef Q_OS_WIN | ||
/* | ||
* workaround for QTBUG-79216 - to be removed when bug is fixed | ||
*/ | ||
Qt::Key mLastDeadKey; | ||
QMap<Qt::Key, QString> mDeadKeys; | ||
QMap<QString, QString> mAccentedCharacters; | ||
QString getAccentedLetter(Qt::Key deadKey, QString letter); | ||
This comment has been minimized.
Sorry, something went wrong.
letsfindaway
Collaborator
|
||
#endif | ||
|
||
virtual bool event(QEvent *event) override; | ||
virtual void dropEvent(QGraphicsSceneDragDropEvent *event) override; | ||
virtual void keyPressEvent(QKeyEvent *event) override; | ||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override; | ||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override; | ||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; | ||
|
typo. Should be
previousDeadKeyEvent
.And do you know whether the allocated
QKeyEvent
objects will be released later? I assume they have to be deleted here after they have been passed toQGraphicsProxyWidget::keyPressEvent
. In this case it might be better to use variables instead of pointers and to pass the address of these variables: