From 07e3bcdc106ac42703ae0fb88b6cac2d2bfdd072 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sat, 26 Jan 2013 21:42:12 +0100 Subject: Remove QT_{BEGIN,END}_HEADER macro usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp Reviewed-by: Jędrzej Nowacki Reviewed-by: hjk --- src/corelib/tools/qdatetime.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/corelib/tools/qdatetime.h') diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index ae545eda4f..d1cc10c877 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -48,8 +48,6 @@ #include -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -296,6 +294,4 @@ Q_CORE_EXPORT uint qHash(const QTime &key, uint seed = 0) Q_DECL_NOTHROW; QT_END_NAMESPACE -QT_END_HEADER - #endif // QDATETIME_H -- cgit v1.2.3 From d0804ff2dd3d289a0f0c58aa30c4334e66ea9be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Martsum?= Date: Tue, 29 Jan 2013 16:22:01 +0100 Subject: Provide better error if min (or max) is defined in QDateTime This is better than getting a regular compiler error without knowing where min was previously defined. Change-Id: I5a86599cdf76a9a8d87a51e119543206d9f835c1 Reviewed-by: Mitch Curtis Reviewed-by: Thiago Macieira --- src/corelib/tools/qdatetime.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/corelib/tools/qdatetime.h') diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index d1cc10c877..d1d7f5792e 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -118,6 +118,9 @@ QT_DEPRECATED inline bool setYMD(int y, int m, int d) inline qint64 toJulianDay() const { return jd; } private: +#if defined(min) || defined(max) +#error min or max defined, cannot continue. If this is caused by an #include of windows.h, NOMINMAX can be defined. +#endif static inline qint64 nullJd() { return std::numeric_limits::min(); } static inline qint64 minJd() { return Q_INT64_C(-784350574879); } static inline qint64 maxJd() { return Q_INT64_C( 784354017364); } -- cgit v1.2.3 From 8ec2c0a70e387689d555876875a75391b9cf4e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Thu, 14 Feb 2013 09:43:22 +0100 Subject: Revert "Provide better error if min (or max) is defined in QDateTime" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d0804ff2dd3d289a0f0c58aa30c4334e66ea9be0. The commit breaks JSC which is used by QtWebKit, QtScript and indirectly by QtQuick1, which blocks integration stable->dev. JSC should be fixed upstream, but until then we need to revert the change. Change-Id: I3f7b8be08b68181e08422d2cb00d7cd70a7fc07f Reviewed-by: Simon Hausmann Reviewed-by: Thorbjørn Lund Martsum Reviewed-by: Frederik Gladhorn --- src/corelib/tools/qdatetime.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/corelib/tools/qdatetime.h') diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index d1d7f5792e..d1cc10c877 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -118,9 +118,6 @@ QT_DEPRECATED inline bool setYMD(int y, int m, int d) inline qint64 toJulianDay() const { return jd; } private: -#if defined(min) || defined(max) -#error min or max defined, cannot continue. If this is caused by an #include of windows.h, NOMINMAX can be defined. -#endif static inline qint64 nullJd() { return std::numeric_limits::min(); } static inline qint64 minJd() { return Q_INT64_C(-784350574879); } static inline qint64 maxJd() { return Q_INT64_C( 784354017364); } -- cgit v1.2.3