Obsolete Members for QVarLengthArray

以下成员源于类 QVarLengthArray 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(deprecated in 6.3) void prepend (T && value )
(deprecated in 6.3) void prepend (const T & value )

成员函数文档编制

[deprecated in 6.3] void QVarLengthArray:: prepend ( T && value )

[deprecated in 6.3] void QVarLengthArray:: prepend (const T & value )

This function is deprecated since 6.3. We strongly advise against using it in new code.

This is slow. If you must, use insert(cbegin(), ~~~) 代替。

插入 value at the beginning of the array.

This is the same as vector.insert(0, value ).

For large arrays, this operation can be slow ( 线性时间 ), because it requires moving all the items in the vector by one position further in memory. If you want a container class that provides a fast prepend () function, use std::list instead.

另请参阅 append () 和 insert ().