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

QMacStyle::subElementRect with SE_LineEditContents crashes with NULL input widget.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.2
    • 4.8.2, 5.0.0
    • GUI: Look'n'Feel
    • None
    • I'm on OS X 10.6.8, but that's clearly not relevant.
      In Qt 4.8.2.
    • 7cc3a3adf2952b94616785472f3541f97c4ee012

    Description

      Here is the SE_LineEditContents code from QMacStyle::subElementRect():

          case SE_LineEditContents:
              rect = QWindowsStyle::subElementRect(sr, opt, widget);
              if(widget->parentWidget() && qobject_cast<const QComboBox*>(widget->parentWidget()))
                  rect.adjust(-1, -2, 0, 0);
              else
                  rect.adjust(-1, 0, 0, +1);
              break;
      

      Note that it dereferences widget without checking for NULL.

      Attachments

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

        Activity

          People

            bachewii Jens
            johnweeks John Weeks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes