Obsolete Members for QScopedPointer
クラスQScopedPointer の以下のメンバーは非推奨です。これらは古いソース・コードの動作を維持するために提供されています。新しいコードでは使用しないことを強くお勧めします。
パブリック関数
関連する非メンバー
(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)
この関数は6.2から非推奨となった。新しいコードでは使用しないことを強くお勧めします。
代わりにstd::unique_ptr
を使ってください。この関数はポインタをスコープから逃がしてしまう可能性があります。
この関数は、このスコープ付きポインタをother と入れ替えます。この操作は非常に高速で、失敗することはありません。
[noexcept, deprecated in 6.1]
T *QScopedPointer::take()
この関数は6.1から非推奨となった。新しいコードでは使用しないことを強くお勧めします。
代わりにstd::unique_ptr
とrelease()
を使用してください。
このオブジェクトが参照するポインタの値を返します。このQScopedPointer オブジェクトのポインタはnullptr
にリセットされる。
この関数の呼び出し元がポインタの所有権を持つ。
関連する非会員
[noexcept, deprecated in 6.2]
void swap(QScopedPointer<T, Cleanup> &lhs, QScopedPointer<T, Cleanup> &rhs)
この関数は6.2から非推奨となった。新しいコードでは使用しないことを強くお勧めします。
代わりにstd::unique_ptr
を使ってください。この関数はポインタをスコープから逃がしてしまう可能性があります。
lhs をrhs と入れ替えます。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.