以下成员源于类 <QtGlobal> 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(deprecated)
|
Q_DECL_FINAL |
(deprecated)
|
Q_DECL_OVERRIDE |
(deprecated)
|
qMove ( x ) |
[since 5.0]
Q_DECL_FINAL
This function is deprecated. We strongly advise against using it in new code.
This macro can be used to declare an overriding virtual or a class as "final", with Java semantics. Further-derived classes can then no longer override this virtual function, or inherit from this class, respectively.
It expands to "final".
The macro goes at the end of the function, usually after the
const
, if any:
// more-derived classes no longer permitted to override this: virtual void MyWidget::paintEvent(QPaintEvent*) final;
For classes, it goes in front of the
:
in the class definition, if any:
class QRect final { // cannot be derived from // ... };
该函数在 Qt 5.0 引入。
另请参阅 Q_DECL_OVERRIDE .
[since 5.0]
Q_DECL_OVERRIDE
This function is deprecated. We strongly advise against using it in new code.
This macro can be used to declare an overriding virtual function. Use of this markup will allow the compiler to generate an error if the overriding virtual function does not in fact override anything.
It expands to "override".
The macro goes at the end of the function, usually after the
const
, if any:
// generate error if this doesn't actually override anything: virtual void MyWidget::paintEvent(QPaintEvent*) override;
该函数在 Qt 5.0 引入。
另请参阅 Q_DECL_FINAL .
This function is deprecated. We strongly advise against using it in new code.
使用
std::move
代替。
It expands to "std::move".
qMove takes an rvalue reference to its parameter x , and converts it to an xvalue.