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

"DrawTextItemDevice::metric: Invalid metric command" output on OS X with QStaticText

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.3.0 Beta1
    • 5.2.0
    • GUI: Painting
    • None
    • OS X 10.8.5
    • macOS
    • 77bf302ce2d69fb01e41b02329fdb8419b6e9e52

    Description

      When outputting a QStaticText on OS X many log messages "DrawTextItemDevice::metric: Invalid metric command" are written.

      Call stack:
      (anonymous namespace)::DrawTextItemDevice::metric(QPaintDevice::PaintDeviceMetric) const
      QPainterPrivate::effectiveDevicePixelRatio() const
      QPainterPrivate::hidpiScaleTransform() const
      QPainterPrivate::updateMatrix()
      QPainter::setWorldTransform(QTransform const&, bool)
      QPainter::setTransform(QTransform const&, bool)
      QStaticTextPrivate::init()
      QPainter::drawStaticText(QPointF const&, QStaticText const&)
      QPainter::drawStaticText(int, int, QStaticText const&)
      HexEditorCoreQT::drawText(_DOUBLE_POINT&, UNICODE_BUFFER*)

      In QPainterPrivate::effectiveDevicePixelRatio() there is a Mac-specific call to device->metric(QPaintDevice::PdmDevicePixelRatio)

      The problem is reproducible with the attached simple environment.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            pi31415926 Andreas Pehnack
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes