Fix broken capture in hellovulkancubes example
Amends 339323b999
Capturing a function argument (or any local variable)
by address is a bad idea.
Fixes: QTBUG-118912
Fixes: QTBUG-118986
Change-Id: I521d319a37f7acd6c66732f5f7d3cf1be4d49029
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
parent
2ac50bb0f5
commit
9ee30b1dc2
@ -42,7 +42,7 @@ MainWindow::MainWindow(VulkanWindow *vulkanWindow)
|
|||||||
pauseButton->setFocusPolicy(Qt::NoFocus);
|
pauseButton->setFocusPolicy(Qt::NoFocus);
|
||||||
|
|
||||||
connect(quitButton, &QPushButton::clicked, qApp, &QCoreApplication::quit);
|
connect(quitButton, &QPushButton::clicked, qApp, &QCoreApplication::quit);
|
||||||
connect(newButton, &QPushButton::clicked, vulkanWindow, [this, &vulkanWindow] {
|
connect(newButton, &QPushButton::clicked, vulkanWindow, [this, vulkanWindow] {
|
||||||
vulkanWindow->addNew();
|
vulkanWindow->addNew();
|
||||||
m_count = vulkanWindow->instanceCount();
|
m_count = vulkanWindow->instanceCount();
|
||||||
counterLcd->display(m_count);
|
counterLcd->display(m_count);
|
||||||
|
Loading…
Reference in New Issue
Block a user