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

Some QColor::setX() functions do not invalidate instance

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS

    Description

      The QColor functions setRgb(), setHsv(), setHsl(), setCmyk() together with their float variants set...f() all check the incoming values but are inconsistent in clearing the QColor instance on invalid input.

      I attached the current (2017-08-11) head revision of qcolor.cpp as well as a patched version of that file with all missing calls to invalidate() added.

      This patch would change current behavior:
      For example, setCmyk() currently preserves the original QColor on invalid input, after the patch it would invalidate().
      So it probably targets Qt6.

      Attachments

        1. qcolor_head.cpp
          89 kB
        2. qcolor_patched.cpp
          89 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            mhennings Martin Hennings
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes