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>
This commit is contained in:
Tor Arne Vestbø 2020-07-26 19:39:37 +02:00
parent 3d03f4e989
commit 47cb6ad698
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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);