From 75da5e8ca521a642934e0adfc0871c227612f050 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sat, 4 Jun 2022 17:09:12 +0800 Subject: [PATCH] chore: use const reference for a lambda slot --- app/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index e9db8c9..c19cb85 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -74,7 +74,7 @@ MainWindow::MainWindow(QWidget *parent) m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio); connect(m_graphicsView, &GraphicsView::navigatorViewRequired, - this, [ = ](bool required, QTransform tf){ + this, [ = ](bool required, const QTransform & tf){ m_gv->setTransform(GraphicsView::resetScale(tf)); m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio); m_gv->setVisible(required);