mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge #18101: qt: Fix deprecated QCharRef usage
ac57859e53167f4ff3da467b616b0902c93701a9 qt: Fix deprecated QCharRef usage (Hennadii Stepanov) Pull request description: From Qt docs: - [`QKeyEvent::text()`](https://doc.qt.io/qt-5/qkeyevent.html#text): > Return values when modifier keys such as Shift, Control, Alt, and Meta are pressed differ among platforms and could return an empty string. - [`QString::operator[]()`](https://doc.qt.io/qt-5/qstring.html#operator-5b-5d): > **Note:** Before Qt 5.14 it was possible to use this operator to access a character at an out-of-bounds position in the string, and then assign to such a position, causing the string to be automatically resized. Furthermore, assigning a value to the returned `QCharRef` would cause a detach of the string, even if the string has been copied in the meanwhile (and the `QCharRef` kept alive while the copy was taken). These behaviors are deprecated, and will be changed in a future version of Qt. Since Qt 5.14 this causes a `QCharRef` warning if any modifier key is pressed while the splashscreen is still displayed. Fix #18080. Note: Ctrl+Q will also close the spashscreen now. ACKs for top commit: jonasschnelli: utACK ac57859e53167f4ff3da467b616b0902c93701a9 Tree-SHA512: a7e5559410bd05c406007ab0243f458b82d434b0543276ed331254c8d7a6b1aaa54d0b406f799b830859294975004380160f8af04ba403d3bf185d51e6784f54
This commit is contained in:
parent
9cdcdf2c5d
commit
2a3fa63dc1
@ -143,7 +143,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) {
|
||||
m_node.startShutdown();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user