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

Null icons handling changed in 4.6.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 4.6.0
    • Image formats
    • None

    Description

      There is a little code snippet:

      #include <QApplication>
      #include <QIcon>
      #include <QDebug>
      //
      int main(int argc, char *argv[]) {
        QApplication app(argc, argv);
      
        qDebug() << QIcon().isNull();
        qDebug() << QIcon().pixmap(16, 16).size();
      }
      

      Using Qt 4.5.3 it prints:

      true
      QSize(0, 0)

      And with Qt 4.6.0:

      true
      QSize(-1, -1)

      In fact, on Linux it affects QMdiSubWindow class when no custom icon is set for the application.
      On each instance creation I get the following warning:

      QWidget::setMinimumSize: (/QMdi::ControlLabel) Negative sizes (-1,-1) are not possible

      This is because inner class ControlLabel is trying to set it's minimum size to the size of a pixmap converted from QApplication::windowIcon() which is null.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            uriel Lopatkin Ilya
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes