以下成員源於類 QScopedPointer 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(deprecated in 6.2)
void
|
swap (QScopedPointer<T, Cleanup> & other ) |
(deprecated in 6.1)
T *
|
take () |
(deprecated in 6.2)
void
|
swap (QScopedPointer<T, Cleanup> & lhs , QScopedPointer<T, Cleanup> & rhs ) |
[noexcept, deprecated in 6.2]
void
QScopedPointer::
swap
(
QScopedPointer
<
T
,
Cleanup
> &
other
)
This function is deprecated since 6.2. We strongly advise against using it in new code.
使用
std::unique_ptr
instead; this function may let a pointer escape its scope.
Swaps this scoped pointer with other 。此操作很快且從不失敗。
[noexcept, deprecated in 6.1]
T
*QScopedPointer::
take
()
This function is deprecated since 6.1. We strongly advise against using it in new code.
使用
std::unique_ptr
and
release()
代替。
Returns the value of the pointer referenced by this object. The pointer of this
QScopedPointer
object will be reset to
nullptr
.
Callers of this function take ownership of the pointer.
[noexcept, deprecated in 6.2]
void
swap
(
QScopedPointer
<
T
,
Cleanup
> &
lhs
,
QScopedPointer
<
T
,
Cleanup
> &
rhs
)
This function is deprecated since 6.2. We strongly advise against using it in new code.
使用
std::unique_ptr
instead; this function may let a pointer escape its scope.
交換 lhs with rhs .