[poppler] 7 commits - fofi/FoFiTrueType.cc .gitlab-ci.yml poppler/Annot.cc poppler/Annot.h poppler/Form.cc poppler/Form.h poppler/GfxFont.cc poppler/GfxState_helpers.h poppler/MarkedContentOutputDev.h poppler/Object.h poppler/OptionalContent.cc poppler/OptionalContent.h poppler/StructElement.cc poppler/StructElement.h poppler/StructTreeRoot.cc poppler/StructTreeRoot.h qt5/demos qt5/src qt5/tests splash/SplashScreen.cc splash/SplashXPathScanner.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Nov 11 21:50:29 UTC 2018


 .gitlab-ci.yml                      |   12 ++
 fofi/FoFiTrueType.cc                |    4 
 poppler/Annot.cc                    |  174 +++++++++++++++++++++++++++++++++++-
 poppler/Annot.h                     |   10 +-
 poppler/Form.cc                     |   12 +-
 poppler/Form.h                      |   12 +-
 poppler/GfxFont.cc                  |    4 
 poppler/GfxState_helpers.h          |    2 
 poppler/MarkedContentOutputDev.h    |    2 
 poppler/Object.h                    |    6 -
 poppler/OptionalContent.cc          |    2 
 poppler/OptionalContent.h           |    2 
 poppler/StructElement.cc            |    2 
 poppler/StructElement.h             |    4 
 poppler/StructTreeRoot.cc           |    2 
 poppler/StructTreeRoot.h            |    2 
 qt5/demos/abstractinfodock.cpp      |    2 
 qt5/demos/embeddedfiles.cpp         |    2 
 qt5/demos/fonts.cpp                 |    4 
 qt5/demos/info.cpp                  |    4 
 qt5/demos/navigationtoolbar.cpp     |    9 +
 qt5/demos/optcontent.cpp            |    2 
 qt5/demos/pageview.h                |    2 
 qt5/demos/permissions.cpp           |    2 
 qt5/demos/thumbnails.cpp            |    4 
 qt5/demos/toc.cpp                   |    4 
 qt5/demos/viewer.cpp                |   34 +++----
 qt5/demos/viewer.h                  |    2 
 qt5/src/poppler-annotation-helper.h |    4 
 qt5/src/poppler-annotation.cc       |    2 
 qt5/src/poppler-annotation.h        |    1 
 qt5/src/poppler-link.cc             |   14 +-
 qt5/src/poppler-link.h              |    5 -
 qt5/src/poppler-page-transition.cc  |    2 
 qt5/src/poppler-page-transition.h   |    1 
 qt5/src/poppler-private.cc          |    2 
 qt5/tests/check_actualtext.cpp      |    4 
 qt5/tests/check_annotations.cpp     |    6 -
 qt5/tests/check_attachments.cpp     |   24 ++--
 qt5/tests/check_dateConversion.cpp  |    3 
 qt5/tests/check_fonts.cpp           |   22 ++--
 qt5/tests/check_forms.cpp           |    2 
 qt5/tests/check_goostring.cpp       |    8 +
 qt5/tests/check_lexer.cpp           |    2 
 qt5/tests/check_links.cpp           |   14 +-
 qt5/tests/check_metadata.cpp        |   10 +-
 qt5/tests/check_object.cpp          |    2 
 qt5/tests/check_optcontent.cpp      |   42 ++++----
 qt5/tests/check_pagelabelinfo.cpp   |    2 
 qt5/tests/check_pagelayout.cpp      |    2 
 qt5/tests/check_pagemode.cpp        |    2 
 qt5/tests/check_password.cpp        |   12 +-
 qt5/tests/check_permissions.cpp     |    2 
 qt5/tests/check_search.cpp          |   94 +++++++++----------
 qt5/tests/check_strings.cpp         |   57 ++++++-----
 qt5/tests/check_utf_conversion.cpp  |   26 ++---
 qt5/tests/poppler-fonts.cpp         |    6 -
 qt5/tests/poppler-forms.cpp         |    2 
 qt5/tests/stress-poppler-dir.cpp    |   20 ++--
 qt5/tests/stress-poppler-qt5.cpp    |   25 ++---
 qt5/tests/stress-threads-qt5.cpp    |   20 ++--
 qt5/tests/test-password-qt5.cpp     |   33 +++---
 qt5/tests/test-poppler-qt5.cpp      |   33 +++---
 qt5/tests/test-render-to-file.cpp   |    6 -
 splash/SplashScreen.cc              |    2 
 splash/SplashXPathScanner.cc        |    2 
 66 files changed, 544 insertions(+), 295 deletions(-)

New commits:
commit 49d5b1b663faa883e774ec7e72ae211fcc625873
Author: Tobias Deiminger <haxtibal at posteo.de>
Date:   Fri Nov 2 20:17:04 2018 +0100

    Draw line annotation endings (arrow, circle, ...)
    
    Line endings are already parsed from /LE array and are gettable and
    settable as enum value in current APIs.
    
    With this commit we implement the drawing operations so that line
    endings become actually visible when document is rendered.

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index d5c6ec0c..b6b876ad 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -79,6 +79,10 @@
 #include <string.h>
 #include <algorithm>
 
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 #define fieldFlagReadOnly           0x00000001
 #define fieldFlagRequired           0x00000002
 #define fieldFlagNoExport           0x00000004
@@ -1652,6 +1656,89 @@ void AnnotAppearanceBuilder::drawCircleBottomRight(double cx, double cy, double
   appearBuf->append("S\n");
 }
 
+void AnnotAppearanceBuilder::drawLineEndSquare(double x, double y, double size, bool fill, const Matrix& m) {
+  const double x1[3] {x - size/2., x - size/2., x + size/2.};
+  const double y1[3] {y + size/2., y - size/2., y - size/2.};
+  double tx, ty;
+
+  m.transform (x + size/2., y + size/2., &tx, &ty);
+  appendf ("{0:.2f} {1:.2f} m\n", tx, ty);
+  for (int i = 0; i<3; i++) {
+    m.transform (x1[i], y1[i], &tx, &ty);
+    appendf ("{0:.2f} {1:.2f} l\n", tx, ty);
+  }
+  appearBuf->append(fill ? "b\n" : "s\n");
+}
+
+void AnnotAppearanceBuilder::drawLineEndCircle(double x, double y, double size, bool fill, const Matrix& m) {
+  const double r = size/2.;
+  const double x1[4] {x + r, x - bezierCircle * r, x - r, x + bezierCircle * r};
+  const double x2[4] {x + bezierCircle*r, x - r, x - bezierCircle*r, x + r};
+  const double x3[4] {x, x - r, x, x + r};
+  const double y1[4] {y + bezierCircle * r, y + r, y - bezierCircle * r, y - r};
+  const double y2[4] {y + r, y + bezierCircle * r, y - r, y - bezierCircle * r};
+  const double y3[4] {y + r, y, y - r, y};
+  double tx[3];
+  double ty[3];
+
+  m.transform(x + r, y, &tx[0], &ty[0]);
+  appearBuf->appendf("{0:.2f} {1:.2f} m\n", tx[0], ty[0]);
+  for (int i=0; i<4; i++) {
+    m.transform(x1[i], y1[i], &tx[0], &ty[0]);
+    m.transform(x2[i], y2[i], &tx[1], &ty[1]);
+    m.transform(x3[i], y3[i], &tx[2], &ty[2]);
+    appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n",
+        tx[0], ty[0], tx[1], ty[1], tx[2], ty[2]);
+  }
+  appearBuf->append(fill ? "b\n" : "s\n");
+}
+
+void AnnotAppearanceBuilder::drawLineEndDiamond(double x, double y, double size, bool fill, const Matrix& m) {
+  const double x1[3] {x, x - size/2., x};
+  const double y1[3] {y + size/2., y, y - size/2.};
+  double tx, ty;
+
+  m.transform (x + size/2., y, &tx, &ty);
+  appendf ("{0:.2f} {1:.2f} m\n", tx, ty);
+  for (int i = 0; i<3; i++) {
+    m.transform (x1[i], y1[i], &tx, &ty);
+    appendf ("{0:.2f} {1:.2f} l\n", tx, ty);
+  }
+  appearBuf->append(fill ? "b\n" : "s\n");
+}
+
+void AnnotAppearanceBuilder::drawLineEndArrow(double x, double y, double size, int orientation, bool isOpen, bool fill, const Matrix& m) {
+  const double alpha {M_PI/6.};
+  const double xOffs { orientation*size/2.};
+  const double yOffs { tan(alpha)*size };
+  double tx, ty;
+
+  m.transform (x - xOffs, y+yOffs, &tx, &ty);
+  appendf ("{0:.2f} {1:.2f} m\n", tx, ty);
+  m.transform (x + xOffs, y, &tx, &ty);
+  appendf ("{0:.2f} {1:.2f} l\n", tx, ty);
+  m.transform (x - xOffs, y-yOffs, &tx, &ty);
+  appendf ("{0:.2f} {1:.2f} l\n", tx, ty);
+
+  if (isOpen) {
+    appearBuf->append("S\n");
+  } else {
+    appearBuf->append(fill ? "b\n" : "s\n");
+  }
+}
+
+void AnnotAppearanceBuilder::drawLineEndSlash(double x, double y, double size, const Matrix& m) {
+  const double alpha {M_PI/3.};
+  const double xOffs { cos(alpha)*size };
+  double tx, ty;
+
+  m.transform (x + size/2. - xOffs, y - size/2., &tx, &ty);
+  appendf ("{0:.2f} {1:.2f} m\n", tx, ty);
+  m.transform (x + size/2., y + size/2., &tx, &ty);
+  appendf ("{0:.2f} {1:.2f} l\n", tx, ty);
+  appearBuf->append("S\n");
+}
+
 Object Annot::createForm(const GooString *appearBuf, double *bbox, bool transparencyGroup, Dict *resDict) {
   return createForm(appearBuf, bbox, transparencyGroup, resDict ? Object(resDict) : Object());
 }
@@ -3070,9 +3157,70 @@ void AnnotLine::setIntent(AnnotLineIntent new_intent) {
   update ("IT", Object(objName, intentName));
 }
 
+double AnnotLine::shortenMainSegmentForEnding(AnnotLineEndingStyle endingStyle, double x, double size) {
+  switch(endingStyle) {
+  case annotLineEndingSquare:
+  case annotLineEndingCircle:
+  case annotLineEndingDiamond:
+  case annotLineEndingOpenArrow:
+  case annotLineEndingButt:
+    return x;
+  case annotLineEndingClosedArrow:
+  case annotLineEndingRClosedArrow:
+  case annotLineEndingROpenArrow:
+    return x - size;
+  case annotLineEndingSlash:
+    return x - cos(M_PI/3.)*size/2.;
+  default:
+    break;
+  }
+  return x;
+}
+
+void AnnotLine::drawLineEnding(AnnotLineEndingStyle endingStyle, AnnotAppearanceBuilder& appearBuilder, double x, double y, double size, bool fill, const Matrix& m) {
+  switch(endingStyle) {
+  case annotLineEndingSquare:
+    appearBuilder.drawLineEndSquare(x, y, size, fill, m);
+    break;
+  case annotLineEndingCircle:
+    appearBuilder.drawLineEndCircle(x, y, size, fill, m);
+    break;
+  case annotLineEndingDiamond:
+    appearBuilder.drawLineEndDiamond(x, y, size, fill, m);
+    break;
+  case annotLineEndingOpenArrow:
+    appearBuilder.drawLineEndArrow(x, y, size, 1, true, fill, m);
+    break;
+  case annotLineEndingClosedArrow:
+    appearBuilder.drawLineEndArrow(x, y, size, 1, false, fill, m);
+    break;
+  case annotLineEndingButt:
+    {
+      double tx, ty;
+      m.transform (x + size/2., y + size/2., &tx, &ty);
+      appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", tx, ty);
+      m.transform (x + size/2., y - size/2., &tx, &ty);
+      appearBuilder.appendf ("{0:.2f} {1:.2f} l S\n", tx, ty);
+    }
+    break;
+  case annotLineEndingROpenArrow:
+    appearBuilder.drawLineEndArrow(x, y, size, -1, true, fill, m);
+    break;
+  case annotLineEndingRClosedArrow:
+    appearBuilder.drawLineEndArrow(x, y, size, -1, false, fill, m);
+    break;
+  case annotLineEndingSlash:
+    appearBuilder.drawLineEndSlash(x, y, size, m);
+    break;
+  default:
+    break;
+  }
+}
+
 void AnnotLine::generateLineAppearance()
 {
   double borderWidth, ca = opacity;
+  bool fill = false;
 
   appearBBox = std::make_unique<AnnotAppearanceBBox>(rect.get());
   AnnotAppearanceBuilder appearBuilder;
@@ -3080,7 +3228,10 @@ void AnnotLine::generateLineAppearance()
   if (color) {
     appearBuilder.setDrawColor(color.get(), false);
   }
-
+  if (interiorColor) {
+    appearBuilder.setDrawColor(interiorColor.get(), true);
+    fill = true;
+  }
   appearBuilder.setLineStyleForBorder(border.get());
   borderWidth = border->getWidth();
   appearBBox->setBorderWidth(std::max(1., borderWidth));
@@ -3107,6 +3258,7 @@ void AnnotLine::generateLineAppearance()
   const double fontsize = 9;
   const double captionhmargin = 2; // Left and right margin (inline caption only)
   const double captionmaxwidth = main_len - 2 * captionhmargin;
+  const double lineendingSize = std::min(6. * borderWidth, main_len/2);
 
   Dict *fontResDict;
   GfxFont *font;
@@ -3138,7 +3290,7 @@ void AnnotLine::generateLineAppearance()
   }
 
   // Draw main segment
-  matr.transform (0, leaderLineLength, &tx, &ty);
+  matr.transform (shortenMainSegmentForEnding(startStyle, 0, -lineendingSize), leaderLineLength, &tx, &ty);
   appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", tx, ty);
   appearBBox->extendTo (tx, ty);
 
@@ -3150,11 +3302,25 @@ void AnnotLine::generateLineAppearance()
     appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", tx, ty);
   }
 
-  matr.transform (main_len, leaderLineLength, &tx, &ty);
+  matr.transform (shortenMainSegmentForEnding(endStyle, main_len, lineendingSize), leaderLineLength, &tx, &ty);
   appearBuilder.appendf ("{0:.2f} {1:.2f} l S\n", tx, ty);
   appearBBox->extendTo (tx, ty);
 
-  // TODO: Line endings
+  if (startStyle != annotLineEndingNone) {
+    drawLineEnding(startStyle, appearBuilder, 0 + lineendingSize/2., leaderLineLength, -lineendingSize, fill, matr);
+    matr.transform (0, leaderLineLength+lineendingSize/2., &tx, &ty);
+    appearBBox->extendTo (tx, ty);
+    matr.transform (0, leaderLineLength-lineendingSize/2., &tx, &ty);
+    appearBBox->extendTo (tx, ty);
+  }
+
+  if (endStyle != annotLineEndingNone) {
+    drawLineEnding(endStyle, appearBuilder, main_len - lineendingSize/2., leaderLineLength, lineendingSize, fill, matr);
+    matr.transform (main_len, leaderLineLength+lineendingSize/2., &tx, &ty);
+    appearBBox->extendTo (tx, ty);
+    matr.transform (main_len, leaderLineLength-lineendingSize/2., &tx, &ty);
+    appearBBox->extendTo (tx, ty);
+  }
 
   // Draw caption text
   if (caption) {
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 3216f02e..5a16f87c 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -532,7 +532,7 @@ private:
 //------------------------------------------------------------------------
 // AnnotAppearanceBuilder
 //------------------------------------------------------------------------
-
+class Matrix;
 class AnnotAppearanceBuilder {
 public:
   AnnotAppearanceBuilder();
@@ -547,6 +547,11 @@ public:
   void drawCircle(double cx, double cy, double r, bool fill);
   void drawCircleTopLeft(double cx, double cy, double r);
   void drawCircleBottomRight(double cx, double cy, double r);
+  void drawLineEndSquare(double x, double y, double size, bool fill, const Matrix& m);
+  void drawLineEndCircle(double x, double y, double size, bool fill, const Matrix& m);
+  void drawLineEndDiamond(double x, double y, double size, bool fill, const Matrix& m);
+  void drawLineEndArrow(double x, double y, double size, int orientation, bool isOpen, bool fill, const Matrix& m);
+  void drawLineEndSlash(double x, double y, double size, const Matrix& m);
   void drawFieldBorder(const FormField *field, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect);
   bool drawFormField(const FormField *field, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, const GooString *appearState, XRef *xref, bool *addedDingbatsResource);
 
@@ -569,6 +574,7 @@ private:
 		bool txField, bool forceZapfDingbats,
 		XRef *xref, bool *addedDingbatsResource, // xref and addedDingbatsResource both must not be null if forceZapfDingbats is passed
 		bool password);
+  void drawArrowPath(double x, double y, const Matrix& m, int orientation=1);
 
   GooString *appearBuf;
 };
@@ -1098,6 +1104,8 @@ protected:
 
   void initialize(PDFDoc *docA, Dict *dict);
   void generateLineAppearance();
+  static double shortenMainSegmentForEnding(AnnotLineEndingStyle endingStyle, double x, double size);
+  static void drawLineEnding(AnnotLineEndingStyle endingStyle, AnnotAppearanceBuilder& appearBuilder, double x, double y, double size, bool fill, const Matrix& m);
 
   // required
   std::unique_ptr<AnnotCoord> coord1;
commit c7161f7127644b2f85e7ef067a4929beeb1a71cb
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Nov 8 23:28:44 2018 +0100

    Add a clazy -Werror CI
    
    Enables levels 0, 1 and 2, along with some manual ones
    Disables non-pod-globa-static, StructElement would need some rework to
    fix it and it's only a bit about optimization of start time, we can live
    with it

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 37f2ac29..d21b47f5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -70,3 +70,15 @@ build_mingw64_fedora:
     - mkdir -p build && cd build
     - mingw64-cmake -G Ninja ..
     - ninja
+
+build_clazy:
+  stage: build
+  image: fedora:rawhide
+  before_script:
+    - dnf install -y 'dnf-command(builddep)'
+    - dnf builddep -y poppler
+    - dnf -y install curl make ninja-build openjpeg2-tools clazy clang redhat-rpm-config
+  script:
+    - mkdir -p build && cd build
+    - CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-cast-align -Wno-deprecated-declarations" cmake -G Ninja ..
+    - CLAZY_CHECKS="level0,level1,level2,isempty-vs-count,qhash-with-char-pointer-key,tr-non-literal,no-non-pod-global-static" ninja
commit 28e953cbab0059dff76c9cfa35c4522709968b0e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 7 19:22:49 2018 +0100

    Minor clazy Qt fixes in tests and demo

diff --git a/qt5/demos/abstractinfodock.cpp b/qt5/demos/abstractinfodock.cpp
index 970b7228..d2e7d0d3 100644
--- a/qt5/demos/abstractinfodock.cpp
+++ b/qt5/demos/abstractinfodock.cpp
@@ -21,7 +21,7 @@
 AbstractInfoDock::AbstractInfoDock(QWidget *parent)
     : QDockWidget(parent), m_filled(false)
 {
-    connect(this, SIGNAL(visibilityChanged(bool)), SLOT(slotVisibilityChanged(bool)));
+    connect(this, &AbstractInfoDock::visibilityChanged, this, &AbstractInfoDock::slotVisibilityChanged);
 }
 
 AbstractInfoDock::~AbstractInfoDock()
diff --git a/qt5/demos/embeddedfiles.cpp b/qt5/demos/embeddedfiles.cpp
index 12267135..a22a3546 100644
--- a/qt5/demos/embeddedfiles.cpp
+++ b/qt5/demos/embeddedfiles.cpp
@@ -59,7 +59,7 @@ void EmbeddedFilesDock::fillInfo()
         m_table->setItem(i, 3, new QTableWidgetItem(file->createDate().toString(Qt::SystemLocaleDate)));
         m_table->setItem(i, 4, new QTableWidgetItem(file->modDate().toString(Qt::SystemLocaleDate)));
         const QByteArray checksum = file->checksum();
-        const QString checksumString = !checksum.isEmpty() ? QString::fromLatin1(checksum.toHex()) : QString::fromLatin1("n/a");
+        const QString checksumString = !checksum.isEmpty() ? QString::fromLatin1(checksum.toHex()) : QStringLiteral("n/a");
         m_table->setItem(i, 5, new QTableWidgetItem(checksumString));
         ++i;
     }
diff --git a/qt5/demos/fonts.cpp b/qt5/demos/fonts.cpp
index 68f11a1e..46d15aac 100644
--- a/qt5/demos/fonts.cpp
+++ b/qt5/demos/fonts.cpp
@@ -24,7 +24,7 @@
 
 static QString yesNoStatement(bool value)
 {
-    return value ? QString::fromLatin1("yes") : QString::fromLatin1("no");
+    return value ? QStringLiteral("yes") : QStringLiteral("no");
 }
 
 FontsDock::FontsDock(QWidget *parent)
@@ -50,7 +50,7 @@ void FontsDock::fillInfo()
     int i = 0;
     Q_FOREACH(const Poppler::FontInfo &font, fonts) {
         if (font.name().isNull()) {
-            m_table->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("[none]")));
+            m_table->setItem(i, 0, new QTableWidgetItem(QStringLiteral("[none]")));
         } else {
             m_table->setItem(i, 0, new QTableWidgetItem(font.name()));
         }
diff --git a/qt5/demos/info.cpp b/qt5/demos/info.cpp
index 277674ce..4b04a63b 100644
--- a/qt5/demos/info.cpp
+++ b/qt5/demos/info.cpp
@@ -43,8 +43,8 @@ void InfoDock::fillInfo()
     m_table->setHorizontalHeaderLabels(QStringList() << tr("Key") << tr("Value"));
     m_table->setRowCount(keys.count());
     QStringList dateKeys;
-    dateKeys << QString::fromLatin1("CreationDate");
-    dateKeys << QString::fromLatin1("ModDate");
+    dateKeys << QStringLiteral("CreationDate");
+    dateKeys << QStringLiteral("ModDate");
     int i = 0;
     Q_FOREACH(const QString &date, dateKeys) {
         const int id = keys.indexOf(date);
diff --git a/qt5/demos/navigationtoolbar.cpp b/qt5/demos/navigationtoolbar.cpp
index a2c1b76b..75eacfc1 100644
--- a/qt5/demos/navigationtoolbar.cpp
+++ b/qt5/demos/navigationtoolbar.cpp
@@ -30,7 +30,8 @@ NavigationToolBar::NavigationToolBar(QWidget *parent)
     m_firstAct = addAction(tr("First"), this, SLOT(slotGoFirst()));
     m_prevAct = addAction(tr("Previous"), this, SLOT(slotGoPrev()));
     m_pageCombo = new QComboBox(this);
-    connect(m_pageCombo, SIGNAL(activated(int)), this, SLOT(slotComboActivated(int)));
+    // TODO replace with qOverload once we start requiring Qt 5.7
+    connect(m_pageCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &NavigationToolBar::slotComboActivated);
     addWidget(m_pageCombo);
     m_nextAct = addAction(tr("Next"), this, SLOT(slotGoNext()));
     m_lastAct = addAction(tr("Last"), this, SLOT(slotGoLast()));
@@ -52,7 +53,8 @@ NavigationToolBar::NavigationToolBar(QWidget *parent)
     m_zoomCombo->addItem(tr("300%"));
     m_zoomCombo->addItem(tr("400%"));
     m_zoomCombo->setCurrentIndex(6); // "100%"
-    connect(m_zoomCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotZoomComboChanged(QString)));
+    // TODO replace with qOverload once we start requiring Qt 5.7
+    connect(m_zoomCombo, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged), this, &NavigationToolBar::slotZoomComboChanged);
     addWidget(m_zoomCombo);
 
     m_rotationCombo = new QComboBox(this);
@@ -61,7 +63,8 @@ NavigationToolBar::NavigationToolBar(QWidget *parent)
     m_rotationCombo->addItem(trUtf8("90\302\260"));
     m_rotationCombo->addItem(trUtf8("180\302\260"));
     m_rotationCombo->addItem(trUtf8("270\302\260"));
-    connect(m_rotationCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotRotationComboChanged(int)));
+    // TODO replace with qOverload once we start requiring Qt 5.7
+    connect(m_rotationCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &NavigationToolBar::slotRotationComboChanged);
     addWidget(m_rotationCombo);
 
     documentClosed();
diff --git a/qt5/demos/optcontent.cpp b/qt5/demos/optcontent.cpp
index 806bede3..372a1e10 100644
--- a/qt5/demos/optcontent.cpp
+++ b/qt5/demos/optcontent.cpp
@@ -51,7 +51,7 @@ void OptContentDock::fillInfo()
     }
 
     m_view->setModel(document()->optionalContentModel());
-    connect(m_view->model(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(reloadImage()));
+    connect(m_view->model(), &QAbstractItemModel::dataChanged, this, &OptContentDock::reloadImage);
     m_view->expandToDepth(1);
 }
 
diff --git a/qt5/demos/pageview.h b/qt5/demos/pageview.h
index 48ed24e9..7640d2a2 100644
--- a/qt5/demos/pageview.h
+++ b/qt5/demos/pageview.h
@@ -38,7 +38,7 @@ public:
     void documentClosed() override;
     void pageChanged(int page) override;
 
-private Q_SLOTS:
+public Q_SLOTS:
     void slotZoomChanged(qreal value);
     void slotRotationChanged(int value);
 
diff --git a/qt5/demos/permissions.cpp b/qt5/demos/permissions.cpp
index 2cb1ffca..d4685cd8 100644
--- a/qt5/demos/permissions.cpp
+++ b/qt5/demos/permissions.cpp
@@ -41,7 +41,7 @@ void PermissionsDock::fillInfo()
 do { \
     QListWidgetItem *item = new QListWidgetItem(); \
     item->setFlags(item->flags() & ~Qt::ItemIsEnabled); \
-    item->setText(title); \
+    item->setText(QStringLiteral(title)); \
     item->setCheckState(document()->function() ? Qt::Checked : Qt::Unchecked); \
     m_table->addItem(item); \
 } while (0)
diff --git a/qt5/demos/thumbnails.cpp b/qt5/demos/thumbnails.cpp
index dbf24799..d44b38ad 100644
--- a/qt5/demos/thumbnails.cpp
+++ b/qt5/demos/thumbnails.cpp
@@ -34,8 +34,8 @@ ThumbnailsDock::ThumbnailsDock(QWidget *parent)
     m_list->setViewMode(QListView::ListMode);
     m_list->setMovement(QListView::Static);
     m_list->setVerticalScrollMode(QListView::ScrollPerPixel);
-    connect(m_list, SIGNAL(itemActivated(QListWidgetItem*)),
-            this, SLOT(slotItemActivated(QListWidgetItem*)));
+    connect(m_list, &QListWidget::itemActivated,
+            this, &ThumbnailsDock::slotItemActivated);
 }
 
 ThumbnailsDock::~ThumbnailsDock()
diff --git a/qt5/demos/toc.cpp b/qt5/demos/toc.cpp
index 1efcf8ce..99167360 100644
--- a/qt5/demos/toc.cpp
+++ b/qt5/demos/toc.cpp
@@ -37,8 +37,8 @@ static void fillToc(const QDomNode &parent, QTreeWidget *tree, QTreeWidgetItem *
         newitem->setText(0, e.tagName());
 
         bool isOpen = false;
-        if (e.hasAttribute(QString::fromLatin1("Open"))) {
-            isOpen = QVariant(e.attribute(QString::fromLatin1("Open"))).toBool();
+        if (e.hasAttribute(QStringLiteral("Open"))) {
+            isOpen = QVariant(e.attribute(QStringLiteral("Open"))).toBool();
         }
         if (isOpen) {
             tree->expandItem(newitem);
diff --git a/qt5/demos/viewer.cpp b/qt5/demos/viewer.cpp
index 92593fbb..d9addc79 100644
--- a/qt5/demos/viewer.cpp
+++ b/qt5/demos/viewer.cpp
@@ -43,21 +43,24 @@
 #include <QtWidgets/QMenuBar>
 #include <QtWidgets/QMessageBox>
 
-PdfViewer::PdfViewer()
-    : QMainWindow(), m_currentPage(0), m_doc(nullptr)
+PdfViewer::PdfViewer(QWidget *parent)
+    : QMainWindow(parent), m_currentPage(0), m_doc(nullptr)
 {
     setWindowTitle(tr("Poppler-Qt5 Demo"));
 
     // setup the menus
     QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
-    m_fileOpenAct = fileMenu->addAction(tr("&Open"), this, SLOT(slotOpenFile()));
+    // TODO Use modern syntax when depending on Qt 5.6
+    m_fileOpenAct = fileMenu->addAction(tr("&Open"), this, SLOT(slotOpenFile())); // clazy:exclude=old-style-connect
     m_fileOpenAct->setShortcut(Qt::CTRL + Qt::Key_O);
     fileMenu->addSeparator();
-    m_fileSaveCopyAct = fileMenu->addAction(tr("&Save a Copy..."), this, SLOT(slotSaveCopy()));
+    // TODO Use modern syntax when depending on Qt 5.6
+    m_fileSaveCopyAct = fileMenu->addAction(tr("&Save a Copy..."), this, SLOT(slotSaveCopy())); // clazy:exclude=old-style-connect
     m_fileSaveCopyAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S);
     m_fileSaveCopyAct->setEnabled(false);
     fileMenu->addSeparator();
-    QAction *act = fileMenu->addAction(tr("&Quit"), qApp, SLOT(closeAllWindows()));
+    // TODO Use modern syntax when depending on Qt 5.6
+    QAction *act = fileMenu->addAction(tr("&Quit"), qApp, SLOT(closeAllWindows())); // clazy:exclude=old-style-connect
     act->setShortcut(Qt::CTRL + Qt::Key_Q);
 
     QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
@@ -65,10 +68,10 @@ PdfViewer::PdfViewer()
     QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings"));
     m_settingsTextAAAct = settingsMenu->addAction(tr("Text Antialias"));
     m_settingsTextAAAct->setCheckable(true);
-    connect(m_settingsTextAAAct, SIGNAL(toggled(bool)), this, SLOT(slotToggleTextAA(bool)));
+    connect(m_settingsTextAAAct, &QAction::toggled, this, &PdfViewer::slotToggleTextAA);
     m_settingsGfxAAAct = settingsMenu->addAction(tr("Graphics Antialias"));
     m_settingsGfxAAAct->setCheckable(true);
-    connect(m_settingsGfxAAAct, SIGNAL(toggled(bool)), this, SLOT(slotToggleGfxAA(bool)));
+    connect(m_settingsGfxAAAct, &QAction::toggled, this, &PdfViewer::slotToggleGfxAA);
     QMenu *settingsRenderMenu = settingsMenu->addMenu(tr("Render Backend"));
     m_settingsRenderBackendGrp = new QActionGroup(settingsRenderMenu);
     m_settingsRenderBackendGrp->setExclusive(true);
@@ -81,12 +84,14 @@ PdfViewer::PdfViewer()
     act->setCheckable(true);
     act->setData(qVariantFromValue(1));
     m_settingsRenderBackendGrp->addAction(act);
-    connect(m_settingsRenderBackendGrp, SIGNAL(triggered(QAction*)),
-            this, SLOT(slotRenderBackend(QAction*)));
+    connect(m_settingsRenderBackendGrp, &QActionGroup::triggered,
+            this, &PdfViewer::slotRenderBackend);
 
     QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
-    act = helpMenu->addAction(tr("&About"), this, SLOT(slotAbout()));
-    act = helpMenu->addAction(tr("About &Qt"), this, SLOT(slotAboutQt()));
+    // TODO Use modern syntax when depending on Qt 5.6
+    act = helpMenu->addAction(tr("&About"), this, SLOT(slotAbout())); // clazy:exclude=old-style-connect
+    // TODO Use modern syntax when depending on Qt 5.6
+    act = helpMenu->addAction(tr("About &Qt"), this, SLOT(slotAboutQt())); // clazy:exclude=old-style-connect
 
     NavigationToolBar *navbar = new NavigationToolBar(this);
     addToolBar(navbar);
@@ -148,8 +153,8 @@ PdfViewer::PdfViewer()
         obs->m_viewer = this;
     }
 
-    connect(navbar, SIGNAL(zoomChanged(qreal)), view, SLOT(slotZoomChanged(qreal)));
-    connect(navbar, SIGNAL(rotationChanged(int)), view, SLOT(slotRotationChanged(int)));
+    connect(navbar, &NavigationToolBar::zoomChanged, view, &PageView::slotZoomChanged);
+    connect(navbar, &NavigationToolBar::rotationChanged, view, &PageView::slotRotationChanged);
 
     // activate AA by default
     m_settingsTextAAAct->setChecked(true);
@@ -254,8 +259,7 @@ void PdfViewer::slotSaveCopy()
 
 void PdfViewer::slotAbout()
 {
-    const QString text("This is a demo of the Poppler-Qt5 library.");
-    QMessageBox::about(this, QString::fromLatin1("About Poppler-Qt5 Demo"), text);
+    QMessageBox::about(this, tr("About Poppler-Qt5 Demo"), tr("This is a demo of the Poppler-Qt5 library."));
 }
 
 void PdfViewer::slotAboutQt()
diff --git a/qt5/demos/viewer.h b/qt5/demos/viewer.h
index b36e4b4a..343010f0 100644
--- a/qt5/demos/viewer.h
+++ b/qt5/demos/viewer.h
@@ -36,7 +36,7 @@ class PdfViewer : public QMainWindow
     friend class DocumentObserver;
 
 public:
-    PdfViewer();
+    PdfViewer(QWidget *parent = nullptr);
     ~PdfViewer();
 
     QSize sizeHint() const override;
diff --git a/qt5/tests/check_actualtext.cpp b/qt5/tests/check_actualtext.cpp
index eec0e092..29865665 100644
--- a/qt5/tests/check_actualtext.cpp
+++ b/qt5/tests/check_actualtext.cpp
@@ -7,6 +7,8 @@
 class TestActualText: public QObject
 {
     Q_OBJECT
+public:
+    TestActualText(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkActualText1();
 };
@@ -20,7 +22,7 @@ void TestActualText::checkActualText1()
     Poppler::Page *page = doc->page(0);
     QVERIFY( page );
 
-    QCOMPARE( page->text(QRectF()), QString("The slow brown fox jumps over the black dog.") );
+    QCOMPARE( page->text(QRectF()), QLatin1String("The slow brown fox jumps over the black dog.") );
 
     delete page;
 
diff --git a/qt5/tests/check_annotations.cpp b/qt5/tests/check_annotations.cpp
index d591bd70..0830b424 100644
--- a/qt5/tests/check_annotations.cpp
+++ b/qt5/tests/check_annotations.cpp
@@ -13,6 +13,8 @@
 class TestAnnotations : public QObject
 {
   Q_OBJECT
+public:
+    TestAnnotations(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
   void checkQColorPrecision();
   void checkFontSizeAndColor();
@@ -38,10 +40,10 @@ void TestAnnotations::checkQColorPrecision() {
 
 void TestAnnotations::checkFontSizeAndColor()
 {
-  const QString contents{"foobar"};
+  const QString contents = QStringLiteral("foobar");
   const std::vector<QColor> testColors{QColor::fromRgb(0xAB, 0xCD, 0xEF),
                                        QColor::fromCmyk(0xAB, 0xBC, 0xCD, 0xDE)};
-  const QFont testFont("Helvetica", 20);
+  const QFont testFont(QStringLiteral("Helvetica"), 20);
 
   QTemporaryFile tempFile;
   QVERIFY(tempFile.open());
diff --git a/qt5/tests/check_attachments.cpp b/qt5/tests/check_attachments.cpp
index c1c9036c..931989c6 100644
--- a/qt5/tests/check_attachments.cpp
+++ b/qt5/tests/check_attachments.cpp
@@ -7,6 +7,8 @@
 class TestAttachments: public QObject
 {
     Q_OBJECT
+public:
+    TestAttachments(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkNoAttachments();
     void checkAttach1();
@@ -39,7 +41,7 @@ void TestAttachments::checkAttach1()
     QCOMPARE( fileList.size(), 2 );
 
     Poppler::EmbeddedFile *embfile = fileList.at(0);
-    QCOMPARE( embfile->name(), QString( "kroller.png" ) );
+    QCOMPARE( embfile->name(), QLatin1String( "kroller.png" ) );
     QCOMPARE( embfile->description(), QString() );
     QCOMPARE( embfile->createDate(), QDateTime( QDate(), QTime() ) );
     QCOMPARE( embfile->modDate(), QDateTime( QDate(), QTime() ) );
@@ -53,7 +55,7 @@ void TestAttachments::checkAttach1()
 	    
 
     Poppler::EmbeddedFile *embfile2 = fileList.at(1);
-    QCOMPARE( embfile2->name(), QString("gnome-64.gif") );
+    QCOMPARE( embfile2->name(), QLatin1String("gnome-64.gif") );
     QCOMPARE( embfile2->description(), QString() );
     QCOMPARE( embfile2->modDate(), QDateTime( QDate(), QTime() ) );
     QCOMPARE( embfile2->createDate(), QDateTime( QDate(), QTime() ) );
@@ -83,21 +85,21 @@ void TestAttachments::checkAttach2()
     QCOMPARE( fileList.size(), 3 );
 
     Poppler::EmbeddedFile *embfile1 = fileList.at(0);
-    QCOMPARE( embfile1->name(), QString("Acro7 thoughts") );
+    QCOMPARE( embfile1->name(), QLatin1String("Acro7 thoughts") );
     QCOMPARE( embfile1->description(), QString() );
     QCOMPARE( embfile1->createDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 13, 54, 54), Qt::UTC ) );
     QCOMPARE( embfile1->modDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 14, 15, 27), Qt::UTC ) );
-    QCOMPARE( embfile1->mimeType(), QString("text/xml") );
+    QCOMPARE( embfile1->mimeType(), QLatin1String("text/xml") );
 
     Poppler::EmbeddedFile *embfile2 = fileList.at(1);
-    QCOMPARE( embfile2->name(), QString("acro transitions 1.xls") );
+    QCOMPARE( embfile2->name(), QLatin1String("acro transitions 1.xls") );
     QCOMPARE( embfile2->description(), QString() );
     QCOMPARE( embfile2->createDate(), QDateTime( QDate( 2003, 7, 18 ), QTime( 21, 7, 16), Qt::UTC ) );
     QCOMPARE( embfile2->modDate(), QDateTime( QDate( 2003, 7, 22 ), QTime( 13, 4, 40), Qt::UTC ) );
-    QCOMPARE( embfile2->mimeType(), QString("application/excel") );
+    QCOMPARE( embfile2->mimeType(), QLatin1String("application/excel") );
 
     Poppler::EmbeddedFile *embfile3 = fileList.at(2);
-    QCOMPARE( embfile3->name(), QString("apago_pdfe_wide.gif") );
+    QCOMPARE( embfile3->name(), QLatin1String("apago_pdfe_wide.gif") );
     QCOMPARE( embfile3->description(), QString() );
     QCOMPARE( embfile3->createDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 54, 29), Qt::UTC ) );
     QCOMPARE( embfile3->modDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 52, 58), Qt::UTC ) );
@@ -120,7 +122,7 @@ void TestAttachments::checkAttach3()
     QCOMPARE( fileList.size(), 1 );
 
     Poppler::EmbeddedFile *embfile = fileList.at(0);
-    QCOMPARE( embfile->name(), QString( "ADEX1.xpdf.pgp" ) );
+    QCOMPARE( embfile->name(), QLatin1String( "ADEX1.xpdf.pgp" ) );
     QCOMPARE( embfile->description(), QString() );
     QCOMPARE( embfile->createDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
     QCOMPARE( embfile->modDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
@@ -143,11 +145,11 @@ void TestAttachments::checkAttach4()
     QCOMPARE( fileList.size(), 1 );
 
     Poppler::EmbeddedFile *embfile = fileList.at(0);
-    QCOMPARE( embfile->name(), QString( "export-altona.csv" ) );
-    QCOMPARE( embfile->description(), QString("Altona Export") );
+    QCOMPARE( embfile->name(), QLatin1String( "export-altona.csv" ) );
+    QCOMPARE( embfile->description(), QLatin1String("Altona Export") );
     QCOMPARE( embfile->createDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 35), Qt::UTC ) );
     QCOMPARE( embfile->modDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 52), Qt::UTC ) );
-    QCOMPARE( embfile->mimeType(), QString("application/vnd.ms-excel") );
+    QCOMPARE( embfile->mimeType(), QLatin1String("application/vnd.ms-excel") );
     delete doc;
 
 }
diff --git a/qt5/tests/check_dateConversion.cpp b/qt5/tests/check_dateConversion.cpp
index 44316a2e..1644c56a 100644
--- a/qt5/tests/check_dateConversion.cpp
+++ b/qt5/tests/check_dateConversion.cpp
@@ -8,6 +8,9 @@ Q_DECLARE_METATYPE(QTime)
 class TestDateConv: public QObject
 {
     Q_OBJECT
+public:
+    TestDateConv(QObject *parent = nullptr) : QObject(parent) {}
+
 private slots:
     void initTestCase();
     void checkDates_data();
diff --git a/qt5/tests/check_fonts.cpp b/qt5/tests/check_fonts.cpp
index 38fbfe9d..1eaa2ba8 100644
--- a/qt5/tests/check_fonts.cpp
+++ b/qt5/tests/check_fonts.cpp
@@ -7,6 +7,8 @@
 class TestFontsData: public QObject
 {
     Q_OBJECT
+public:
+    TestFontsData(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkNoFonts();
     void checkType1();
@@ -72,9 +74,9 @@ void TestFontsData::checkType1()
 
     QList<Poppler::FontInfo> listOfFonts = doc->fonts();
     QCOMPARE( listOfFonts.size(), 1 );
-    QCOMPARE( listOfFonts.at(0).name(), QString("Helvetica") );
+    QCOMPARE( listOfFonts.at(0).name(), QLatin1String("Helvetica") );
     QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::Type1 );
-    QCOMPARE( listOfFonts.at(0).typeName(), QString("Type 1") );
+    QCOMPARE( listOfFonts.at(0).typeName(), QLatin1String("Type 1") );
 
     QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
     QCOMPARE( listOfFonts.at(0).isSubset(), false );
@@ -90,16 +92,16 @@ void TestFontsData::checkType3()
 
     QList<Poppler::FontInfo> listOfFonts = doc->fonts();
     QCOMPARE( listOfFonts.size(), 2 );
-    QCOMPARE( listOfFonts.at(0).name(), QString("Helvetica") );
+    QCOMPARE( listOfFonts.at(0).name(), QLatin1String("Helvetica") );
     QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::Type1 );
-    QCOMPARE( listOfFonts.at(0).typeName(), QString("Type 1") );
+    QCOMPARE( listOfFonts.at(0).typeName(), QLatin1String("Type 1") );
 
     QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
     QCOMPARE( listOfFonts.at(0).isSubset(), false );
 
-    QCOMPARE( listOfFonts.at(1).name(), QString("") );
+    QCOMPARE( listOfFonts.at(1).name(), QString() );
     QCOMPARE( listOfFonts.at(1).type(), Poppler::FontInfo::Type3 );
-    QCOMPARE( listOfFonts.at(1).typeName(), QString("Type 3") );
+    QCOMPARE( listOfFonts.at(1).typeName(), QLatin1String("Type 3") );
 
     QCOMPARE( listOfFonts.at(1).isEmbedded(), true );
     QCOMPARE( listOfFonts.at(1).isSubset(), false );
@@ -115,16 +117,16 @@ void TestFontsData::checkTrueType()
 
     QList<Poppler::FontInfo> listOfFonts = doc->fonts();
     QCOMPARE( listOfFonts.size(), 2 );
-    QCOMPARE( listOfFonts.at(0).name(), QString("Arial-BoldMT") );
+    QCOMPARE( listOfFonts.at(0).name(), QLatin1String("Arial-BoldMT") );
     QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::TrueType );
-    QCOMPARE( listOfFonts.at(0).typeName(), QString("TrueType") );
+    QCOMPARE( listOfFonts.at(0).typeName(), QLatin1String("TrueType") );
 
     QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
     QCOMPARE( listOfFonts.at(0).isSubset(), false );
 
-    QCOMPARE( listOfFonts.at(1).name(), QString("ArialMT") );
+    QCOMPARE( listOfFonts.at(1).name(), QLatin1String("ArialMT") );
     QCOMPARE( listOfFonts.at(1).type(), Poppler::FontInfo::TrueType );
-    QCOMPARE( listOfFonts.at(1).typeName(), QString("TrueType") );
+    QCOMPARE( listOfFonts.at(1).typeName(), QLatin1String("TrueType") );
 
     QCOMPARE( listOfFonts.at(1).isEmbedded(), false );
     QCOMPARE( listOfFonts.at(1).isSubset(), false );
diff --git a/qt5/tests/check_forms.cpp b/qt5/tests/check_forms.cpp
index 3c0ecf8b..c514d3f1 100644
--- a/qt5/tests/check_forms.cpp
+++ b/qt5/tests/check_forms.cpp
@@ -7,6 +7,8 @@
 class TestForms: public QObject
 {
     Q_OBJECT
+public:
+    TestForms(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void testCheckbox();// Test for issue #655
 };
diff --git a/qt5/tests/check_goostring.cpp b/qt5/tests/check_goostring.cpp
index ac75e289..82576f5f 100644
--- a/qt5/tests/check_goostring.cpp
+++ b/qt5/tests/check_goostring.cpp
@@ -6,6 +6,8 @@
 class TestGooString : public QObject
 {
     Q_OBJECT
+public:
+    TestGooString(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void testInsertData_data();
     void testInsertData();
@@ -83,19 +85,19 @@ void TestGooString::testFormat()
     {
         const QScopedPointer<GooString> goo(GooString::format("{0:ud} {1:d} {2:d}",
             UINT_MAX, INT_MAX, INT_MIN));
-        const QByteArray expected = QString("%1 %2 %3").arg(UINT_MAX).arg(INT_MAX).arg(INT_MIN).toLatin1();
+        const QByteArray expected = QStringLiteral("%1 %2 %3").arg(UINT_MAX).arg(INT_MAX).arg(INT_MIN).toLatin1();
         QCOMPARE(goo->getCString(), expected.constData());
     }
     {
         const QScopedPointer<GooString> goo(GooString::format("{0:uld} {1:ld} {2:ld}",
             ULONG_MAX, LONG_MAX, LONG_MIN));
-        const QByteArray expected = QString("%1 %2 %3").arg(ULONG_MAX).arg(LONG_MAX).arg(LONG_MIN).toLatin1();
+        const QByteArray expected = QStringLiteral("%1 %2 %3").arg(ULONG_MAX).arg(LONG_MAX).arg(LONG_MIN).toLatin1();
         QCOMPARE(goo->getCString(), expected.constData());
     }
     {
         const QScopedPointer<GooString> goo(GooString::format("{0:ulld} {1:lld} {2:lld}",
             ULLONG_MAX, LLONG_MAX, LLONG_MIN));
-        const QByteArray expected = QString("%1 %2 %3").arg(ULLONG_MAX).arg(LLONG_MAX).arg(LLONG_MIN).toLatin1();
+        const QByteArray expected = QStringLiteral("%1 %2 %3").arg(ULLONG_MAX).arg(LLONG_MAX).arg(LLONG_MIN).toLatin1();
         QCOMPARE(goo->getCString(), expected.constData());
     }
     {
diff --git a/qt5/tests/check_lexer.cpp b/qt5/tests/check_lexer.cpp
index 9ca1ab42..a27dbc9e 100644
--- a/qt5/tests/check_lexer.cpp
+++ b/qt5/tests/check_lexer.cpp
@@ -6,6 +6,8 @@
 class TestLexer : public QObject
 {
     Q_OBJECT
+public:
+    TestLexer(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void testNumbers();
 };
diff --git a/qt5/tests/check_links.cpp b/qt5/tests/check_links.cpp
index 6073027d..5927d623 100644
--- a/qt5/tests/check_links.cpp
+++ b/qt5/tests/check_links.cpp
@@ -7,6 +7,8 @@
 class TestLinks : public QObject
 {
     Q_OBJECT
+public:
+    TestLinks(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkDocumentWithNoDests();
     void checkDests_xr01();
@@ -31,7 +33,7 @@ void TestLinks::checkDocumentWithNoDests()
     QVERIFY( doc );
 
     std::unique_ptr< Poppler::LinkDestination > dest;
-    dest.reset( doc->linkDestination("no.dests.in.this.document") );
+    dest.reset( doc->linkDestination(QStringLiteral("no.dests.in.this.document")) );
     QVERIFY( !isDestinationValid_pageNumber( dest.get(), doc ) );
     QVERIFY( isDestinationValid_name( dest.get() ) );
 
@@ -56,7 +58,7 @@ void TestLinks::checkDests_xr01()
     const Poppler::LinkDestination dest = link->destination();
     QVERIFY( !isDestinationValid_pageNumber( &dest, doc ) );
     QVERIFY( isDestinationValid_name( &dest ) );
-    QCOMPARE( dest.destinationName(), QString::fromLatin1("section.1") );
+    QCOMPARE( dest.destinationName(), QLatin1String("section.1") );
     }
 
     {
@@ -65,7 +67,7 @@ void TestLinks::checkDests_xr01()
     const Poppler::LinkDestination dest = link->destination();
     QVERIFY( !isDestinationValid_pageNumber( &dest, doc ) );
     QVERIFY( isDestinationValid_name( &dest ) );
-    QCOMPARE( dest.destinationName(), QString::fromLatin1("section.2") );
+    QCOMPARE( dest.destinationName(), QLatin1String("section.2") );
     }
 
     qDeleteAll(links);
@@ -80,13 +82,13 @@ void TestLinks::checkDests_xr02()
     QVERIFY( doc );
 
     std::unique_ptr< Poppler::LinkDestination > dest;
-    dest.reset( doc->linkDestination("section.1") );
+    dest.reset( doc->linkDestination(QStringLiteral("section.1")) );
     QVERIFY( isDestinationValid_pageNumber( dest.get(), doc ) );
     QVERIFY( !isDestinationValid_name( dest.get() ) );
-    dest.reset( doc->linkDestination("section.2") );
+    dest.reset( doc->linkDestination(QStringLiteral("section.2")) );
     QVERIFY( isDestinationValid_pageNumber( dest.get(), doc ) );
     QVERIFY( !isDestinationValid_name( dest.get() ) );
-    dest.reset( doc->linkDestination("section.3") );
+    dest.reset( doc->linkDestination(QStringLiteral("section.3")) );
     QVERIFY( !isDestinationValid_pageNumber( dest.get(), doc ) );
     QVERIFY( isDestinationValid_name( dest.get() ) );
 
diff --git a/qt5/tests/check_metadata.cpp b/qt5/tests/check_metadata.cpp
index fd0267fe..1e5875c8 100644
--- a/qt5/tests/check_metadata.cpp
+++ b/qt5/tests/check_metadata.cpp
@@ -5,6 +5,8 @@
 class TestMetaData: public QObject
 {
     Q_OBJECT
+public:
+    TestMetaData(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkStrings_data();
     void checkStrings();
@@ -85,8 +87,8 @@ void TestMetaData::checkStringKeys()
     QVERIFY( doc );
 
     QStringList keyList;
-    keyList << "Title" << "Author" << "Creator" << "Keywords" << "CreationDate";
-    keyList << "Producer" << "ModDate" << "Custom1" << "Custom2";
+    keyList << QStringLiteral("Title") << QStringLiteral("Author") << QStringLiteral("Creator") << QStringLiteral("Keywords") << QStringLiteral("CreationDate");
+    keyList << QStringLiteral("Producer") << QStringLiteral("ModDate") << QStringLiteral("Custom1") << QStringLiteral("Custom2");
     keyList.sort();
     QStringList keysInDoc = doc->infoKeys();
     keysInDoc.sort();
@@ -147,8 +149,8 @@ void TestMetaData::checkDate()
 
     doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
     QVERIFY( doc );
-    QCOMPARE( doc->date("ModDate"), QDateTime(QDate(2005, 12, 5), QTime(9,44,46), Qt::UTC ) );
-    QCOMPARE( doc->date("CreationDate"), QDateTime(QDate(2005, 8, 13), QTime(1,12,11), Qt::UTC ) );
+    QCOMPARE( doc->date(QStringLiteral("ModDate")), QDateTime(QDate(2005, 12, 5), QTime(9,44,46), Qt::UTC ) );
+    QCOMPARE( doc->date(QStringLiteral("CreationDate")), QDateTime(QDate(2005, 8, 13), QTime(1,12,11), Qt::UTC ) );
 
     delete doc;
 }
diff --git a/qt5/tests/check_object.cpp b/qt5/tests/check_object.cpp
index 9ebce92a..f8531fbc 100644
--- a/qt5/tests/check_object.cpp
+++ b/qt5/tests/check_object.cpp
@@ -6,6 +6,8 @@
 class TestObject : public QObject
 {
     Q_OBJECT
+public:
+    TestObject(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void benchDefaultConstructor();
     void benchMoveConstructor();
diff --git a/qt5/tests/check_optcontent.cpp b/qt5/tests/check_optcontent.cpp
index 5588503a..f883b353 100644
--- a/qt5/tests/check_optcontent.cpp
+++ b/qt5/tests/check_optcontent.cpp
@@ -8,6 +8,8 @@
 class TestOptionalContent: public QObject
 {
     Q_OBJECT
+public:
+    TestOptionalContent(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkVisPolicy();
     void checkNestedLayers();
@@ -28,10 +30,10 @@ void TestOptionalContent::checkVisPolicy()
     Poppler::OptContentModel *optContent = doc->optionalContentModel();
     QModelIndex index;
     index = optContent->index( 0, 0, QModelIndex() );
-    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "A" ) );
+    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QLatin1String( "A" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
     index = optContent->index( 1, 0, QModelIndex() );
-    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "B" ) );
+    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QLatin1String( "B" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
 
     delete doc;
@@ -49,24 +51,24 @@ void TestOptionalContent::checkNestedLayers()
     QModelIndex index;
 
     index = optContent->index( 0, 0, QModelIndex() );
-    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Black Text and Green Snow" ) );
+    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QLatin1String( "Black Text and Green Snow" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     index = optContent->index( 1, 0, QModelIndex() );
-    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Mountains and Image" ) );
+    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QLatin1String( "Mountains and Image" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
 
     // This is a sub-item of "Mountains and Image"
     QModelIndex subindex = optContent->index( 0, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Image" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "Image" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
 
     index = optContent->index( 2, 0, QModelIndex() );
-    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Starburst" ) );
+    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QLatin1String( "Starburst" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
 
     index = optContent->index( 3, 0, QModelIndex() );
-    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Watermark" ) );
+    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QLatin1String( "Watermark" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     delete doc;
@@ -375,50 +377,50 @@ void TestOptionalContent::checkRadioButtons()
     QModelIndex index;
 
     index = optContent->index( 0, 0, QModelIndex() );
-    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Languages" ) );
+    QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QLatin1String( "Languages" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     // These are sub-items of the "Languages" label
     QModelIndex subindex = optContent->index( 0, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "English" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
 
     subindex = optContent->index( 1, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "French" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     subindex = optContent->index( 2, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "Japanese" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     // RBGroup of languages, so turning on Japanese should turn off English
     QVERIFY( optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole ) );
 
     subindex = optContent->index( 0, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "English" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     subindex = optContent->index( 2, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "Japanese" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
 
     subindex = optContent->index( 1, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "French" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     // and turning on French should turn off Japanese
     QVERIFY( optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole ) );
 
     subindex = optContent->index( 0, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "English" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     subindex = optContent->index( 2, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "Japanese" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     subindex = optContent->index( 1, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "French" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
 
 
@@ -426,15 +428,15 @@ void TestOptionalContent::checkRadioButtons()
     QVERIFY( optContent->setData( subindex, QVariant( false ), Qt::CheckStateRole ) );
 
     subindex = optContent->index( 0, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "English" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     subindex = optContent->index( 2, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "Japanese" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     subindex = optContent->index( 1, 0, index );
-    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+    QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QLatin1String( "French" ) );
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     delete doc;
diff --git a/qt5/tests/check_pagelabelinfo.cpp b/qt5/tests/check_pagelabelinfo.cpp
index ec262cd8..e874cd5e 100644
--- a/qt5/tests/check_pagelabelinfo.cpp
+++ b/qt5/tests/check_pagelabelinfo.cpp
@@ -9,6 +9,8 @@
 class TestPageLabelInfo : public QObject
 {
     Q_OBJECT
+public:
+    TestPageLabelInfo(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void testFromDecimal();
     void testFromDecimalUnicode();
diff --git a/qt5/tests/check_pagelayout.cpp b/qt5/tests/check_pagelayout.cpp
index f9d58fa6..c2a8a139 100644
--- a/qt5/tests/check_pagelayout.cpp
+++ b/qt5/tests/check_pagelayout.cpp
@@ -5,6 +5,8 @@
 class TestPageLayout: public QObject
 {
     Q_OBJECT
+public:
+    TestPageLayout(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkNone();
     void checkSingle();
diff --git a/qt5/tests/check_pagemode.cpp b/qt5/tests/check_pagemode.cpp
index 9aa17a00..460ea383 100644
--- a/qt5/tests/check_pagemode.cpp
+++ b/qt5/tests/check_pagemode.cpp
@@ -5,6 +5,8 @@
 class TestPageMode: public QObject
 {
     Q_OBJECT
+public:
+    TestPageMode(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void checkNone();
     void checkFullScreen();
diff --git a/qt5/tests/check_password.cpp b/qt5/tests/check_password.cpp
index 262003fa..14dc44d3 100644
--- a/qt5/tests/check_password.cpp
+++ b/qt5/tests/check_password.cpp
@@ -5,6 +5,8 @@
 class TestPassword: public QObject
 {
     Q_OBJECT
+public:
+    TestPassword(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void password1();
     void password1a();
@@ -19,7 +21,7 @@ private slots:
 void TestPassword::password1()
 {
     Poppler::Document *doc;
-    doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - open.pdf"), "", QString::fromUtf8("garçon").toLatin1() );
+    doc = Poppler::Document::load(QStringLiteral(TESTDATADIR "/unittestcases/Gday garçon - open.pdf"), "", QStringLiteral("garçon").toLatin1() );
     QVERIFY( doc );
     QVERIFY( !doc->isLocked() );
 
@@ -33,7 +35,7 @@ void TestPassword::password1a()
     doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - open.pdf") );
     QVERIFY( doc );
     QVERIFY( doc->isLocked() );
-    QVERIFY( !doc->unlock( "", QString::fromUtf8("garçon").toLatin1() ) );
+    QVERIFY( !doc->unlock( "", QStringLiteral("garçon").toLatin1() ) );
     QVERIFY( !doc->isLocked() );
 
     delete doc;
@@ -42,7 +44,7 @@ void TestPassword::password1a()
 void TestPassword::password2()
 {
     Poppler::Document *doc;
-    doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1(), "" );
+    doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QStringLiteral("garçon").toLatin1(), "" );
     QVERIFY( doc );
     QVERIFY( !doc->isLocked() );
 
@@ -52,7 +54,7 @@ void TestPassword::password2()
 void TestPassword::password2a()
 {
     Poppler::Document *doc;
-    doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1() );
+    doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QStringLiteral("garçon").toLatin1() );
     QVERIFY( doc );
     QVERIFY( !doc->isLocked() );
 
@@ -65,7 +67,7 @@ void TestPassword::password2b()
     doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf") );
     QVERIFY( doc );
     QVERIFY( !doc->isLocked() );
-    QVERIFY( !doc->unlock( QString::fromUtf8("garçon").toLatin1(), "" ) );
+    QVERIFY( !doc->unlock( QStringLiteral("garçon").toLatin1(), "" ) );
     QVERIFY( !doc->isLocked() );
 
     delete doc;
diff --git a/qt5/tests/check_permissions.cpp b/qt5/tests/check_permissions.cpp
index e63d844e..928f9872 100644
--- a/qt5/tests/check_permissions.cpp
+++ b/qt5/tests/check_permissions.cpp
@@ -5,6 +5,8 @@
 class TestPermissions: public QObject
 {
     Q_OBJECT
+public:
+    TestPermissions(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void permissions1();
 };
diff --git a/qt5/tests/check_search.cpp b/qt5/tests/check_search.cpp
index 4c834018..b5182c96 100644
--- a/qt5/tests/check_search.cpp
+++ b/qt5/tests/check_search.cpp
@@ -5,6 +5,8 @@
 class TestSearch: public QObject
 {
     Q_OBJECT
+public:
+    TestSearch(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void bug7063();
     void testNextAndPrevious();
@@ -21,33 +23,33 @@ void TestSearch::bug7063()
 
     double rectLeft = 0.0, rectTop = 0.0, rectRight = page->pageSizeF().width(), rectBottom = page->pageSizeF().height();
 
-    QCOMPARE( page->search(QString("non-ascii:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("non-ascii:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
 
-    QCOMPARE( page->search(QString("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
-    QCOMPARE( page->search(QString("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop, Poppler::Page::IgnoreCase), true );
+    QCOMPARE( page->search(QStringLiteral("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+    QCOMPARE( page->search(QStringLiteral("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop, Poppler::Page::IgnoreCase), true );
 
-    QCOMPARE( page->search(QString("latin1:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+    QCOMPARE( page->search(QStringLiteral("latin1:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
 
-    QCOMPARE( page->search(QString::fromUtf8("é"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("à"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("ç"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("search \"é\", \"à\" or \"ç\""), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("¥µ©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("¥©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+    QCOMPARE( page->search(QStringLiteral("é"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("à"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("ç"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("search \"é\", \"à\" or \"ç\""), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("¥µ©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("¥©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
 
-    QCOMPARE( page->search(QString("non-ascii:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("non-ascii:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
 
-    QCOMPARE( page->search(QString("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
-    QCOMPARE( page->search(QString("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop, Poppler::Page::IgnoreCase), true );
+    QCOMPARE( page->search(QStringLiteral("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+    QCOMPARE( page->search(QStringLiteral("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop, Poppler::Page::IgnoreCase), true );
 
-    QCOMPARE( page->search(QString("latin1:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+    QCOMPARE( page->search(QStringLiteral("latin1:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
 
-    QCOMPARE( page->search(QString::fromUtf8("é"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("à"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("ç"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("search \"é\", \"à\" or \"ç\""), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("¥µ©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
-    QCOMPARE( page->search(QString::fromUtf8("¥©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+    QCOMPARE( page->search(QStringLiteral("é"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("à"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("ç"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("search \"é\", \"à\" or \"ç\""), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("¥µ©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("¥©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
 }
 
 void TestSearch::testNextAndPrevious()
@@ -60,83 +62,83 @@ void TestSearch::testNextAndPrevious()
 
     double rectLeft = 0.0, rectTop = 0.0, rectRight = page->pageSizeF().width(), rectBottom = page->pageSizeF().height();
 
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
     QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
     QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
     QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), false );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), false );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
     QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), false );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), false );
 
     rectLeft = 0.0, rectTop = 0.0, rectRight = page->pageSizeF().width(), rectBottom = page->pageSizeF().height();
 
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
     QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
     QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
     QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), false );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), false );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
     QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
     QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
     QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
     QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
     QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
-    QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), false );
+    QCOMPARE( page->search(QStringLiteral("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), false );
 }
 
 void TestSearch::testWholeWordsOnly()
@@ -156,17 +158,17 @@ void TestSearch::testWholeWordsOnly()
 
     double left, top, right, bottom;
 
-    QCOMPARE( page->search(QLatin1String("brown"), left, top, right, bottom, direction, mode0), true );
-    QCOMPARE( page->search(QLatin1String("brOwn"), left, top, right, bottom, direction, mode0), false );
+    QCOMPARE( page->search(QStringLiteral("brown"), left, top, right, bottom, direction, mode0), true );
+    QCOMPARE( page->search(QStringLiteral("brOwn"), left, top, right, bottom, direction, mode0), false );
 
-    QCOMPARE( page->search(QLatin1String("brOwn"), left, top, right, bottom, direction, mode1), true );
-    QCOMPARE( page->search(QLatin1String("brawn"), left, top, right, bottom, direction, mode1), false );
+    QCOMPARE( page->search(QStringLiteral("brOwn"), left, top, right, bottom, direction, mode1), true );
+    QCOMPARE( page->search(QStringLiteral("brawn"), left, top, right, bottom, direction, mode1), false );
 
-    QCOMPARE( page->search(QLatin1String("brown"), left, top, right, bottom, direction, mode2), true );
-    QCOMPARE( page->search(QLatin1String("own"), left, top, right, bottom, direction, mode2), false );
+    QCOMPARE( page->search(QStringLiteral("brown"), left, top, right, bottom, direction, mode2), true );
+    QCOMPARE( page->search(QStringLiteral("own"), left, top, right, bottom, direction, mode2), false );
 
-    QCOMPARE( page->search(QLatin1String("brOwn"), left, top, right, bottom, direction, mode3), true );
-    QCOMPARE( page->search(QLatin1String("Own"), left, top, right, bottom, direction, mode3), false );
+    QCOMPARE( page->search(QStringLiteral("brOwn"), left, top, right, bottom, direction, mode3), true );
+    QCOMPARE( page->search(QStringLiteral("Own"), left, top, right, bottom, direction, mode3), false );
 }
 
 QTEST_GUILESS_MAIN(TestSearch)
diff --git a/qt5/tests/check_strings.cpp b/qt5/tests/check_strings.cpp
index fc68146a..d8e3b8b3 100644
--- a/qt5/tests/check_strings.cpp
+++ b/qt5/tests/check_strings.cpp
@@ -30,6 +30,9 @@ class TestStrings : public QObject
 {
     Q_OBJECT
 
+public:
+    TestStrings(QObject *parent = nullptr) : QObject(parent) { }
+
 private slots:
     void initTestCase();
     void cleanupTestCase();
@@ -74,34 +77,34 @@ void TestStrings::check_unicodeToQString_data()
     const int l = 1;
     Unicode *u = new Unicode[l];
     u[0] = int('a');
-    QTest::newRow("a") << u << l << QString::fromUtf8("a");
+    QTest::newRow("a") << u << l << QStringLiteral("a");
     }
     {
     const int l = 1;
     Unicode *u = new Unicode[l];
     u[0] = 0x0161;
-    QTest::newRow("\u0161") << u << l << QString::fromUtf8("\u0161");
+    QTest::newRow("\u0161") << u << l << QStringLiteral("\u0161");
     }
     {
     const int l = 2;
     Unicode *u = new Unicode[l];
     u[0] = int('a');
     u[1] = int('b');
-    QTest::newRow("ab") << u << l << QString::fromUtf8("ab");
+    QTest::newRow("ab") << u << l << QStringLiteral("ab");
     }
     {
     const int l = 2;
     Unicode *u = new Unicode[l];
     u[0] = int('a');
     u[1] = 0x0161;
-    QTest::newRow("a\u0161") << u << l << QString::fromUtf8("a\u0161");
+    QTest::newRow("a\u0161") << u << l << QStringLiteral("a\u0161");
     }
     {
     const int l = 2;
     Unicode *u = new Unicode[l];
     u[0] = 0x5c01;
     u[1] = 0x9762;
-    QTest::newRow("\xe5\xb0\x81\xe9\x9d\xa2") << u << l << QString::fromUtf8("\xe5\xb0\x81\xe9\x9d\xa2");
+    QTest::newRow("\xe5\xb0\x81\xe9\x9d\xa2") << u << l << QStringLiteral("封面");
     }
     {
     const int l = 3;
@@ -109,7 +112,7 @@ void TestStrings::check_unicodeToQString_data()
     u[0] = 0x5c01;
     u[1] = 0x9762;
     u[2] = 0x0;
-    QTest::newRow("\xe5\xb0\x81\xe9\x9d\xa2 + 0") << u << l << QString::fromUtf8("\xe5\xb0\x81\xe9\x9d\xa2");
+    QTest::newRow("\xe5\xb0\x81\xe9\x9d\xa2 + 0") << u << l << QStringLiteral("封面");
     }
 }
 
@@ -133,33 +136,33 @@ void TestStrings::check_UnicodeParsedString_data()
     QTest::newRow("<empty>") << newGooString("")
                              << QString();
     QTest::newRow("a") << newGooString("a")
-                       << QString::fromUtf8("a");
+                       << QStringLiteral("a");
     QTest::newRow("ab") << newGooString("ab")
-                        << QString::fromUtf8("ab");
+                        << QStringLiteral("ab");
     QTest::newRow("~") << newGooString("~")
-                       << QString::fromUtf8("~");
+                       << QStringLiteral("~");
     QTest::newRow("test string") << newGooString("test string")
-                                 << QString::fromUtf8("test string");
+                                 << QStringLiteral("test string");
 
     // unicode strings
     QTest::newRow("<unicode marks>") << newGooString("\xFE\xFF")
                                      << QString();
     QTest::newRow("U a") << newGooString("\xFE\xFF\0a", 4)
-                         << QString::fromUtf8("a");
+                         << QStringLiteral("a");
     QTest::newRow("U ~") << newGooString("\xFE\xFF\0~", 4)
-                         << QString::fromUtf8("~");
+                         << QStringLiteral("~");
     QTest::newRow("U aa") << newGooString("\xFE\xFF\0a\0a", 6)
-                           << QString::fromUtf8("aa");
+                           << QStringLiteral("aa");
     QTest::newRow("U \xC3\x9F") << newGooString("\xFE\xFF\0\xDF", 4)
-                                << QString::fromUtf8("\xC3\x9F");
+                                << QStringLiteral("ß");
     QTest::newRow("U \xC3\x9F\x61") << newGooString("\xFE\xFF\0\xDF\0\x61", 6)
-                                    << QString::fromUtf8("\xC3\x9F\x61");
+                                    << QStringLiteral("ßa");
     QTest::newRow("U \xC5\xA1") << newGooString("\xFE\xFF\x01\x61", 4)
-                                << QString::fromUtf8("\xC5\xA1");
+                                << QStringLiteral("š");
     QTest::newRow("U \xC5\xA1\x61") << newGooString("\xFE\xFF\x01\x61\0\x61", 6)
-                                << QString::fromUtf8("\xC5\xA1\x61");
+                                << QStringLiteral("ša");
     QTest::newRow("test string") << newGooString("\xFE\xFF\0t\0e\0s\0t\0 \0s\0t\0r\0i\0n\0g", 24)
-                                 << QString::fromUtf8("test string");
+                                 << QStringLiteral("test string");
 }
 
 void TestStrings::check_UnicodeParsedString()
@@ -178,17 +181,17 @@ void TestStrings::check_QStringToUnicodeGooString_data()
 
     QTest::newRow("<null>") << QString()
                             << QByteArray("");
-    QTest::newRow("<empty>") << QString::fromUtf8("")
+    QTest::newRow("<empty>") << QString(QLatin1String(""))
                              << QByteArray("");
-    QTest::newRow("a") << QString::fromUtf8("a")
+    QTest::newRow("a") << QStringLiteral("a")
                        << QByteArray("\0a", 2);
-    QTest::newRow("ab") << QString::fromUtf8("ab")
+    QTest::newRow("ab") << QStringLiteral("ab")
                         << QByteArray("\0a\0b", 4);
-    QTest::newRow("test string") << QString::fromUtf8("test string")
+    QTest::newRow("test string") << QStringLiteral("test string")
                                  << QByteArray("\0t\0e\0s\0t\0 \0s\0t\0r\0i\0n\0g", 22);
-    QTest::newRow("\xC3\x9F") << QString::fromUtf8("\xC3\x9F")
+    QTest::newRow("\xC3\x9F") << QStringLiteral("ß")
                               << QByteArray("\0\xDF", 2);
-    QTest::newRow("\xC3\x9F\x61") << QString::fromUtf8("\xC3\x9F\x61")
+    QTest::newRow("\xC3\x9F\x61") << QStringLiteral("ßa")
                                   << QByteArray("\0\xDF\0\x61", 4);
 }
 
@@ -212,11 +215,11 @@ void TestStrings::check_QStringToGooString_data()
 
     QTest::newRow("<null>") << QString()
                             << newGooString("");
-    QTest::newRow("<empty>") << QString::fromUtf8("")
+    QTest::newRow("<empty>") << QString(QLatin1String(""))
                              << newGooString("");
-    QTest::newRow("a") << QString::fromUtf8("a")
+    QTest::newRow("a") << QStringLiteral("a")
                        << newGooString("a");
-    QTest::newRow("ab") << QString::fromUtf8("ab")
+    QTest::newRow("ab") << QStringLiteral("ab")
                         << newGooString("ab");
 }
 
diff --git a/qt5/tests/check_utf_conversion.cpp b/qt5/tests/check_utf_conversion.cpp
index d344434d..d451ac46 100644
--- a/qt5/tests/check_utf_conversion.cpp
+++ b/qt5/tests/check_utf_conversion.cpp
@@ -7,6 +7,8 @@
 class TestUTFConversion : public QObject
 {
     Q_OBJECT
+public:
+    TestUTFConversion(QObject *parent = nullptr) : QObject(parent) { }
 private slots:
     void testUTF_data();
     void testUTF();
@@ -30,18 +32,18 @@ void TestUTFConversion::testUTF_data()
 {
    QTest::addColumn<QString>("s");
 
-   QTest::newRow("<empty>") << QString::fromUtf8("");
-   QTest::newRow("a") << QString::fromUtf8("a");
-   QTest::newRow("abc") << QString::fromUtf8("abc");
-   QTest::newRow("Latin") << QString::fromUtf8("Vitrum edere possum; mihi non nocet");
-   QTest::newRow("Greek") << QString::fromUtf8("Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα");
-   QTest::newRow("Icelandic") << QString::fromUtf8("Ég get etið gler án þess að meiða mig");
-   QTest::newRow("Russian") << QString::fromUtf8("Я могу есть стекло, оно мне не вредит.");
-   QTest::newRow("Sanskrit") << QString::fromUtf8("काचं शक्नोम्यत्तुम् । नोपहिनस्ति माम् ॥");
-   QTest::newRow("Arabic") << QString::fromUtf8("أنا قادر على أكل الزجاج و هذا لا يؤلمني");
-   QTest::newRow("Chinese") << QString::fromUtf8("我能吞下玻璃而不伤身体。");
-   QTest::newRow("Thai") << QString::fromUtf8("ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ");
-   QTest::newRow("non BMP") << QString::fromUtf8("𝓹𝓸𝓹𝓹𝓵𝓮𝓻");
+   QTest::newRow("<empty>") << QString(QLatin1String(""));
+   QTest::newRow("a") << QStringLiteral("a");
+   QTest::newRow("abc") << QStringLiteral("abc");
+   QTest::newRow("Latin") << QStringLiteral("Vitrum edere possum; mihi non nocet");
+   QTest::newRow("Greek") << QStringLiteral("Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα");
+   QTest::newRow("Icelandic") << QStringLiteral("Ég get etið gler án þess að meiða mig");
+   QTest::newRow("Russian") << QStringLiteral("Я могу есть стекло, оно мне не вредит.");
+   QTest::newRow("Sanskrit") << QStringLiteral("काचं शक्नोम्यत्तुम् । नोपहिनस्ति माम् ॥");
+   QTest::newRow("Arabic") << QStringLiteral("أنا قادر على أكل الزجاج و هذا لا يؤلمني");
+   QTest::newRow("Chinese") << QStringLiteral("我能吞下玻璃而不伤身体。");
+   QTest::newRow("Thai") << QStringLiteral("ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ");
+   QTest::newRow("non BMP") << QStringLiteral("𝓹𝓸𝓹𝓹𝓵𝓮𝓻");
  }
 
 void TestUTFConversion::testUTF()
diff --git a/qt5/tests/poppler-fonts.cpp b/qt5/tests/poppler-fonts.cpp
index 1d7b9ad0..e38700c8 100644
--- a/qt5/tests/poppler-fonts.cpp
+++ b/qt5/tests/poppler-fonts.cpp
@@ -29,9 +29,9 @@ int main( int argc, char **argv )
   
     foreach( const Poppler::FontInfo &font, doc->fonts() ) {
 	if (font.name().isNull()) {
-	    std::cout << qPrintable( QString("%1").arg(QString("[none]"), -37) );
+	    std::cout << qPrintable( QStringLiteral("%1").arg(QStringLiteral("[none]"), -37) );
 	} else {
-	    std::cout << qPrintable( QString("%1").arg(font.name(), -37) );
+	    std::cout << qPrintable( QStringLiteral("%1").arg(font.name(), -37) );
 	}
 	switch( font.type() ) {
 	case Poppler::FontInfo::unknown:
@@ -82,7 +82,7 @@ int main( int argc, char **argv )
 	} else {
 	    std::cout << "no  ";
 	}
-	std::cout << qPrintable( QString("%1").arg(font.file()) );
+	std::cout << qPrintable( font.file() );
 	std::cout << std::endl;
     }
     delete doc;
diff --git a/qt5/tests/poppler-forms.cpp b/qt5/tests/poppler-forms.cpp
index a023dd10..a155dbda 100644
--- a/qt5/tests/poppler-forms.cpp
+++ b/qt5/tests/poppler-forms.cpp
@@ -99,7 +99,7 @@ static std::ostream& operator<< (std::ostream &out, const QString &string)
 
 static std::ostream& operator<< (std::ostream &out, const QRectF &rect)
 {
-    out << QString("top: %1 left: %2 width: %3 height: %4").arg(rect.x()).arg(rect.y()).arg(rect.width()).arg(rect.height());
+    out << QStringLiteral("top: %1 left: %2 width: %3 height: %4").arg(rect.x()).arg(rect.y()).arg(rect.width()).arg(rect.height());
     return out;
 }
 
diff --git a/qt5/tests/stress-poppler-dir.cpp b/qt5/tests/stress-poppler-dir.cpp
index 599b2f38..f9d3ce59 100644
--- a/qt5/tests/stress-poppler-dir.cpp
+++ b/qt5/tests/stress-poppler-dir.cpp
@@ -17,7 +17,7 @@ int main( int argc, char **argv )
 
     QDir directory( argv[1] );
     foreach ( const QString &fileName, directory.entryList() ) {
-        if (fileName.endsWith("pdf") ) {
+        if (fileName.endsWith(QStringLiteral("pdf")) ) {
 	    qDebug() << "Doing" << fileName.toLatin1().data() << ":";
 	    Poppler::Document *doc = Poppler::Document::load( directory.canonicalPath()+"/"+fileName );
 	    if (!doc) {
@@ -30,14 +30,14 @@ int main( int argc, char **argv )
 	    } else {
 		int major = 0, minor = 0;
 		doc->getPdfVersion( &major, &minor );
-		doc->info("Title");
-		doc->info("Subject");
-		doc->info("Author");
-		doc->info("Keywords");
-		doc->info("Creator");
-		doc->info("Producer");
-		doc->date("CreationDate").toString();
-		doc->date("ModDate").toString();
+		doc->info(QStringLiteral("Title"));
+		doc->info(QStringLiteral("Subject"));
+		doc->info(QStringLiteral("Author"));
+		doc->info(QStringLiteral("Keywords"));
+		doc->info(QStringLiteral("Creator"));
+		doc->info(QStringLiteral("Producer"));
+		doc->date(QStringLiteral("CreationDate")).toString();
+		doc->date(QStringLiteral("ModDate")).toString();
 		doc->numPages();
 		doc->isLinearized();
 		doc->isEncrypted();
diff --git a/qt5/tests/stress-poppler-qt5.cpp b/qt5/tests/stress-poppler-qt5.cpp
index 6440720c..a7ec5064 100644
--- a/qt5/tests/stress-poppler-qt5.cpp
+++ b/qt5/tests/stress-poppler-qt5.cpp
@@ -17,15 +17,16 @@ int main( int argc, char **argv )
 
     QTime t;
     t.start();
-    QDir dbDir( QString( "./pdfdb" ) );
+    QDir dbDir( QStringLiteral( "./pdfdb" ) );
     if ( !dbDir.exists() ) {
 	qWarning() << "Database directory does not exist";
     }
 
     QStringList excludeSubDirs;
-    excludeSubDirs << "000048" << "000607";
+    excludeSubDirs << QStringLiteral("000048") << QStringLiteral("000607");
 
-    foreach ( const QString &subdir, dbDir.entryList(QStringList() << "0000*", QDir::Dirs) ) {
+    const QStringList dirs = dbDir.entryList(QStringList() << QStringLiteral("0000*"), QDir::Dirs);
+    foreach ( const QString &subdir, dirs ) {
 	if ( excludeSubDirs.contains(subdir) ) {
 	    // then skip it
 	} else {
@@ -37,14 +38,14 @@ int main( int argc, char **argv )
 	    } else {
 		int major = 0, minor = 0;
 		doc->getPdfVersion( &major, &minor );
-		doc->info("Title");
-		doc->info("Subject");
-		doc->info("Author");
-		doc->info("Keywords");
-		doc->info("Creator");
-		doc->info("Producer");
-		doc->date("CreationDate").toString();
-		doc->date("ModDate").toString();
+		doc->info(QStringLiteral("Title"));
+		doc->info(QStringLiteral("Subject"));
+		doc->info(QStringLiteral("Author"));
+		doc->info(QStringLiteral("Keywords"));
+		doc->info(QStringLiteral("Creator"));
+		doc->info(QStringLiteral("Producer"));
+		doc->date(QStringLiteral("CreationDate")).toString();
+		doc->date(QStringLiteral("ModDate")).toString();
 		doc->numPages();
 		doc->isLinearized();
 		doc->isEncrypted();
diff --git a/qt5/tests/stress-threads-qt5.cpp b/qt5/tests/stress-threads-qt5.cpp
index d1cc5955..1e7e4a84 100644
--- a/qt5/tests/stress-threads-qt5.cpp
+++ b/qt5/tests/stress-threads-qt5.cpp
@@ -18,6 +18,7 @@
 
 class SillyThread : public QThread
 {
+    Q_OBJECT
 public:
     SillyThread(Poppler::Document* document, QObject* parent = nullptr);
 
@@ -31,6 +32,7 @@ private:
 
 class CrazyThread : public QThread
 {
+    Q_OBJECT
 public:
     CrazyThread(uint seed, Poppler::Document* document, QMutex* annotationMutex, QObject* parent = nullptr);
 
@@ -114,11 +116,11 @@ void CrazyThread::run()
 
             PagePointer page(loadRandomPage(m_document));
 
-            page->search("c", Poppler::Page::IgnoreCase);
-            page->search("r");
-            page->search("a", Poppler::Page::IgnoreCase);
-            page->search("z");
-            page->search("y", Poppler::Page::IgnoreCase);
+            page->search(QStringLiteral("c"), Poppler::Page::IgnoreCase);
+            page->search(QStringLiteral("r"));
+            page->search(QStringLiteral("a"), Poppler::Page::IgnoreCase);
+            page->search(QStringLiteral("z"));
+            page->search(QStringLiteral("y"), Poppler::Page::IgnoreCase);
         }
 
         if(qrand() % 2 == 0)
@@ -186,7 +188,7 @@ void CrazyThread::run()
             }
 
             annotation->setBoundary(QRectF(0.0, 0.0, 0.5, 0.5));
-            annotation->setContents("crazy");
+            annotation->setContents(QStringLiteral("crazy"));
 
             page->addAnnotation(annotation);
 
@@ -208,8 +210,8 @@ void CrazyThread::run()
                     qDebug() << "modify annotation...";
 
                     annotations.at(qrand() % annotations.size())->setBoundary(QRectF(0.5, 0.5, 0.25, 0.25));
-                    annotations.at(qrand() % annotations.size())->setAuthor("foo");
-                    annotations.at(qrand() % annotations.size())->setContents("bar");
+                    annotations.at(qrand() % annotations.size())->setAuthor(QStringLiteral("foo"));
+                    annotations.at(qrand() % annotations.size())->setContents(QStringLiteral("bar"));
                     annotations.at(qrand() % annotations.size())->setCreationDate(QDateTime::currentDateTime());
                     annotations.at(qrand() % annotations.size())->setModificationDate(QDateTime::currentDateTime());
                 }
@@ -307,3 +309,5 @@ int main(int argc, char** argv)
 
     return EXIT_SUCCESS;
 }
+
+#include "stress-threads-qt5.moc"
diff --git a/qt5/tests/test-password-qt5.cpp b/qt5/tests/test-password-qt5.cpp
index 713ce374..9281407d 100644
--- a/qt5/tests/test-password-qt5.cpp
+++ b/qt5/tests/test-password-qt5.cpp
@@ -9,8 +9,9 @@
 
 class PDFDisplay : public QWidget           // picture display widget
 {
+    Q_OBJECT
 public:
-    PDFDisplay( Poppler::Document *d );
+    PDFDisplay( Poppler::Document *d, QWidget *parent = nullptr );
     ~PDFDisplay();
 protected:
     void paintEvent( QPaintEvent * ) override;
@@ -22,7 +23,7 @@ private:
     Poppler::Document *doc;
 };
 
-PDFDisplay::PDFDisplay( Poppler::Document *d )
+PDFDisplay::PDFDisplay( Poppler::Document *d, QWidget *parent ) : QWidget( parent )
 {
     doc = d;
     m_currentPage = 0;
@@ -92,26 +93,26 @@ int main( int argc, char **argv )
 	qWarning() << "usage: test-password-qt5 owner-password filename";
 	exit(1);
     }
-  
+
     Poppler::Document *doc = Poppler::Document::load(argv[2], argv[1]);
     if (!doc)
     {
 	qWarning() << "doc not loaded";
 	exit(1);
     }
-  
+
     // output some meta-data
     int major = 0, minor = 0;
     doc->getPdfVersion( &major, &minor );
-    qDebug() << "    PDF Version: " << qPrintable(QString::fromLatin1("%1.%2").arg(major).arg(minor));
-    qDebug() << "          Title: " << doc->info("Title");
-    qDebug() << "        Subject: " << doc->info("Subject");
-    qDebug() << "         Author: " << doc->info("Author");
-    qDebug() << "      Key words: " << doc->info("Keywords");
-    qDebug() << "        Creator: " << doc->info("Creator");
-    qDebug() << "       Producer: " << doc->info("Producer");
-    qDebug() << "   Date created: " << doc->date("CreationDate").toString();
-    qDebug() << "  Date modified: " << doc->date("ModDate").toString();
+    qDebug() << "    PDF Version: " << qPrintable(QStringLiteral("%1.%2").arg(major).arg(minor));
+    qDebug() << "          Title: " << doc->info(QStringLiteral("Title"));
+    qDebug() << "        Subject: " << doc->info(QStringLiteral("Subject"));
+    qDebug() << "         Author: " << doc->info(QStringLiteral("Author"));
+    qDebug() << "      Key words: " << doc->info(QStringLiteral("Keywords"));
+    qDebug() << "        Creator: " << doc->info(QStringLiteral("Creator"));
+    qDebug() << "       Producer: " << doc->info(QStringLiteral("Producer"));
+    qDebug() << "   Date created: " << doc->date(QStringLiteral("CreationDate")).toString();
+    qDebug() << "  Date modified: " << doc->date(QStringLiteral("ModDate")).toString();
     qDebug() << "Number of pages: " << doc->numPages();
     qDebug() << "     Linearised: " << doc->isLinearized();
     qDebug() << "      Encrypted: " << doc->isEncrypted();
@@ -123,14 +124,16 @@ int main( int argc, char **argv )
     QStringList fontNameList;
     foreach( const Poppler::FontInfo &font, doc->fonts() )
 	fontNameList += font.name();
-    qDebug() << "          Fonts: " << fontNameList.join( ", " );
+    qDebug() << "          Fonts: " << fontNameList.join( QStringLiteral(", ") );
 
     Poppler::Page *page = doc->page(0);
     qDebug() << "    Page 1 size: " << page->pageSize().width()/72 << "inches x " << page->pageSize().height()/72 << "inches";
 
     PDFDisplay test( doc );        // create picture display
-    test.setWindowTitle("Poppler-Qt5 Test");
+    test.setWindowTitle(QStringLiteral("Poppler-Qt5 Test"));
     test.show();                            // show it
 
     return a.exec();                        // start event loop
 }
+
+#include "test-password-qt5.moc"
diff --git a/qt5/tests/test-poppler-qt5.cpp b/qt5/tests/test-poppler-qt5.cpp
index 659a3763..91e4a276 100644
--- a/qt5/tests/test-poppler-qt5.cpp
+++ b/qt5/tests/test-poppler-qt5.cpp
@@ -13,8 +13,9 @@
 
 class PDFDisplay : public QWidget           // picture display widget
 {
+    Q_OBJECT
 public:
-    PDFDisplay( Poppler::Document *d, bool arthur );
+    PDFDisplay( Poppler::Document *d, bool arthur, QWidget *parent = nullptr );
     ~PDFDisplay();
     void setShowTextRects(bool show);
     void display();
@@ -31,19 +32,19 @@ private:
     QList<Poppler::TextBox*> textRects;
 };
 
-PDFDisplay::PDFDisplay( Poppler::Document *d, bool arthur )
+PDFDisplay::PDFDisplay( Poppler::Document *d, bool arthur, QWidget *parent ) : QWidget( parent )
 {
     showTextRects = false;
     doc = d;
     m_currentPage = 0;
     if (arthur)
     {
-        backendString = "Arthur";
+        backendString = QStringLiteral("Arthur");
         doc->setRenderBackend(Poppler::Document::ArthurBackend);
     }
     else
     {
-        backendString = "Splash";
+        backendString = QStringLiteral("Splash");
         doc->setRenderBackend(Poppler::Document::SplashBackend);
     }
     doc->setRenderHint(Poppler::Document::Antialiasing, true);
@@ -131,7 +132,7 @@ void PDFDisplay::mousePressEvent( QMouseEvent *e )
   {
     if (tb->boundingBox().contains(e->pos()))
     {
-      QString tt = QString("Text: \"%1\"\nIndex in text list: %2").arg(tb->text()).arg(i);
+      const QString tt = QStringLiteral("Text: \"%1\"\nIndex in text list: %2").arg(tb->text()).arg(i);
       QToolTip::showText(e->globalPos(), tt, this);
       break;
     }
@@ -168,15 +169,15 @@ int main( int argc, char **argv )
     // output some meta-data
     int major = 0, minor = 0;
     doc->getPdfVersion( &major, &minor );
-    qDebug() << "    PDF Version: " << qPrintable(QString::fromLatin1("%1.%2").arg(major).arg(minor));
-    qDebug() << "          Title: " << doc->info("Title");
-    qDebug() << "        Subject: " << doc->info("Subject");
-    qDebug() << "         Author: " << doc->info("Author");
-    qDebug() << "      Key words: " << doc->info("Keywords");
-    qDebug() << "        Creator: " << doc->info("Creator");
-    qDebug() << "       Producer: " << doc->info("Producer");
-    qDebug() << "   Date created: " << doc->date("CreationDate").toString();
-    qDebug() << "  Date modified: " << doc->date("ModDate").toString();
+    qDebug() << "    PDF Version: " << qPrintable(QStringLiteral("%1.%2").arg(major).arg(minor));
+    qDebug() << "          Title: " << doc->info(QStringLiteral("Title"));
+    qDebug() << "        Subject: " << doc->info(QStringLiteral("Subject"));
+    qDebug() << "         Author: " << doc->info(QStringLiteral("Author"));
+    qDebug() << "      Key words: " << doc->info(QStringLiteral("Keywords"));
+    qDebug() << "        Creator: " << doc->info(QStringLiteral("Creator"));
+    qDebug() << "       Producer: " << doc->info(QStringLiteral("Producer"));
+    qDebug() << "   Date created: " << doc->date(QStringLiteral("CreationDate")).toString();
+    qDebug() << "  Date modified: " << doc->date(QStringLiteral("ModDate")).toString();
     qDebug() << "Number of pages: " << doc->numPages();
     qDebug() << "     Linearised: " << doc->isLinearized();
     qDebug() << "      Encrypted: " << doc->isEncrypted();
@@ -217,7 +218,7 @@ int main( int argc, char **argv )
     {
         bool useArthur = (argc == 3 && strcmp(argv[2], "-arthur") == 0);
         PDFDisplay test( doc, useArthur );        // create picture display
-        test.setWindowTitle("Poppler-Qt5 Test");
+        test.setWindowTitle(QStringLiteral("Poppler-Qt5 Test"));
         test.setShowTextRects(argc == 3 && strcmp(argv[2], "-textRects") == 0);
         test.display();
         test.show();                            // show it
@@ -235,3 +236,5 @@ int main( int argc, char **argv )
 	return a.exec();
     }
 }
+
+#include "test-poppler-qt5.moc"
diff --git a/qt5/tests/test-render-to-file.cpp b/qt5/tests/test-render-to-file.cpp
index 20398ddb..ddc04df1 100644
--- a/qt5/tests/test-render-to-file.cpp
+++ b/qt5/tests/test-render-to-file.cpp
@@ -41,12 +41,12 @@ int main( int argc, char **argv )
     QString backendString;
     if (argc == 3 && strcmp(argv[2], "-arthur") == 0)
     {
-        backendString = "Arthur";
+        backendString = QStringLiteral("Arthur");
         doc->setRenderBackend(Poppler::Document::ArthurBackend);
     }
     else
     {
-        backendString = "Splash";
+        backendString = QStringLiteral("Splash");
         doc->setRenderBackend(Poppler::Document::SplashBackend);
     }
     doc->setRenderHint(Poppler::Document::Antialiasing, true);
@@ -60,7 +60,7 @@ int main( int argc, char **argv )
             QTime t = QTime::currentTime();
             QImage image = page->renderToImage();
             qDebug() << "Rendering took" << t.msecsTo(QTime::currentTime()) << "msecs";
-            image.save(QString("test-render-to-file%1.ppm").arg(i));
+            image.save(QStringLiteral("test-render-to-file%1.ppm").arg(i));
             delete page;
         }
     }
commit 74ad4e3570f31afcb7e6e00e0d9cf2c53c3db6eb
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 7 15:52:00 2018 +0100

    char * -> QStringLiteral

diff --git a/qt5/src/poppler-private.cc b/qt5/src/poppler-private.cc
index edbabe13..392f7802 100644
--- a/qt5/src/poppler-private.cc
+++ b/qt5/src/poppler-private.cc
@@ -160,7 +160,7 @@ namespace Debug {
             return nullptr;
         }
 
-        return QStringToUnicodeGooString(dt.toUTC().toString("yyyyMMddhhmmss+00'00'"));
+        return QStringToUnicodeGooString(dt.toUTC().toString(QStringLiteral("yyyyMMddhhmmss+00'00'")));
     }
 
     Annot::AdditionalActionsType toPopplerAdditionalActionType(Annotation::AdditionalActionType type) {
commit 82b91c56d1a89c29108bf03b07e751b54b589446
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 7 15:48:39 2018 +0100

    exclude some function-args-by-value and function-args-by-ref
    
    Since they are part of the API

diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc
index 64190bce..2aa3cdba 100644
--- a/qt5/src/poppler-annotation.cc
+++ b/qt5/src/poppler-annotation.cc
@@ -4011,7 +4011,7 @@ QPointF LinkAnnotation::linkRegionPoint( int id ) const
     return d->linkRegion[id];
 }
 
-void LinkAnnotation::setLinkRegionPoint( int id, const QPointF &point )
+void LinkAnnotation::setLinkRegionPoint( int id, const QPointF &point ) // clazy:exclude=function-args-by-value
 {
     if ( id < 0 || id >= 4 )
         return;
diff --git a/qt5/src/poppler-annotation.h b/qt5/src/poppler-annotation.h
index dee0874b..715f3bd0 100644
--- a/qt5/src/poppler-annotation.h
+++ b/qt5/src/poppler-annotation.h
@@ -770,6 +770,7 @@ class POPPLER_QT5_EXPORT LinkAnnotation : public Annotation
     void setLinkHighlightMode( HighlightMode mode );
 
     QPointF linkRegionPoint( int id ) const;
+    // TODO Next ABI break, remove ref from point
     void setLinkRegionPoint( int id, const QPointF &point );
 
   private:
diff --git a/qt5/src/poppler-link.cc b/qt5/src/poppler-link.cc
index a9b24696..2cede54e 100644
--- a/qt5/src/poppler-link.cc
+++ b/qt5/src/poppler-link.cc
@@ -430,7 +430,7 @@ class LinkMoviePrivate : public LinkPrivate
 	}
 
 	// LinkGoto
-	LinkGoto::LinkGoto( const QRectF &linkArea, QString extFileName, const LinkDestination & destination )
+	LinkGoto::LinkGoto( const QRectF &linkArea, QString extFileName, const LinkDestination & destination ) // clazy:exclude=function-args-by-ref
 		: Link( *new LinkGotoPrivate( linkArea, destination ) )
 	{
 		Q_D( LinkGoto );
diff --git a/qt5/src/poppler-link.h b/qt5/src/poppler-link.h
index 5dbae6c3..7122c083 100644
--- a/qt5/src/poppler-link.h
+++ b/qt5/src/poppler-link.h
@@ -259,6 +259,7 @@ class POPPLER_QT5_EXPORT LinkGoto : public Link
 		 * \param extFileName if not empty, the file name to be open
 		 * \param destination the destination to be reached
 		 */
+		// TODO Next ABI break, make extFileName const &
 		LinkGoto( const QRectF &linkArea, QString extFileName, const LinkDestination & destination );
 		/**
 		 * Destructor.
diff --git a/qt5/src/poppler-page-transition.cc b/qt5/src/poppler-page-transition.cc
index 2c4a7ef9..7227633c 100644
--- a/qt5/src/poppler-page-transition.cc
+++ b/qt5/src/poppler-page-transition.cc
@@ -47,7 +47,7 @@ class PageTransitionData
     ::PageTransition *pt;
 };
 
-PageTransition::PageTransition(const PageTransitionParams &params)
+PageTransition::PageTransition(const PageTransitionParams &params) // clazy:exclude=function-args-by-value
 {
   data = new PageTransitionData(params.dictObj);
 }
diff --git a/qt5/src/poppler-page-transition.h b/qt5/src/poppler-page-transition.h
index f7cd4c54..5798b6bd 100644
--- a/qt5/src/poppler-page-transition.h
+++ b/qt5/src/poppler-page-transition.h
@@ -97,6 +97,7 @@ class POPPLER_QT5_EXPORT PageTransition {
    accessed by the constructor. The object is only accessed by this
    constructor, and may be deleted after the constructor returns.
   */
+  // TODO Next ABI break, make this private and remove reference
   PageTransition(const PageTransitionParams &params);
 
   /** \brief copy constructor */
commit 1ac74b477748c86263c737c6f1b3ac71fb4808bc
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 7 15:34:20 2018 +0100

    Pass small and trivially-copyable type by value

diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index 612adc3c..b3bcccea 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -142,7 +142,7 @@ struct TrueTypeLoca {
 #define vertTag 0x76657274
 
 struct cmpTrueTypeLocaOffsetFunctor {
-  bool operator()(const TrueTypeLoca &loca1, const TrueTypeLoca &loca2) {
+  bool operator()(const TrueTypeLoca loca1, const TrueTypeLoca loca2) {
     if (loca1.origOffset == loca2.origOffset) {
       return loca1.idx < loca2.idx;
     }
@@ -151,7 +151,7 @@ struct cmpTrueTypeLocaOffsetFunctor {
 };
 
 struct cmpTrueTypeLocaIdxFunctor {
-  bool operator()(const TrueTypeLoca &loca1, const TrueTypeLoca &loca2) {
+  bool operator()(const TrueTypeLoca loca1, const TrueTypeLoca loca2) {
     return loca1.idx < loca2.idx;
   }
 };
diff --git a/poppler/Form.cc b/poppler/Form.cc
index b524ad3d..5f2dfdb1 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -608,7 +608,7 @@ void FormWidgetSignature::updateWidgetAppearance()
 // FormField
 //========================================================================
 
-FormField::FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parentA, std::set<int> *usedParents, FormFieldType ty)
+FormField::FormField(PDFDoc *docA, Object *aobj, const Ref aref, FormField *parentA, std::set<int> *usedParents, FormFieldType ty)
 {
   doc = docA;
   xref = doc->getXRef();
@@ -966,7 +966,7 @@ void FormField::setReadOnly (bool value)
 //------------------------------------------------------------------------
 // FormFieldButton
 //------------------------------------------------------------------------
-FormFieldButton::FormFieldButton(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents)
+FormFieldButton::FormFieldButton(PDFDoc *docA, Object *aobj, const Ref ref, FormField *parent, std::set<int> *usedParents)
   : FormField(docA, aobj, ref, parent, usedParents, formButton)
 {
   Dict* dict = obj.getDict();
@@ -1133,7 +1133,7 @@ FormFieldButton::~FormFieldButton()
 //------------------------------------------------------------------------
 // FormFieldText
 //------------------------------------------------------------------------
-FormFieldText::FormFieldText(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents)
+FormFieldText::FormFieldText(PDFDoc *docA, Object *aobj, const Ref ref, FormField *parent, std::set<int> *usedParents)
   : FormField(docA, aobj, ref, parent, usedParents, formText)
 {
   Dict* dict = obj.getDict();
@@ -1296,7 +1296,7 @@ int FormFieldText::parseDA(GooList* daToks)
 //------------------------------------------------------------------------
 // FormFieldChoice
 //------------------------------------------------------------------------
-FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents)
+FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref ref, FormField *parent, std::set<int> *usedParents)
   : FormField(docA, aobj, ref, parent, usedParents, formChoice)
 {
   numChoices = 0;
@@ -1588,7 +1588,7 @@ const GooString *FormFieldChoice::getSelectedChoice() const {
 //------------------------------------------------------------------------
 // FormFieldSignature
 //------------------------------------------------------------------------
-FormFieldSignature::FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents)
+FormFieldSignature::FormFieldSignature(PDFDoc *docA, Object *dict, const Ref ref, FormField *parent, std::set<int> *usedParents)
   : FormField(docA, dict, ref, parent, usedParents, formSignature),
     signature_type(adbe_pkcs7_detached),
     signature(nullptr), signature_info(nullptr)
@@ -1898,7 +1898,7 @@ Object Form::fieldLookup(Dict *field, const char *key) {
   return ::fieldLookup(field, key, &usedParents);
 }
 
-FormField *Form::createFieldFromDict (Object* obj, PDFDoc *docA, const Ref& pref, FormField *parent, std::set<int> *usedParents)
+FormField *Form::createFieldFromDict (Object* obj, PDFDoc *docA, const Ref pref, FormField *parent, std::set<int> *usedParents)
 {
     FormField *field;
 
diff --git a/poppler/Form.h b/poppler/Form.h
index 43f07164..e6c0b9c7 100644
--- a/poppler/Form.h
+++ b/poppler/Form.h
@@ -287,7 +287,7 @@ public:
 
 class FormField {
 public:
-  FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parent, std::set<int> *usedParents, FormFieldType t=formUndef);
+  FormField(PDFDoc *docA, Object *aobj, const Ref aref, FormField *parent, std::set<int> *usedParents, FormFieldType t=formUndef);
 
   virtual ~FormField();
 
@@ -359,7 +359,7 @@ private:
 
 class FormFieldButton: public FormField {
 public:
-  FormFieldButton(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents);
+  FormFieldButton(PDFDoc *docA, Object *dict, const Ref ref, FormField *parent, std::set<int> *usedParents);
 
   FormButtonType getButtonType () const { return btype; }
 
@@ -403,7 +403,7 @@ protected:
 
 class FormFieldText: public FormField {
 public:
-  FormFieldText(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents);
+  FormFieldText(PDFDoc *docA, Object *dict, const Ref ref, FormField *parent, std::set<int> *usedParents);
   
   const GooString* getContent () const { return content; }
   void setContentCopy (const GooString* new_content);
@@ -448,7 +448,7 @@ protected:
 
 class FormFieldChoice: public FormField {
 public:
-  FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents);
+  FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref ref, FormField *parent, std::set<int> *usedParents);
 
   ~FormFieldChoice();
 
@@ -516,7 +516,7 @@ protected:
 class FormFieldSignature: public FormField {
   friend class FormWidgetSignature;
 public:
-  FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents);
+  FormFieldSignature(PDFDoc *docA, Object *dict, const Ref ref, FormField *parent, std::set<int> *usedParents);
 
   // Use -1 for now as validationTime
   SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime);
@@ -557,7 +557,7 @@ public:
   
   /* Creates a new Field of the type specified in obj's dict.
      used in Form::Form and FormField::FormField */
-  static FormField *createFieldFromDict (Object* obj, PDFDoc *docA, const Ref& aref, FormField *parent, std::set<int> *usedParents);
+  static FormField *createFieldFromDict (Object* obj, PDFDoc *docA, const Ref aref, FormField *parent, std::set<int> *usedParents);
 
   Object *getObj () const { return acroForm; }
   bool getNeedAppearances () const { return needAppearances; }
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index a23d46f3..dc60318a 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -1699,8 +1699,8 @@ Dict *Gfx8BitFont::getResources() {
 //------------------------------------------------------------------------
 
 struct cmpWidthExcepFunctor {
-  bool operator()(const GfxFontCIDWidthExcep &w1,
-		  const GfxFontCIDWidthExcep &w2) {
+  bool operator()(const GfxFontCIDWidthExcep w1,
+		  const GfxFontCIDWidthExcep w2) {
     return w1.first < w2.first;
   }
 };
diff --git a/poppler/GfxState_helpers.h b/poppler/GfxState_helpers.h
index bc0024ed..8183f53b 100644
--- a/poppler/GfxState_helpers.h
+++ b/poppler/GfxState_helpers.h
@@ -30,7 +30,7 @@ static inline double clip01(double x) {
   return (x < 0) ? 0 : (x > 1) ? 1 : x;
 }
 
-static inline void cmykToRGBMatrixMultiplication(const double &c, const double &m, const double &y, const double &k, const double &c1, const double &m1, const double &y1, const double &k1, double &r, double &g, double &b)
+static inline void cmykToRGBMatrixMultiplication(const double c, const double m, const double y, const double k, const double c1, const double m1, const double y1, const double k1, double &r, double &g, double &b)
 {
   double x;
   // this is a matrix multiplication, unrolled for performance
diff --git a/poppler/MarkedContentOutputDev.h b/poppler/MarkedContentOutputDev.h
index ed12b70f..84f15b9e 100644
--- a/poppler/MarkedContentOutputDev.h
+++ b/poppler/MarkedContentOutputDev.h
@@ -50,7 +50,7 @@ private:
   // Note: Takes ownership of strings, increases refcount for font.
   TextSpan(GooString *text,
            GfxFont *font,
-           const GfxRGB& color)
+           const GfxRGB color)
       : data(new Data) {
     data->text = text;
     data->font = font;
diff --git a/poppler/Object.h b/poppler/Object.h
index 506f3360..97bb742b 100644
--- a/poppler/Object.h
+++ b/poppler/Object.h
@@ -85,11 +85,11 @@ struct Ref {
   int gen;			// generation number
 };
 
-inline bool operator== (const Ref& lhs, const Ref& rhs) noexcept {
+inline bool operator== (const Ref lhs, const Ref rhs) noexcept {
   return lhs.num == rhs.num && lhs.gen == rhs.gen;
 }
 
-inline bool operator< (const Ref& lhs, const Ref& rhs) noexcept {
+inline bool operator< (const Ref lhs, const Ref rhs) noexcept {
   if (lhs.num != rhs.num)
     return lhs.num < rhs.num;
   return lhs.gen < rhs.gen;
@@ -104,7 +104,7 @@ struct hash<Ref>
     using argument_type = Ref;
     using result_type = size_t;
 
-    result_type operator() (const argument_type &ref) const noexcept
+    result_type operator() (const argument_type ref) const noexcept
     {
 	return std::hash<int>{}(ref.num) ^ (std::hash<int>{}(ref.gen) << 1);
     }
diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc
index 9922e893..9f5bef83 100644
--- a/poppler/OptionalContent.cc
+++ b/poppler/OptionalContent.cc
@@ -120,7 +120,7 @@ bool OCGs::hasOCGs() const
   return !( optionalContentGroups.empty() );
 }
 
-OptionalContentGroup* OCGs::findOcgByRef( const Ref &ref )
+OptionalContentGroup* OCGs::findOcgByRef( const Ref ref )
 {
   const auto ocg = optionalContentGroups.find( ref );
   return ocg != optionalContentGroups.end() ? ocg->second.get() : nullptr;
diff --git a/poppler/OptionalContent.h b/poppler/OptionalContent.h
index 74d5b436..c383262c 100644
--- a/poppler/OptionalContent.h
+++ b/poppler/OptionalContent.h
@@ -42,7 +42,7 @@ public:
   bool hasOCGs() const;
   const std::unordered_map< Ref, std::unique_ptr< OptionalContentGroup > > &getOCGs() const { return optionalContentGroups; }
 
-  OptionalContentGroup* findOcgByRef( const Ref &ref);
+  OptionalContentGroup* findOcgByRef( const Ref ref);
 
   // Get the root node of the optional content group display tree
   // (which does not necessarily include all of the OCGs).
diff --git a/poppler/StructElement.cc b/poppler/StructElement.cc
index 03115f3c..d94de2a3 100644
--- a/poppler/StructElement.cc
+++ b/poppler/StructElement.cc
@@ -860,7 +860,7 @@ StructElement::StructElement(int mcid, StructTreeRoot *treeRootA, StructElement
   assert(parent);
 }
 
-StructElement::StructElement(const Ref& ref, StructTreeRoot *treeRootA, StructElement *parentA):
+StructElement::StructElement(const Ref ref, StructTreeRoot *treeRootA, StructElement *parentA):
   type(OBJR),
   treeRoot(treeRootA),
   parent(parentA),
diff --git a/poppler/StructElement.h b/poppler/StructElement.h
index d6063ce0..f15bedb5 100644
--- a/poppler/StructElement.h
+++ b/poppler/StructElement.h
@@ -280,7 +280,7 @@ private:
     };
 
     ContentData(int mcidA): mcid(mcidA) {}
-    ContentData(const Ref& r) { ref.num = r.num; ref.gen = r.gen; }
+    ContentData(const Ref r) { ref.num = r.num; ref.gen = r.gen; }
   };
 
   // Common data
@@ -296,7 +296,7 @@ private:
 
   StructElement(Dict *elementDict, StructTreeRoot *treeRootA, StructElement *parentA, std::set<int> &seen);
   StructElement(int mcid, StructTreeRoot *treeRootA, StructElement *parentA);
-  StructElement(const Ref &ref, StructTreeRoot *treeRootA, StructElement *parentA);
+  StructElement(const Ref ref, StructTreeRoot *treeRootA, StructElement *parentA);
 
   void parse(Dict* elementDict);
   StructElement* parseChild(Object *ref, Object* childObj, std::set<int> &seen);
diff --git a/poppler/StructTreeRoot.cc b/poppler/StructTreeRoot.cc
index 20772764..89503b86 100644
--- a/poppler/StructTreeRoot.cc
+++ b/poppler/StructTreeRoot.cc
@@ -175,7 +175,7 @@ void StructTreeRoot::parseNumberTreeNode(Dict *node)
 }
 
 
-void StructTreeRoot::parentTreeAdd(const Ref &objectRef, StructElement *element)
+void StructTreeRoot::parentTreeAdd(const Ref objectRef, StructElement *element)
 {
   auto range = refToParentMap.equal_range(objectRef);
   for (auto it = range.first; it !=range.second; ++it)
diff --git a/poppler/StructTreeRoot.h b/poppler/StructTreeRoot.h
index 3ff18580..1b7a560e 100644
--- a/poppler/StructTreeRoot.h
+++ b/poppler/StructTreeRoot.h
@@ -80,7 +80,7 @@ private:
 
   void parse(Dict *rootDict);
   void parseNumberTreeNode(Dict *node);
-  void parentTreeAdd(const Ref &objectRef, StructElement *element);
+  void parentTreeAdd(const Ref objectRef, StructElement *element);
 
   friend class StructElement;
 };
diff --git a/qt5/src/poppler-annotation-helper.h b/qt5/src/poppler-annotation-helper.h
index 0edcdd0b..f1a8f0c3 100644
--- a/qt5/src/poppler-annotation-helper.h
+++ b/qt5/src/poppler-annotation-helper.h
@@ -50,7 +50,7 @@ class XPDFReader
         static inline void lookupDate( Dict *, char *, QDateTime & dest );
         // transform from user coords to normalized ones using the matrix M
         static inline void transform( double * M, double x, double y, QPointF &res );
-        static inline void invTransform( double * M, const QPointF &p, double &x, double &y );
+        static inline void invTransform( double * M, const QPointF p, double &x, double &y );
 };
 
 void XPDFReader::lookupName( Dict * dict, char * type, QString & dest )
@@ -167,7 +167,7 @@ void XPDFReader::transform( double * M, double x, double y, QPointF &res )
     res.setY( M[1] * x + M[3] * y + M[5] );
 }
 
-void XPDFReader::invTransform( double * M, const QPointF &p, double &x, double &y )
+void XPDFReader::invTransform( double * M, const QPointF p, double &x, double &y )
 {
     const double det = M[0]*M[3] - M[1]*M[2];
     Q_ASSERT(det != 0);
diff --git a/qt5/src/poppler-link.cc b/qt5/src/poppler-link.cc
index 0ea2c461..a9b24696 100644
--- a/qt5/src/poppler-link.cc
+++ b/qt5/src/poppler-link.cc
@@ -148,7 +148,7 @@ class LinkSoundPrivate : public LinkPrivate
 class LinkRenditionPrivate : public LinkPrivate
 {
 	public:
-		LinkRenditionPrivate( const QRectF &area, ::MediaRendition *rendition, ::LinkRendition::RenditionOperation operation, const QString &script, const Ref &annotationReference );
+		LinkRenditionPrivate( const QRectF &area, ::MediaRendition *rendition, ::LinkRendition::RenditionOperation operation, const QString &script, const Ref annotationReference );
 		~LinkRenditionPrivate();
 
 		MediaRendition *rendition;
@@ -157,7 +157,7 @@ class LinkRenditionPrivate : public LinkPrivate
 		Ref annotationReference;
 };
 
-	LinkRenditionPrivate::LinkRenditionPrivate( const QRectF &area, ::MediaRendition *r, ::LinkRendition::RenditionOperation operation, const QString &javaScript, const Ref &ref )
+	LinkRenditionPrivate::LinkRenditionPrivate( const QRectF &area, ::MediaRendition *r, ::LinkRendition::RenditionOperation operation, const QString &javaScript, const Ref ref )
 		: LinkPrivate( area )
 		, rendition( r ? new MediaRendition( r ) : nullptr )
 		, action( LinkRendition::PlayRendition )
@@ -205,14 +205,14 @@ class LinkJavaScriptPrivate : public LinkPrivate
 class LinkMoviePrivate : public LinkPrivate
 {
 	public:
-		LinkMoviePrivate( const QRectF &area, LinkMovie::Operation operation, const QString &title, const Ref &reference );
+		LinkMoviePrivate( const QRectF &area, LinkMovie::Operation operation, const QString &title, const Ref reference );
 
 		LinkMovie::Operation operation;
 		QString annotationTitle;
 		Ref annotationReference;
 };
 
-	LinkMoviePrivate::LinkMoviePrivate( const QRectF &area, LinkMovie::Operation _operation, const QString &title, const Ref &reference  )
+	LinkMoviePrivate::LinkMoviePrivate( const QRectF &area, LinkMovie::Operation _operation, const QString &title, const Ref reference  )
 		: LinkPrivate( area ), operation( _operation ), annotationTitle( title ), annotationReference( reference )
 	{
 	}
@@ -591,7 +591,7 @@ class LinkMoviePrivate : public LinkPrivate
 	}
 
 	// LinkRendition
-	LinkRendition::LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition, int operation, const QString &script, const Ref &annotationReference )
+	LinkRendition::LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition, int operation, const QString &script, const Ref annotationReference )
 		: Link( *new LinkRenditionPrivate( linkArea, rendition, static_cast<enum ::LinkRendition::RenditionOperation>(operation), script, annotationReference ) )
 	{
 	}
@@ -658,7 +658,7 @@ class LinkMoviePrivate : public LinkPrivate
 	}
 
 	// LinkMovie
-	LinkMovie::LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref &annotationReference )
+	LinkMovie::LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref annotationReference )
 		: Link( *new LinkMoviePrivate( linkArea, operation, annotationTitle, annotationReference ) )
 	{
 	}
diff --git a/qt5/src/poppler-link.h b/qt5/src/poppler-link.h
index 938f8b13..5dbae6c3 100644
--- a/qt5/src/poppler-link.h
+++ b/qt5/src/poppler-link.h
@@ -495,7 +495,7 @@ class POPPLER_QT5_EXPORT LinkRendition : public Link
 		 * \param annotationReference the object reference of the screen annotation associated with this rendition action
 		 * \since 0.22
 		 */
-		LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition, int operation, const QString &script, const Ref &annotationReference );
+		LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition, int operation, const QString &script, const Ref annotationReference );
 
 		/**
 		 * Destructor.
@@ -594,7 +594,7 @@ class POPPLER_QT5_EXPORT LinkMovie : public Link
 		 *
 		 * Note: This constructor is supposed to be used by Poppler::Page only.
 		 */
-		LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref &annotationReference );
+		LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref annotationReference );
 		/**
 		 * Destructor.
 		 */
diff --git a/splash/SplashScreen.cc b/splash/SplashScreen.cc
index 615fdd2b..e97a3886 100644
--- a/splash/SplashScreen.cc
+++ b/splash/SplashScreen.cc
@@ -48,7 +48,7 @@ struct SplashScreenPoint {
 
 
 struct cmpDistancesFunctor {
-  bool operator()(const SplashScreenPoint &p0, const SplashScreenPoint &p1) {
+  bool operator()(const SplashScreenPoint p0, const SplashScreenPoint p1) {
     return p0.dist < p1.dist;
   }
 };
diff --git a/splash/SplashXPathScanner.cc b/splash/SplashXPathScanner.cc
index c0905afa..c0f35a02 100644
--- a/splash/SplashXPathScanner.cc
+++ b/splash/SplashXPathScanner.cc
@@ -319,7 +319,7 @@ void SplashXPathScanner::computeIntersections() {
   }
   for (auto& line : allIntersections) {
     std::sort(line.begin(), line.end(),
-              [](const SplashIntersect &i0, const SplashIntersect &i1) {
+              [](const SplashIntersect i0, const SplashIntersect i1) {
                 return i0.x0 < i1.x0;
               });
   }
commit e69cd723679c4732d07dec13c60af800ba9c0e0a
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 7 15:28:48 2018 +0100

    No need to store to a QImage variable to not use it later
    
    Makes clazy happier

diff --git a/qt5/tests/stress-poppler-dir.cpp b/qt5/tests/stress-poppler-dir.cpp
index d76c8a66..599b2f38 100644
--- a/qt5/tests/stress-poppler-dir.cpp
+++ b/qt5/tests/stress-poppler-dir.cpp
@@ -49,7 +49,7 @@ int main( int argc, char **argv )
 
 		for( int index = 0; index < doc->numPages(); ++index ) {
 		    Poppler::Page *page = doc->page( index );
-		    QImage image = page->renderToImage();
+		    page->renderToImage();
 		    page->pageSize();
 		    page->orientation();
 		    delete page;
diff --git a/qt5/tests/stress-poppler-qt5.cpp b/qt5/tests/stress-poppler-qt5.cpp
index 949e4ceb..6440720c 100644
--- a/qt5/tests/stress-poppler-qt5.cpp
+++ b/qt5/tests/stress-poppler-qt5.cpp
@@ -56,7 +56,7 @@ int main( int argc, char **argv )
 
 		for( int index = 0; index < doc->numPages(); ++index ) {
 		    Poppler::Page *page = doc->page( index );
-		    QImage image = page->renderToImage();
+		    page->renderToImage();
 		    page->pageSize();
 		    page->orientation();
 		    delete page;


More information about the poppler mailing list