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

Provide operator==() for QIcon

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.15
    • Other
    • None

    Description

      QIcon is a value type with copy and move semantics. However, it doesn't implement operator==, which blocks it from being usable with the new QProperty framework.

      Implementing an operator== that does a pixel comparison is probably overkill, also because the icon engine might do whatever it wants when generating the actual pixmaps.

      Comparing two QIcon instances as equal when they are copies of each other would be trivial and cheap, and generally delivers on the expectation that

      QIcon two = one;
      Q_ASSERT(two == one);
      

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes