diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 7799a29fa8..d6a87b7599 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -252,15 +252,16 @@ for(ever) { } else { lib_bases = $$MODULE_MODULE$$qtPlatformTargetSuffix() darwin: lib_bases *= $$MODULE_MODULE + add_lib_to_pretargetdeps = false win32|contains(MODULE_CONFIG, staticlib) { lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB lib_suffixes = $$QMAKE_EXTENSION_STATICLIB lib_suffixes *= $$QMAKE_LIB_EXTENSIONS - add_lib_to_pretargetdeps = true + !xcodebuild: \ + add_lib_to_pretargetdeps = true } else { lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB lib_suffixes = $$QMAKE_EXTENSION_SHLIB - add_lib_to_pretargetdeps = false } candidates = for(lib_base, lib_bases) { diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h index 1e62c8d924..8f467afe4e 100644 --- a/src/gui/painting/qdatabuffer_p.h +++ b/src/gui/painting/qdatabuffer_p.h @@ -89,13 +89,16 @@ public: } void shrink(qsizetype size) { + Q_ASSERT(capacity >= size); capacity = size; if (size) { buffer = (Type*) realloc(static_cast(buffer), capacity * sizeof(Type)); Q_CHECK_PTR(buffer); + siz = std::min(siz, size); } else { free(buffer); buffer = nullptr; + siz = 0; } }