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

Provide operator==() for QIcon

XMLWordPrintable

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

      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);
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes