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

qmlcompiler should construct QColors using QColorConstants, not by string

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • 6.7
    • None
    • QML: Compiler

    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

          Activity

            People

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

              Dates

                Created:
                Updated: