QRCode: Use UTF8 chars for code generation

QString.append() expects UTF8 chars, but this is not standard on all platforms.
This commit is contained in:
Felix Kauselmann 2023-04-22 20:11:21 +02:00
parent d6b1c68285
commit 0ead759364

View File

@ -80,9 +80,9 @@ void printServerInfo(YACReaderHttpServer *httpServer)
for (int x = -border - 1; x < code.getSize() + border + 1; x++) { for (int x = -border - 1; x < code.getSize() + border + 1; x++) {
QRCodeString.append((code.getModule(x, y) && code.getModule(x, y + 1)) QRCodeString.append((code.getModule(x, y) && code.getModule(x, y + 1))
? " " ? " "
: code.getModule(x, y + 1) ? "\u2580" : code.getModule(x, y + 1) ? u8"\u2580"
: code.getModule(x, y) ? "\u2584" : code.getModule(x, y) ? u8"\u2584"
: "\u2588"); : u8"\u2588");
} }
QLOG_INFO() << QRCodeString; QLOG_INFO() << QRCodeString;
} }