examples/: implicit capture of this
via [=] is deprecated in C++20
Change-Id: I43b04517e9e3a30468c8ce702c9a49968c0ddc4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
07c34e4c79
commit
339323b999
@ -446,7 +446,7 @@ void CborDumper::dumpOneDetailed(int nestingLevel)
|
||||
if (cborNumberSize(value) != actualSize)
|
||||
printf(" (overlong)");
|
||||
};
|
||||
auto print = [=](const char *descr, const char *fmt, ...) {
|
||||
auto print = [&](const char *descr, const char *fmt, ...) {
|
||||
qint64 prevOffset = offset;
|
||||
offset = reader.currentOffset();
|
||||
if (prevOffset == offset)
|
||||
@ -480,7 +480,7 @@ void CborDumper::dumpOneDetailed(int nestingLevel)
|
||||
return print(descr, "%a", d);
|
||||
};
|
||||
|
||||
auto printString = [=](const char *descr) {
|
||||
auto printString = [&](const char *descr) {
|
||||
constexpr qsizetype ChunkSizeLimit = std::numeric_limits<int>::max();
|
||||
QByteArray indent(nestingLevel * 2, ' ');
|
||||
const char *chunkStr = (reader.isLengthKnown() ? "" : "chunk ");
|
||||
|
@ -42,7 +42,7 @@ MainWindow::MainWindow(VulkanWindow *vulkanWindow)
|
||||
pauseButton->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
connect(quitButton, &QPushButton::clicked, qApp, &QCoreApplication::quit);
|
||||
connect(newButton, &QPushButton::clicked, vulkanWindow, [=] {
|
||||
connect(newButton, &QPushButton::clicked, vulkanWindow, [this, &vulkanWindow] {
|
||||
vulkanWindow->addNew();
|
||||
m_count = vulkanWindow->instanceCount();
|
||||
counterLcd->display(m_count);
|
||||
|
Loading…
Reference in New Issue
Block a user