From 6618feff257e5fde0ed8c504e4951ecae32ced32 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 18 Oct 2024 10:01:36 -0700 Subject: [PATCH] qmljs: fix build with Qt 6.9 Commit 9ef4c123c39c642357c9e8530d59f32f220a7824 in qtbase disabled implicit conversions from other types via integer types to QChar. And for some reason uchar is not one of those types. Change-Id: I5921372d3a508fa02166fffd6a96f37bc9a09d69 Reviewed-by: Ahmad Samir Reviewed-by: Marc Mutz Reviewed-by: hjk --- src/libs/qmljs/parser/qmljslexer.cpp | 3 ++- src/plugins/debugger/watchhandler.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/qmljs/parser/qmljslexer.cpp b/src/libs/qmljs/parser/qmljslexer.cpp index c3645b94199..9c2dca28027 100644 --- a/src/libs/qmljs/parser/qmljslexer.cpp +++ b/src/libs/qmljs/parser/qmljslexer.cpp @@ -1018,7 +1018,8 @@ again: int Lexer::scanString(ScanStringMode mode) { - QChar quote = (mode == TemplateContinuation) ? QChar(TemplateHead) : QChar(mode); + char quoteChar = (mode == TemplateContinuation) ? TemplateHead : mode; + QChar quote(quoteChar); // we actually use T_STRING_LITERAL also for multiline strings, should we want to // change that we should set it to: // _state.tokenKind == T_PARTIAL_SINGLE_QUOTE_STRING_LITERAL || diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 804dbd407c2..a8b49c54b1f 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -658,7 +658,7 @@ static QString reformatCharacter(int code, int size, bool isSigned) QChar c; switch (size) { - case 1: c = QChar(uchar(code)); break; + case 1: c = QChar(char(code)); break; case 2: c = QChar(uint16_t(code)); break; case 4: c = QChar(uint32_t(code)); break; default: c = QChar(uint(code)); break;