Obsolete Members for <QtGlobal>
The following members of class <QtGlobal> are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Types
(obsolete) typedef | QtMsgHandler |
Functions
(obsolete) QtMsgHandler | qInstallMsgHandler(QtMsgHandler handler) |
Macros
(obsolete) | Q_DECL_FINAL |
(obsolete) | Q_DECL_OVERRIDE |
(obsolete) | qMove(x) |
Type Documentation
typedef QtMsgHandler
This is a typedef for a pointer to a function with the following signature:
void myMsgHandler(QtMsgType, const char *);
This typedef is deprecated, you should use QtMessageHandler instead.
See also QtMsgType, QtMessageHandler, qInstallMsgHandler(), and qInstallMessageHandler().
Function Documentation
QtMsgHandler qInstallMsgHandler(QtMsgHandler handler)
Installs a Qt message handler which has been defined previously. This method is deprecated, use qInstallMessageHandler instead.
See also QtMsgHandler and qInstallMessageHandler().
Macro Documentation
Q_DECL_FINAL
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
// ...
};
This function was introduced in Qt 5.0.
See also Q_DECL_OVERRIDE.
Q_DECL_OVERRIDE
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;
This function was introduced in Qt 5.0.
See also Q_DECL_FINAL.
qMove(x)
Use std::move instead.
It expands to "std::move".
qMove takes an rvalue reference to its parameter x, and converts it to an xvalue.