QPropertyBindingPrivate: fix -Wshadow in sourceLocation()

This is preparation of applying headercheck to private headers, too.

Renaming the returned value to `result` also obsoletes the need for
the ugly this-> qualification, otherwise easily misread for a compiler
hint to look up the name in a template base class (which here does not
exist).

Amends 4d579851c842e136fbaf7a5d629c249456a91e39.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: Ib683f3deec492acdd2bc61806a8b0467f18f0fe8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 5cd3fec9f9a2bca8c27bdee6b185714983b5d11e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-09-12 16:38:12 +02:00 committed by Qt Cherry-pick Bot
parent 3acde1af11
commit 3efd5950f3

View File

@ -385,11 +385,11 @@ public:
QPropertyBindingSourceLocation sourceLocation() const
{
if (!hasCustomVTable())
return this->location;
QPropertyBindingSourceLocation location;
constexpr auto msg = "Custom location";
location.fileName = msg;
return location;
QPropertyBindingSourceLocation result;
constexpr auto msg = "Custom location";
result.fileName = msg;
return result;
}
QPropertyBindingError bindingError() const { return m_error; }
QMetaType valueMetaType() const { return metaType; }