From 35ebb614bd2b3dd279cd96fd6439543ca00b03eb Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 7 Jun 2019 20:35:22 +0200 Subject: [PATCH 1/5] Doc: Fix typos in QDateTime docs Change-Id: Ibff4555cbd1e980333acd88c697021b4a74998a8 Reviewed-by: Marc Mutz Reviewed-by: Paul Wicking Reviewed-by: Edward Welbourne --- src/corelib/tools/qdatetime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index b0e443c3dc..9b0ed18742 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -1900,7 +1900,7 @@ int QTime::msecsTo(const QTime &t) const 24 hours each time midnight passes; and, beside this, changes in it may not correspond to elapsed time, if a daylight-saving transition intervenes. - \sa QDateTime::currentDateTime(), QDateTime::curentDateTimeUtc() + \sa QDateTime::currentDateTime(), QDateTime::currentDateTimeUtc() */ #if QT_CONFIG(datestring) @@ -3030,7 +3030,7 @@ inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QT datetime by adding a number of seconds, days, months, or years. QDateTime can describe datetimes with respect to \l{Qt::LocalTime}{local - time}, to \l{Qt::UTC}{UTC}, to a specified \l{{Qt::OffsetFromUTC}{offset + time}, to \l{Qt::UTC}{UTC}, to a specified \l{Qt::OffsetFromUTC}{offset from UTC} or to a specified \l{{Qt::TimeZone}{time zone}, in conjunction with the QTimeZone class. For example, a time zone of "Europe/Berlin" will apply the daylight-saving rules as used in Germany since 1970. In contrast, From 89a25a3ef169cb42c54ef1ddcb28f70b24f923ab Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Sun, 9 Jun 2019 20:01:36 +0200 Subject: [PATCH 2/5] Don't count all engines as "in use" in cache Back in 36cb3f3f655a9090c82de609010cbfb88651a0f3, we started properly reference counting font engines as they were entered into the font cache. Prior to this, ref.load == 0 would mean that the engine was essentially owned by the cache. When the change was made, the condition that an engine must be in use if its reference is != 0 remained, and the result of this was used to calculate the limit for when the cache should be flushed. Since this limit was miscalculated, the cache would keep growing, even if it only contained unused font engines. [ChangeLog][QtGui][Text] Fixed a bug which could cause the font cache to grow larger than it was supposed to. Task-number: QTBUG-76219 Change-Id: I4d1541756f3bdf5bd9b0301bf47c6db2e220716a Reviewed-by: Konstantin Ritt --- src/gui/text/qfont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 69255fd59d..fe4fa4929a 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -2970,7 +2970,7 @@ void QFontCache::decreaseCache() it.value().data->ref.load(), engineCacheCount.value(it.value().data), it.value().data->cache_cost); - if (it.value().data->ref.load() != 0) + if (it.value().data->ref.load() > engineCacheCount.value(it.value().data)) in_use_cost += it.value().data->cache_cost / engineCacheCount.value(it.value().data); } From 3af55691bc17b2473212343739736e7e1c275fc9 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 11 Jun 2019 15:20:49 +0200 Subject: [PATCH 3/5] Add neglected connect()s to Q{Date,Time}Edit constructors Pointed out by Daniel Teske. This amends commit c3e1abad4e141e6e9d876e5cff194c473a2654eb. Change-Id: Ia6c6f41bf28e846152f9f86322f20a1b99e57201 Reviewed-by: David Faure --- src/widgets/widgets/qdatetimeedit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp index 41d9faa5c2..acab768d75 100644 --- a/src/widgets/widgets/qdatetimeedit.cpp +++ b/src/widgets/widgets/qdatetimeedit.cpp @@ -1530,7 +1530,7 @@ void QDateTimeEdit::mousePressEvent(QMouseEvent *event) QTimeEdit::QTimeEdit(QWidget *parent) : QDateTimeEdit(QDATETIMEEDIT_TIME_MIN, QVariant::Time, parent) { - connect(this, SIGNAL(timeChanged(QTime)), SIGNAL(userTimeChanged(QTime))); + connect(this, &QTimeEdit::timeChanged, this, &QTimeEdit::userTimeChanged); } /*! @@ -1541,6 +1541,7 @@ QTimeEdit::QTimeEdit(QWidget *parent) QTimeEdit::QTimeEdit(const QTime &time, QWidget *parent) : QDateTimeEdit(time, QVariant::Time, parent) { + connect(this, &QTimeEdit::timeChanged, this, &QTimeEdit::userTimeChanged); } /*! @@ -1599,7 +1600,7 @@ QTimeEdit::~QTimeEdit() QDateEdit::QDateEdit(QWidget *parent) : QDateTimeEdit(QDATETIMEEDIT_DATE_INITIAL, QVariant::Date, parent) { - connect(this, SIGNAL(dateChanged(QDate)), SIGNAL(userDateChanged(QDate))); + connect(this, &QDateEdit::dateChanged, this, &QDateEdit::userDateChanged); } /*! @@ -1610,6 +1611,7 @@ QDateEdit::QDateEdit(QWidget *parent) QDateEdit::QDateEdit(const QDate &date, QWidget *parent) : QDateTimeEdit(date, QVariant::Date, parent) { + connect(this, &QDateEdit::dateChanged, this, &QDateEdit::userDateChanged); } /*! From 2e064637125b1604f7fcd4e6528c43a43487e471 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 10 Apr 2019 15:47:42 +0200 Subject: [PATCH 4/5] Windows: Call ReleaseDC for the private's displayContext Change-Id: Ib5ee1bbe9037ceb13562eadb754c2a5f095b7f87 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowscontext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 76747b7956..de533cab08 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -317,6 +317,8 @@ QWindowsContext::~QWindowsContext() OleUninitialize(); d->m_screenManager.clearScreens(); // Order: Potentially calls back to the windows. + if (d->m_displayContext) + ReleaseDC(nullptr, d->m_displayContext); m_instance = nullptr; } From 067664531853a1e857c777c1cc56fc64b272e021 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 13 Jun 2019 09:38:48 +0300 Subject: [PATCH 5/5] Android: Fix build with NDKr20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In NDK r20 clang adds -lc++ library automatically which leads to link fails. [ChangeLog][Android] Fix NDK r20 linking. Task-number: QTBUG-76293 Change-Id: I6675180a3555d1ad9047d7a9ce1c03333cf0ab35 Reviewed-by: Jörg Bornemann --- mkspecs/android-clang/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf index a077c70cba..975d43779d 100644 --- a/mkspecs/android-clang/qmake.conf +++ b/mkspecs/android-clang/qmake.conf @@ -31,7 +31,7 @@ else: equals(ANDROID_TARGET_ARCH, mips64): \ QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH -fno-limit-debug-info -QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a +QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ equals(ANDROID_TARGET_ARCH, armeabi-v7a): QMAKE_LINK += -Wl,--exclude-libs,libunwind.a QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \