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

Qt 5 to-do in qpaintengineex_p.h

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.5.1
    • Component/s: GUI: Painting
    • Labels:
      None
    • Technical Risk:
      Normal
    • Commits:
      f2b77e3ff71511944ad8da56cb63c4ca8daf6417

      Description

      qtbase/src/gui/painting/qpaintengineex_p.h contains the following Qt 5 to-do comment:

      qpaintengineex_p.h
          // ### Qt5: remove, once QtGui is merged into QtGui and QtWidgets
          // Return a pixmap filter of "type" that can render the parameters
          // in "prototype".  The returned filter is owned by the engine and
          // will be destroyed when the engine is destroyed.  The "prototype"
          // allows the engine to pick different filters based on the parameters
          // that will be requested, and not just the "type".
          virtual QPixmapFilter *pixmapFilter(int /*type*/, const QPixmapFilter * /*prototype*/) { return 0; }
      

      This function is then called four times in src/widgets/effects/qpixmapfilter.cpp, all following thispattern:

      qpixmapfilter.cpp
          QPixmapFilter *filter = painter->paintEngine() && painter->paintEngine()->isExtended() ?
              static_cast<QPaintEngineEx *>(painter->paintEngine())->pixmapFilter(type(), this) : 0;
          QPixmapConvolutionFilter *convolutionFilter = static_cast<QPixmapConvolutionFilter*>(filter);
          if (convolutionFilter) {
              convolutionFilter->setConvolutionKernel(d->convolutionKernel, d->kernelWidth, d->kernelHeight);
              convolutionFilter->d_func()->convoluteAlpha = d->convoluteAlpha;
              convolutionFilter->draw(painter, p, src, srcRect);
              return;
          }
      

      ....where all this code is redundant because filter is always 0.

      The to-do comment should be resolved for the 5.0.0 Beta. As the header containing the function is private, source-compatibility should not be a problem.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              sgaist Samuel Gaist
              Reporter:
              jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes