diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-01-18 22:17:17 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-01-19 09:04:42 +0000 |
commit | 50bb3130c6fa2f6a46041fbce8c033b8526c4b27 (patch) | |
tree | 110b28db75ceb99d858710c2b32eadfccee759de /share/qbs/modules/cpp/windows-msvc.qbs | |
parent | 3d2a8d52eb35471980b0b3dc95a07bf4d347d04f (diff) | |
download | qbs-50bb3130c6fa2f6a46041fbce8c033b8526c4b27.tar.gz |
Fix misuse of Function.prototype.apply
We were using the following pattern to pass the current arguments object
to functions:
Foo.func.apply(this, arguments)
This is wrong as it changes the this object of func from Foo to
the this object of the calling context.
The right way to pass the current arguments object is
Foo.func.apply(Foo, arguments)
Change-Id: Ie30dea98a9ce78a402677e146dd35fa2b96672ab
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/windows-msvc.qbs')
-rw-r--r-- | share/qbs/modules/cpp/windows-msvc.qbs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs index 8aab2a026..09b6f3a4f 100644 --- a/share/qbs/modules/cpp/windows-msvc.qbs +++ b/share/qbs/modules/cpp/windows-msvc.qbs @@ -128,7 +128,7 @@ CppModule { filePath: ".obj/" + product.name + '_c.pch_copy' } prepare: { - return MSVC.prepareCompiler.apply(this, arguments); + return MSVC.prepareCompiler.apply(MSVC, arguments); } } @@ -151,7 +151,7 @@ CppModule { } prepare: { - return MSVC.prepareCompiler.apply(this, arguments); + return MSVC.prepareCompiler.apply(MSVC, arguments); } } @@ -167,7 +167,7 @@ CppModule { } prepare: { - return MSVC.prepareCompiler.apply(this, arguments); + return MSVC.prepareCompiler.apply(MSVC, arguments); } } @@ -198,7 +198,7 @@ CppModule { } prepare: { - return MSVC.prepareLinker.apply(this, arguments); + return MSVC.prepareLinker.apply(MSVC, arguments); } } @@ -234,7 +234,7 @@ CppModule { } prepare: { - return MSVC.prepareLinker.apply(this, arguments); + return MSVC.prepareLinker.apply(MSVC, arguments); } } |