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

QtPdf: stop using private API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.3
    • PDF
    • None

      Qt WebEngine requires the ability to run newer versions even with older (LTS) releases of Qt (to be able to update frequently to get security fixes, for one reason); therefore no private API from other Qt modules is in use (to avoid actual BC issues, and also because of the artificial qFatal "incompatible version" error).

      QtPdf lives in the qtwebengine repository.  It can be argued that similar security concerns exist: people download PDF files from the web, email them to each other, and so on; so if a vulnerability were found, Google would update the PDFium code to fix it, and we'd want to make a timely release of the fix in all supported versions of Qt.  So most likely the QtPdf releases will follow the cadence of webengine releases.

      It's anyway a good practice to avoid depending on private API between modules.

      Unfortunately this means when we subclass any QObject, and wish to have a PIMPL, the private class cannot inherit QObjectPrivate; so the public class needs another d-pointer.  It's a little wasteful; but this is the same issue every Qt user faces in the same situation.

      Some classes in QtPdf were already designed that way, but others aren't.  This task is "done" when we can verify that no #include <Qt*/private/something.h> exist and when we have removed LIBRARIES Qt::CorePrivate and Qt::QuickPrivate from CMakeLists.txt.

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

            srutledg Shawn Rutledge
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change