forked from pool/libqt5-qtbase
3b1f949c32
- Added xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch and xcb-fix-yet-another-crash-when-screens-are-disconnected.patch (kde#341497, qtbug#47385) - Added QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch - When in SLE12, use the internal Harfbuzz version instead of the system one (which is too old for Qt's requirements) - Fix-compile-error-on-big-endian.patch: Fix compile error on big endian OBS-URL: https://build.opensuse.org/request/show/338269 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=47
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From eda79a467ee7e45f3de63973b633e2a790b613eb Mon Sep 17 00:00:00 2001
|
|
From: Marc Mutz <marc.mutz@kdab.com>
|
|
Date: Thu, 25 Jun 2015 22:34:58 +0200
|
|
Subject: QDate/QTime: fix SiC introduced by adding new non-explicit ctors
|
|
|
|
The new constructors were added in c94d41d9 to help
|
|
constexpr'ify QDate and QTime. Even though private,
|
|
they participate in overload resolution and break
|
|
function pairs overloaded on QDate and int or
|
|
QTime and int.
|
|
|
|
Mark them explicit.
|
|
|
|
[ChangeLog][QtCore][QDate/QTime] Fixed a minor source-incompatibility
|
|
between Qt 5.4 and 5.5.0 involving sets of functions overloaded on
|
|
QTime and some integer or QDate and some integer.
|
|
|
|
Change-Id: I65a09aaca2b083cda90255c24cc72ef51119d3b1
|
|
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
|
|
---
|
|
src/corelib/tools/qdatetime.h | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
|
|
index 78ec2b1..6651efd 100644
|
|
--- a/src/corelib/tools/qdatetime.h
|
|
+++ b/src/corelib/tools/qdatetime.h
|
|
@@ -59,7 +59,7 @@ public:
|
|
StandaloneFormat
|
|
};
|
|
private:
|
|
- Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {}
|
|
+ explicit Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {}
|
|
public:
|
|
Q_DECL_CONSTEXPR QDate() : jd(nullJd()) {}
|
|
QDate(int y, int m, int d);
|
|
@@ -138,7 +138,7 @@ Q_DECLARE_TYPEINFO(QDate, Q_MOVABLE_TYPE);
|
|
|
|
class Q_CORE_EXPORT QTime
|
|
{
|
|
- Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
|
|
+ explicit Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
|
|
#if defined(Q_OS_WINCE)
|
|
, startTick(NullTime)
|
|
#endif
|
|
--
|
|
cgit v0.11.0
|