summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-26 19:39:37 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-29 18:34:16 +0000
commit47cb6ad698232c59641d0d1ffccc4949fcfd2a2f (patch)
tree89cff30ba9582718dc6a05b04644d31089e5caad /tests
parent3d03f4e989e0ae53569a1a2e390d71c41d91f329 (diff)
Don't capture this explicitly in tests
Some compilers implicitly captures, and will warn about the unused capture. Change-Id: Ib5e1cc3956c7eb0dc87cee834cce8a2b3dd0d30b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/util/qshadergraphloader/tst_qshadergraphloader.cpp8
-rw-r--r--tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp2
2 files changed, 5 insertions, 5 deletions
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<QString, QShaderNode>();
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);