Skip to content

Commit

Permalink
qt: Fix deprecated QCharRef usage
Browse files Browse the repository at this point in the history
Port bitcoin/bitcoin#18101 to
our codebase. Without this commit every Alt-Tab or other
keypress on the SplashScreen will lead to the following
message in debug.log:

GUI: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
  • Loading branch information
DeckerSU committed Jul 7, 2023
1 parent 30fd64b commit be4333c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qt/splashscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ SplashScreen::~SplashScreen()
bool SplashScreen::eventFilter(QObject * obj, QEvent * ev) {
if (ev->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
if(keyEvent->text()[0] == 'q') {
if (keyEvent->key() == Qt::Key_Q) {
StartShutdown();
}
}
Expand Down

0 comments on commit be4333c

Please sign in to comment.