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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.3.0 Beta1
    • Component/s: GUI: Painting
    • Labels:
      None
    • Environment:
      OS X 10.8.5
    • Platform/s:
      macOS
    • Commits:
      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

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            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