summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-12-04 18:42:54 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2018-12-10 15:39:20 +0000
commitd43ac840e5d5a0a2df9e8adce276c956c98be6aa (patch)
tree437b8d09df8272f01ae89bf801174586a21045df /src
parent826b09f0c507fe5321a8534054a4f0b7bdd2699b (diff)
Specify the date-time spec when setting max time
QDateTimeEdit::setMaximumTime() constructed a QDateTime from the given time and its current max date without propagating its existing spec; it thus got a local time. All other QDateTimeEdit methods setting bounds do propagate the spec. So bring setMaximumTime() in line with the others. Fixes: QTBUG-71311 Change-Id: Ic97d22185f76bed46bc8d2884b131942874d9a0a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 68bfd175ff..c66400f423 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -553,7 +553,7 @@ void QDateTimeEdit::setMaximumTime(const QTime &max)
{
Q_D(QDateTimeEdit);
if (max.isValid()) {
- const QDateTime m(d->maximum.toDate(), max);
+ const QDateTime m(d->maximum.toDate(), max, d->spec);
setMaximumDateTime(m);
}
}