Details
-
User Story
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
Example from Qt itself:
1: QDEBUG : tst_QLocale::formatDate() expected data of type 'QString', got 'char8_t [64]' for element 1 of data with tag 'unicode in format string' 1: QFATAL : tst_QLocale::formatDate() ASSERT: "false" in file /home/marc/Qt/qtbase/src/testlib/qtestdata.cpp, line 105 1: FAIL! : tst_QLocale::formatDate() Received a fatal error.
It's pretty obvious what's happening: instead of the QVariant(const char*) ctor, it's now using QVariant::fromValue(), which stores it as a char8_t[64], and it doesn't know that the two are convertible.
Attachments
Issue Links
- split from
-
QTBUG-99479 As a user of Qt, whose code works in C++17, I want my code to work in C++20, too.
- Open
Gerrit Reviews
For Gerrit Dashboard: QTBUG-99481 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
387909,6 | QVariant: fix handling of u8 literals in C++20 mode | dev | qt/qtbase | Status: NEW | -1 | 0 |
387910,2 | QTestData: fix streaming of u8 string literals in C++20 mode | dev | qt/qtbase | Status: MERGED | +2 | 0 |
388145,2 | QTestData: fix streaming of u8 string literals in C++20 mode | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
388146,2 | QTestData: fix streaming of u8 string literals in C++20 mode | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
388194,2 | QTestData: fix streaming of u8 string literals in C++20 mode | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |