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

qmlcompiler should construct QColors using QColorConstants, not by string

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 6.5
    • Component/s: QML: Compiler
    • Labels:

      Description

      The QML compiler translates colour properties to strings, it seems:

       

      qt5-build-2/qtdeclarative/tests/auto/qml/qmltc/.qmltc/tst_qmltc_nodiskcache/properties.cpp:86: this->m_colorP = QStringLiteral("blue");
       

      This is needlessly inefficient. For named values, it should use QColorConstants::blue, in this case, and for RGB triples or ARGB quads the corresponding QColor(int, ..., int) ctor.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qtqmlteam Qt Qml Team User
              Reporter:
              mmutz Marc Mutz
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes