diff --git a/tests/auto/gui/util/qshadergraphloader/tst_qshadergraphloader.cpp b/tests/auto/gui/util/qshadergraphloader/tst_qshadergraphloader.cpp index 89cd5a7ecb..53ddc1874f 100644 --- a/tests/auto/gui/util/qshadergraphloader/tst_qshadergraphloader.cpp +++ b/tests/auto/gui/util/qshadergraphloader/tst_qshadergraphloader.cpp @@ -276,7 +276,7 @@ void tst_QShaderGraphLoader::shouldManipulateLoaderMembers() // WHEN - const auto prototypes = [this]{ + const auto prototypes = [&]{ auto res = QHash(); res.insert("foo", createNode({})); return res; @@ -332,7 +332,7 @@ void tst_QShaderGraphLoader::shouldLoadFromJsonStream_data() " ]" "}"; - const auto smallProtos = [this]{ + const auto smallProtos = [&]{ auto protos = PrototypeHash(); auto input = createNode({ @@ -353,7 +353,7 @@ void tst_QShaderGraphLoader::shouldLoadFromJsonStream_data() return protos; }(); - const auto smallGraph = [this]{ + const auto smallGraph = [&]{ auto graph = QShaderGraph(); auto input = createNode({ @@ -485,7 +485,7 @@ void tst_QShaderGraphLoader::shouldLoadFromJsonStream_data() " ]" "}"; - const auto complexProtos = [this]{ + const auto complexProtos = [&]{ const auto openGLES2 = createFormat(QShaderFormat::OpenGLES, 2, 0); const auto openGL3 = createFormat(QShaderFormat::OpenGLCoreProfile, 3, 0); diff --git a/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp b/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp index f3e1013a4b..af9e7b8c8e 100644 --- a/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp +++ b/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp @@ -225,7 +225,7 @@ void tst_QShaderNodesLoader::shouldLoadFromJsonStream_data() " }" "}"; - const auto smallProtos = [this]{ + const auto smallProtos = [&]{ const auto openGLES2 = createFormat(QShaderFormat::OpenGLES, 2, 0); const auto openGLES2Extended = createFormat(QShaderFormat::OpenGLES, 2, 0, {"ext1", "ext2"}, "kdab"); const auto openGL2 = createFormat(QShaderFormat::OpenGLCompatibilityProfile, 2, 1);