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

QIcon::isNull() returns false even when QIcon constructed with non-existent file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 4.3.1
    • Image formats
    • None

      The QIcon::isNull() function simply returns whether or not the icon contains a valid d-pointer. This causes problems because if the QIcon constructor (takes a filename) or the addFile() function is called with an invalid filename, then the d-pointer gets initialized anyway even though the file doesn't exist. This differs from the behavior of classes like QPixmap and QImage which will be null if the file does not exist.

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

            rodal Samuel Rødal
            jabarron Jason Barron
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes