lance tool: fix build for Qt 6

Change-Id: I639ffa60609b1e6036252cccc146dd98fded0b3e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 14ccc11194caf0e965c3a61b4f6bec01d5f73eb8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Eirik Aavitsland 2021-03-19 13:22:24 +01:00 committed by Qt Cherry-pick Bot
parent 7432281cc9
commit 0c41c19a6d
3 changed files with 8 additions and 8 deletions

View File

@ -50,7 +50,7 @@ public slots:
void save(); void save();
protected: protected:
bool eventFilter(QObject *o, QEvent *e); bool eventFilter(QObject *o, QEvent *e) override;
protected slots: protected slots:
void cmdSelected(QListWidgetItem *item); void cmdSelected(QListWidgetItem *item);

View File

@ -633,7 +633,7 @@ int main(int argc, char **argv)
+ input.suffix() + QStringLiteral(".pdf"); + input.suffix() + QStringLiteral(".pdf");
p.setOutputFormat(QPrinter::PdfFormat); p.setOutputFormat(QPrinter::PdfFormat);
p.setOutputFileName(file); p.setOutputFileName(file);
p.setPageSize(QPrinter::A4); p.setPageSize(QPageSize(QPageSize::A4));
QPainter pt(&p); QPainter pt(&p);
pcmd.setPainter(&pt); pcmd.setPainter(&pt);
pcmd.setFilePath(fileinfo.absolutePath()); pcmd.setFilePath(fileinfo.absolutePath());

View File

@ -131,12 +131,12 @@ public:
void setCheckersBackground(bool b) { m_checkersBackground = b; } void setCheckersBackground(bool b) { m_checkersBackground = b; }
void setType(DeviceType t) { m_deviceType = t; } void setType(DeviceType t) { m_deviceType = t; }
void resizeEvent(QResizeEvent *e) { void resizeEvent(QResizeEvent *e) override {
m_image = QImage(); m_image = QImage();
T::resizeEvent(e); T::resizeEvent(e);
} }
void paintEvent(QPaintEvent *) { void paintEvent(QPaintEvent *) override {
switch (m_view_mode) { switch (m_view_mode) {
case RenderView: paintRenderView(); break; case RenderView: paintRenderView(); break;
case BaselineView: paintBaselineView(); break; case BaselineView: paintBaselineView(); break;
@ -254,7 +254,7 @@ public:
} }
void mouseMoveEvent(QMouseEvent *e) void mouseMoveEvent(QMouseEvent *e) override
{ {
if (m_currentPoint == -1) if (m_currentPoint == -1)
return; return;
@ -263,7 +263,7 @@ public:
T::update(); T::update();
} }
void mousePressEvent(QMouseEvent *e) void mousePressEvent(QMouseEvent *e) override
{ {
if (e->button() == Qt::RightButton) { if (e->button() == Qt::RightButton) {
m_showControlPoints = true; m_showControlPoints = true;
@ -280,7 +280,7 @@ public:
T::update(); T::update();
} }
void mouseReleaseEvent(QMouseEvent *e) void mouseReleaseEvent(QMouseEvent *e) override
{ {
if (e->button() == Qt::LeftButton) if (e->button() == Qt::LeftButton)
m_currentPoint = -1; m_currentPoint = -1;
@ -289,7 +289,7 @@ public:
T::update(); T::update();
} }
QSize sizeHint() const { return QSize(800, 800); } QSize sizeHint() const override { return QSize(800, 800); }
QList<QPointF> m_controlPoints; QList<QPointF> m_controlPoints;
int m_currentPoint; int m_currentPoint;