Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Obsolete Members for <QtGlobal>

The following members of class <QtGlobal> are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Macros

(deprecated) Q_CC_INTEL
(deprecated (6.4)) Q_DECL_CONSTEXPR
(deprecated) Q_DECL_FINAL
(deprecated (6.4)) Q_DECL_NOEXCEPT
(deprecated (6.4)) Q_DECL_NOEXCEPT_EXPR(x)
(deprecated (6.4)) Q_DECL_NOTHROW
(deprecated) Q_DECL_OVERRIDE
(deprecated (6.4)) Q_DECL_RELAXED_CONSTEXPR
(deprecated) qMove(x)

Macro Documentation

Q_CC_INTEL

This macro is deprecated. We strongly advise against using it in new code.

This macro used to be defined if the application was compiled with the old Intel C++ compiler for Linux, macOS or Windows. The new oneAPI C++ compiler is just a build of Clang and therefore does not define this macro.

See also Q_CC_CLANG.

Q_DECL_CONSTEXPR

This macro is deprecated since 6.4. We strongly advise against using it in new code.

Use the constexpr keyword instead.

This macro can be used to declare variable that should be constructed at compile-time, or an inline function that can be computed at compile-time.

See also Q_DECL_RELAXED_CONSTEXPR.

[since 5.0] Q_DECL_FINAL

This macro 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
        // ...
    };

This macro was introduced in Qt 5.0.

See also Q_DECL_OVERRIDE.

[since 5.0] Q_DECL_NOEXCEPT

This macro is deprecated since 6.4. We strongly advise against using it in new code.

Use the noexcept keyword instead.

This macro marks a function as never throwing. If the function does nevertheless throw, the behaviour is defined: std::terminate() is called.

This macro was introduced in Qt 5.0.

See also Q_DECL_NOTHROW and Q_DECL_NOEXCEPT_EXPR().

[since 5.0] Q_DECL_NOEXCEPT_EXPR(x)

This macro is deprecated since 6.4. We strongly advise against using it in new code.

Use the noexcept keyword instead.

This macro marks a function as non-throwing if x is true. If the function does nevertheless throw, the behaviour is defined: std::terminate() is called.

This macro was introduced in Qt 5.0.

See also Q_DECL_NOTHROW and Q_DECL_NOEXCEPT.

[since 5.0] Q_DECL_NOTHROW

This macro is deprecated since 6.4. We strongly advise against using it in new code.

Use the noexcept keyword instead.

This macro marks a function as never throwing, under no circumstances. If the function does nevertheless throw, the behaviour is undefined.

This macro was introduced in Qt 5.0.

See also Q_DECL_NOEXCEPT and Q_DECL_NOEXCEPT_EXPR().

[since 5.0] Q_DECL_OVERRIDE

This macro 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;

This macro was introduced in Qt 5.0.

See also Q_DECL_FINAL.

Q_DECL_RELAXED_CONSTEXPR

This macro is deprecated since 6.4. We strongly advise against using it in new code.

Use the constexpr keyword instead.

This macro can be used to declare an inline function that can be computed at compile-time according to the relaxed rules from C++14.

See also Q_DECL_CONSTEXPR.

qMove(x)

This macro is deprecated. We strongly advise against using it in new code.

Use std::move instead.

It expands to "std::move".

qMove takes an rvalue reference to its parameter x, and converts it to an xvalue.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded