Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99481

As a user of QVariant, I think QVariant should treat char8_t string literals the same as char ones

    XMLWordPrintable

Details

    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

          For Gerrit Dashboard: QTBUG-99481
          # Subject Branch Project Status CR V

          Activity

            People

              cnn Qt Core & Network
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews