QJniObject: fix signature of LocalFrame::newLocalRef

The implementation calls a const member function on the QJniObject
passed in, and no move happens. And the parameter is not a universal
reference either.

Found during header review.

Pick-to: 6.7
Task-number: QTBUG-119952
Change-Id: I9479df798178b089277aa230f50f4e73f38ceb2c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
bb10
Volker Hilsheimer 2024-01-23 11:32:59 +01:00
parent 101ab27891
commit a6151e2d35
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class Q_CORE_EXPORT QJniObject
return static_cast<T>(jniEnv()->NewLocalRef(object));
}
template <typename T>
auto newLocalRef(QJniObject &&object)
auto newLocalRef(const QJniObject &object)
{
return newLocalRef<T>(object.template object<T>());
}