1. 23 Oct, 2021 3 commits
  2. 19 Oct, 2021 1 commit
    • Matthias Möller's avatar
      fix potential mem leak on connection lost · 9749bcc9
      Matthias Möller authored
      
      
      The PostgreSQL driver can change it's connection status
      after the first established connection.
      In this case, the function "isOpen()" returns false
      and the "close()" function would not free all resources.
      With this fix, the "close()" function
      always frees any allocated resource
      independent of the connection status.
      
      Fixes: QTBUG-88984
      Pick-to: 6.0 5.15 5.12
      Change-Id: I7c9add6a183bf46a8573952ab39f8cb1f728c00c
      Reviewed-by: default avatarAndy Shaw <andy.shaw@qt.io>
      (cherry picked from commit 6e912560)
      9749bcc9
  3. 18 Oct, 2021 3 commits
  4. 16 Oct, 2021 4 commits
  5. 15 Oct, 2021 4 commits
  6. 12 Oct, 2021 2 commits
  7. 06 Oct, 2021 1 commit
  8. 05 Oct, 2021 2 commits
  9. 04 Oct, 2021 2 commits
    • Eirik Aavitsland's avatar
      Avoid generating large pdf files when using dashed cosmetic pens · cbb138f4
      Eirik Aavitsland authored
      
      
      There was a bug in the pdf writer for cosmetic pens when they were
      drawn using native pdf strokes (QTBUG-68537). The workaround that was
      done for that bug was to disable native atroking for such pens, so
      they would always be emulated. The drawback of that was that painting
      with dashed cosmetic pens would then produce unexpectedly large pdf
      files, since it would contain individual strokes for every dash.
      
      This change fixes the original bug and removes the workaround,
      re-enabling native stroking for cosmetic lines.
      
      Pick-to: 6.2 5.15
      Fixes: QTBUG-86094
      Change-Id: I58d06ad2db81206025ca2de394f072e822c03d47
      Reviewed-by: default avatarLars Knoll <lars.knoll@qt.io>
      Reviewed-by: default avatarAlbert Astals Cid <albert.astals.cid@kdab.com>
      Reviewed-by: default avatarAndré de la Rocha <andre.rocha@qt.io>
      (cherry picked from commit 6d41b64d)
      cbb138f4
    • Eirik Aavitsland's avatar
      PDF generation: disentangle native pen from transforms · 00531a48
      Eirik Aavitsland authored
      
      
      In the PDF engine, transforms are implented with a global pdf
      transform if and only if the current pen is "simple", that is,
      renderable by a native pdf pen. For non-simple pens, the painted
      objects are transformed by QTransform instead. Hence, the internal
      simplePen flag was used to indicate both a pen state and a transform
      state.
      
      This commit splits these two states into separate flags. No behavior
      is changed, but it prepares for an improved implementation of cosmetic
      pen rendering.
      
      Pick-to: 6.2 5.15
      Task-number: QTBUG-86094
      Change-Id: If02e1dfc021778e3db7c9ff9a1ed35b3d6cbf3f8
      Reviewed-by: default avatarLars Knoll <lars.knoll@qt.io>
      Reviewed-by: default avatarAndré de la Rocha <andre.rocha@qt.io>
      (cherry picked from commit 2cb42cd8)
      00531a48
  10. 01 Oct, 2021 4 commits
  11. 30 Sep, 2021 1 commit
  12. 23 Sep, 2021 1 commit
  13. 21 Sep, 2021 2 commits
  14. 12 Sep, 2021 2 commits
    • David Faure's avatar
      QTextOdfWriter: fix exporting pixmaps to ODT · aa36d950
      David Faure authored
      
      
      The QVariant returned by resource() can contain either a QPixmap
      or a QImage. The code here is now more similar to the one in
      qtextimagehandler.cpp.
      
      Also, the quality is 0 when not set, in which case we want a nice PNG
      rather than a very very low quality JPG with just a few large blocks of
      same-color pixels.
      
      Pick-to: 5.15 6.2
      Change-Id: I49db542e2234c8068f85a636a81a7d8cdb7b5876
      Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
      Reviewed-by: default avatarLars Knoll <lars.knoll@qt.io>
      (cherry picked from commit b67f887a)
      aa36d950
    • Volker Krause's avatar
      Fix access to content: URLs with transient read/write permissions · 2e06c425
      Volker Krause authored
      
      
      The current code assumed that the lack of persistent permissions means
      we cannot access the file at all. That however isn't the case for
      content: URLs we get e.g. via Intents, those are accessible perfectly
      fine via QFile, we just don't have (and can't obtain) persistent
      permissions for them.
      
      This is done by continuing in the case of not having persistent
      permissions and checking for SecurityExceptions that are thrown when
      accessing content: URLs we really have no permission for.
      
      Pick-to: 6.2 5.15
      Change-Id: I39115a7730d717eb9517e4f1c1a57e40988001a5
      Reviewed-by: default avatarAssam Boudjelthia <assam.boudjelthia@qt.io>
      (cherry picked from commit ec497d5e)
      2e06c425
  15. 25 Aug, 2021 1 commit
  16. 23 Aug, 2021 1 commit
  17. 22 Aug, 2021 2 commits
  18. 21 Aug, 2021 3 commits
    • Eirik Aavitsland's avatar
      Refix for avoiding huge number of tiny dashes · 427df34e
      Eirik Aavitsland authored
      
      
      Previous fix hit too widely so some valid horizontal and vertical
      lines were affected; the root problem being that such lines have an
      empty control point rect (width or height is 0). Fix by caculating in
      the pen width.
      
      Pick-to: 6.2 6.1 5.15
      Change-Id: I7a436e873f6d485028f6759d0e2c6456f07eebdc
      Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
      (cherry picked from commit 84aba809)
      427df34e
    • Eirik Aavitsland's avatar
      Improve fix for avoiding huge number of tiny dashes · fed5713e
      Eirik Aavitsland authored
      
      
      Some pathological cases were not caught by the previous fix.
      
      Fixes: QTBUG-95239
      Pick-to: 6.2 6.1 5.15
      Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5
      Reviewed-by: default avatarRobert Löhning <robert.loehning@qt.io>
      (cherry picked from commit 6b400e31)
      fed5713e
    • Eirik Aavitsland's avatar
      Avoid processing-intensive painting of high number of tiny dashes · 081d835c
      Eirik Aavitsland authored
      
      
      When stroking a dashed path, an unnecessary amount of processing would
      be spent if there is a huge number of dashes visible, e.g. because of
      scaling. Since the dashes are too small to be indivdually visible
      anyway, just replace with a semi-transparent solid line for such
      cases.
      
      Pick-to: 6.1 6.0 5.15
      Change-Id: I9e9f7861257ad5bce46a0cf113d1a9d7824911e6
      Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
      (cherry picked from commit f4d791b3)
      
      * asturmlechner 2021-08-21:
      Conflict from preceding 94dd2ceb in dev branch:
      	src/gui/painting/qpaintengineex.cpp
      	Resolved via:
      
           if (pen.style() > Qt::SolidLine) {
               QRectF cpRect = path.controlPointRect();
               const QTransform &xf = state()->matrix;
      -        if (pen.isCosmetic()) {
      +        if (qt_pen_is_cosmetic(pen, state()->renderHints)){
                   clipRect = d->exDeviceRect;
                   cpRect.translate(xf.dx(), xf.dy());
               } else {
      
      FTBFS from preceding 471e4fcb in dev branch changing QVector to QList:
      	Resolved via:
      
               QRectF extentRect = cpRect.adjusted(-pw, -pw, pw, pw) & clipRect;
               qreal extent = qMax(extentRect.width(), extentRect.height());
               qreal patternLength = 0;
      -        const QList<qreal> pattern = pen.dashPattern();
      +        const QVector<qreal> pattern = pen.dashPattern();
               const int patternSize = qMin(pattern.size(), 32);
               for (int i = 0; i < patternSize; i++)
                   patternLength += qMax(pattern.at(i), qreal(0));
      081d835c
  19. 12 Aug, 2021 1 commit
    • Liang Qi's avatar
      xcb: add a timeout control when reading INCR property · 2583b4f9
      Liang Qi authored
      
      
      For the first call of QXcbClipboard::clipboardReadProperty()
      inside of clipboardReadIncrementalProperty() in getSelection(),
      it will get a XCB_NONE reply before the contents arrived via
      property change. Then we give a chance to read more.
      
      Manually tested with following setups:
      * examples/widgets/mainwindows/application with gvim(gtk3)
      * examples/widgets/widgets/imageviewer with GIMP 2.10.18(based on
      gtk2) and GIMP 2.99.6(based on gtk3 via flatpak)
      
      Fixes: QTBUG-56595
      Pick-to: 5.12 5.15 6.1 6.2
      Done-With: JiDe Zhang <zhangjide@uniontech.com>
      Change-Id: Ib45f08464d39ad79137b1da99808c89b7dca2d08
      Reviewed-by: default avatarJiDe Zhang <zhangjide@uniontech.com>
      Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
      (cherry picked from commit 02248eea)
      2583b4f9