[Development] Qt 5.3 header diff: QtCore

Thiago Macieira thiago.macieira at intel.com
Wed Apr 23 01:34:09 CEST 2014


No major issues. All cosmetic.

Em ter 22 abr 2014, às 14:12:46, Thiago Macieira escreveu:
> --- a/src/corelib/kernel/qmetatype.h
> +++ b/src/corelib/kernel/qmetatype.h
> @@ -771,9 +771,13 @@ struct VariantData
>        , flags(flags_)
>      {
>      }
> +    VariantData(const VariantData &other)
> +        : metaTypeId(other.metaTypeId), data(other.data),
> flags(other.flags){} const int metaTypeId;
>      const void *data;
>      const uint flags;
> +private:
> +    VariantData &operator=(const VariantData &) Q_DECL_EQ_DELETE;
>  };

Is copy construction intended here? If so, please add a comment. If not, 
please use Q_DISABLE_COPY.

> --- a/src/corelib/kernel/qobject.h
> +++ b/src/corelib/kernel/qobject.h
> @@ -549,6 +549,83 @@ template <class T> inline const char *
> qobject_interface_iid()> 
>  Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *);
>  #endif
> 
> +class Q_CORE_EXPORT QSignalBlocker

The class is entirely inline. Drop the Q_CORE_EXPORT.

> --- a/src/corelib/tools/qchar.h
> +++ b/src/corelib/tools/qchar.h
> +#if QT_DEPRECATED_SINCE(5, 3)
> +    QT_DEPRECATED inline Joining joining() const {

Bad coding style. The { needs to be on the next line. Same for qstring.h.

> --- a/src/corelib/tools/qmargins.h
> +++ b/src/corelib/tools/qmargins.h
> @@ -149,51 +152,34 @@ Q_DECL_CONSTEXPR inline bool operator!=(const QMargins
> &m1, const QMargins &m2)> 
>              m1.m_bottom != m2.m_bottom;
>  
>  }
> 
> -Q_DECL_CONSTEXPR inline QRect operator+(const QRect &rectangle, const
> QMargins &margins)

Just a note: this operator was moved to qrect.h and that file now includes 
qmargins.h.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list