diff --git a/tests/manual/lance/interactivewidget.h b/tests/manual/lance/interactivewidget.h index 442f372db7..bd6d54664a 100644 --- a/tests/manual/lance/interactivewidget.h +++ b/tests/manual/lance/interactivewidget.h @@ -50,7 +50,7 @@ public slots: void save(); protected: - bool eventFilter(QObject *o, QEvent *e); + bool eventFilter(QObject *o, QEvent *e) override; protected slots: void cmdSelected(QListWidgetItem *item); diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp index 662fc35ad6..caf68654b6 100644 --- a/tests/manual/lance/main.cpp +++ b/tests/manual/lance/main.cpp @@ -633,7 +633,7 @@ int main(int argc, char **argv) + input.suffix() + QStringLiteral(".pdf"); p.setOutputFormat(QPrinter::PdfFormat); p.setOutputFileName(file); - p.setPageSize(QPrinter::A4); + p.setPageSize(QPageSize(QPageSize::A4)); QPainter pt(&p); pcmd.setPainter(&pt); pcmd.setFilePath(fileinfo.absolutePath()); diff --git a/tests/manual/lance/widgets.h b/tests/manual/lance/widgets.h index d8cc12cab5..a804471f53 100644 --- a/tests/manual/lance/widgets.h +++ b/tests/manual/lance/widgets.h @@ -131,12 +131,12 @@ public: void setCheckersBackground(bool b) { m_checkersBackground = b; } void setType(DeviceType t) { m_deviceType = t; } - void resizeEvent(QResizeEvent *e) { + void resizeEvent(QResizeEvent *e) override { m_image = QImage(); T::resizeEvent(e); } - void paintEvent(QPaintEvent *) { + void paintEvent(QPaintEvent *) override { switch (m_view_mode) { case RenderView: paintRenderView(); break; case BaselineView: paintBaselineView(); break; @@ -254,7 +254,7 @@ public: } - void mouseMoveEvent(QMouseEvent *e) + void mouseMoveEvent(QMouseEvent *e) override { if (m_currentPoint == -1) return; @@ -263,7 +263,7 @@ public: T::update(); } - void mousePressEvent(QMouseEvent *e) + void mousePressEvent(QMouseEvent *e) override { if (e->button() == Qt::RightButton) { m_showControlPoints = true; @@ -280,7 +280,7 @@ public: T::update(); } - void mouseReleaseEvent(QMouseEvent *e) + void mouseReleaseEvent(QMouseEvent *e) override { if (e->button() == Qt::LeftButton) m_currentPoint = -1; @@ -289,7 +289,7 @@ public: T::update(); } - QSize sizeHint() const { return QSize(800, 800); } + QSize sizeHint() const override { return QSize(800, 800); } QList m_controlPoints; int m_currentPoint;