Skip to content

Commit

Permalink
Merge tag 'v6.2.10-lts' into tqtc/lts-6.2-opensource
Browse files Browse the repository at this point in the history
Qt 6.2.10-lts release

Change-Id: I3baf877fbd9f382c35c048d3183a635449becdce
  • Loading branch information
Tarja Sundqvist committed Oct 4, 2024
2 parents c6ab404 + 8d7d8b9 commit 017d80e
Show file tree
Hide file tree
Showing 636 changed files with 44,025 additions and 32,012 deletions.
2 changes: 1 addition & 1 deletion .cmake.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(QT_REPO_MODULE_VERSION "6.2.9")
set(QT_REPO_MODULE_VERSION "6.2.10")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "")

# Minimum requirement for building Qt
Expand Down
2 changes: 1 addition & 1 deletion .qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ DEFINES += QT_NO_JAVA_STYLE_ITERATORS
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)

MODULE_VERSION = 6.2.9
MODULE_VERSION = 6.2.10
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ check_cxx_source_compiles("
#include <EGL/egl.h>
int main(int, char **) {
EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;
[[maybe_unused]] EGLint x = 0;
EGLDisplay dpy = 0; EGLContext ctx = 0;
eglDestroyContext(dpy, ctx);
}" HAVE_EGL)

Expand Down
11 changes: 11 additions & 0 deletions cmake/FindWrapJpeg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include(QtFindWrapHelper NO_POLICY_SCOPE)

qt_find_package_system_or_bundled(wrap_jpeg
FRIENDLY_PACKAGE_NAME "Jpeg"
WRAP_PACKAGE_TARGET "WrapJpeg::WrapJpeg"
WRAP_PACKAGE_FOUND_VAR_NAME "WrapJpeg_FOUND"
BUNDLED_PACKAGE_NAME "BundledLibjpeg"
BUNDLED_PACKAGE_TARGET "BundledLibjpeg"
SYSTEM_PACKAGE_NAME "WrapSystemJpeg"
SYSTEM_PACKAGE_TARGET "WrapSystemJpeg::WrapSystemJpeg"
)
8 changes: 6 additions & 2 deletions cmake/FindWrapOpenGL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ if (OpenGL_FOUND)

add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED)
if(APPLE)
# CMake 3.27 and older:
# On Darwin platforms FindOpenGL sets IMPORTED_LOCATION to the absolute path of the library
# within the framework. This ends up as an absolute path link flag, which we don't want,
# because that makes our .prl files un-relocatable.
# Extract the framework path instead, and use that in INTERFACE_LINK_LIBRARIES,
# which CMake ends up transforming into a reloctable -framework flag.
# which CMake ends up transforming into a relocatable -framework flag.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/20871 for details.
#
# CMake 3.28 and above:
# IMPORTED_LOCATION is the absolute path the the OpenGL.framework folder.
get_target_property(__opengl_fw_lib_path OpenGL::GL IMPORTED_LOCATION)
if(__opengl_fw_lib_path)
if(__opengl_fw_lib_path AND NOT __opengl_fw_lib_path MATCHES "/([^/]+)\\.framework$")
get_filename_component(__opengl_fw_path "${__opengl_fw_lib_path}" DIRECTORY)
endif()

Expand Down
32 changes: 32 additions & 0 deletions cmake/FindWrapSystemJpeg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
if(TARGET WrapSystemJpeg::WrapSystemJpeg)
set(WrapSystemJpeg_FOUND TRUE)
return()
endif()
set(WrapSystemJpeg_REQUIRED_VARS __jpeg_found)

find_package(JPEG ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET)

set(__jpeg_target_name "JPEG::JPEG")
if(JPEG_FOUND AND TARGET "${__jpeg_target_name}")
set(__jpeg_found TRUE)
endif()

if(JPEG_LIBRARIES)
list(PREPEND WrapSystemJpeg_REQUIRED_VARS JPEG_LIBRARIES)
endif()
if(JPEG_VERSION)
set(WrapSystemJpeg_VERSION "${JPEG_VERSION}")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WrapSystemJpeg
REQUIRED_VARS ${WrapSystemJpeg_REQUIRED_VARS}
VERSION_VAR WrapSystemJpeg_VERSION)

if(WrapSystemJpeg_FOUND)
add_library(WrapSystemJpeg::WrapSystemJpeg INTERFACE IMPORTED)
target_link_libraries(WrapSystemJpeg::WrapSystemJpeg
INTERFACE "${__jpeg_target_name}")
endif()
unset(__jpeg_target_name)
unset(__jpeg_found)
16 changes: 8 additions & 8 deletions cmake/QtBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -269,21 +269,21 @@ if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS WIN64 _WIN64)
endif()
if(MSVC)
if (CLANG)

if(CLANG)
if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC" OR MSVC)
set(QT_DEFAULT_MKSPEC win32-clang-msvc)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
elseif(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU" OR MINGW)
set(QT_DEFAULT_MKSPEC win32-clang-g++)
endif()
elseif(MSVC)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(QT_DEFAULT_MKSPEC win32-arm64-msvc)
else()
set(QT_DEFAULT_MKSPEC win32-msvc)
endif()
elseif(CLANG AND MINGW)
set(QT_DEFAULT_MKSPEC win32-clang-g++)
elseif(MINGW)
set(QT_DEFAULT_MKSPEC win32-g++)
endif()

if (MINGW)
list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS MINGW_HAS_SECURE_API=1)
endif()
elseif(LINUX)
Expand Down
4 changes: 2 additions & 2 deletions cmake/QtSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# Set the QT_IS_BUILDING_QT variable so we can verify whether we are building
# Qt from source
set(QT_BUILDING_QT TRUE CACHE
TYPE STRING "When this is present and set to true, it signals that we are building Qt from source.")
set(QT_BUILDING_QT TRUE CACHE BOOL
"When this is present and set to true, it signals that we are building Qt from source.")

# Pre-calculate the developer_build feature if it's set by the user via INPUT_developer_build
if(NOT FEATURE_developer_build AND INPUT_developer_build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ instructions:
variableValue: "{{.Env.COMMON_TEST_CMAKE_ARGS}}"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
disable_if:
condition: property
property: features
contains_value: DisableTests
condition: or
conditions:
- condition: property
property: features
contains_value: DisableTests
- condition: property
property: features
contains_value: DoNotBuildTests
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ instructions:
variableValue: "{{.Env.COMMON_TARGET_TEST_CMAKE_ARGS}}"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
disable_if:
condition: property
property: features
contains_value: DisableTests
condition: or
conditions:
- condition: property
property: features
contains_value: DisableTests
- condition: property
property: features
contains_value: DoNotBuildTests
22 changes: 15 additions & 7 deletions examples/widgets/gestures/imagegestures/imagewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,23 @@ void ImageWidget::openDirectory(const QString &path)
this->path = path;
QDir dir(path);
const QStringList nameFilters{"*.jpg", "*.png"};
files = dir.entryList(nameFilters, QDir::Files|QDir::Readable, QDir::Name);
files = dir.entryInfoList(nameFilters, QDir::Files|QDir::Readable, QDir::Name);

position = 0;
goToImage(0);
update();
}

QImage ImageWidget::loadImage(const QString &fileName) const
/*
With Android's content scheme paths, it might not be possible to simply
append a file name to the chosen directory path to be able to open the image,
because usually paths are returned by an Android file provider and handling those
paths manually is not guaranteed to work. For that reason, it's better to keep
around QFileInfo objects and use absoluteFilePath().
*/
QImage ImageWidget::loadImage(const QFileInfo &fileInfo) const
{
const QString fileName = fileInfo.absoluteFilePath();
QImageReader reader(fileName);
reader.setAutoTransform(true);
qCDebug(lcExample) << "loading" << QDir::toNativeSeparators(fileName) << position << '/' << files.size();
Expand Down Expand Up @@ -234,7 +242,7 @@ void ImageWidget::goNextImage()
prevImage = currentImage;
currentImage = nextImage;
if (position+1 < files.size())
nextImage = loadImage(path + QLatin1Char('/') + files.at(position+1));
nextImage = loadImage(files.at(position + 1));
else
nextImage = QImage();
}
Expand All @@ -251,7 +259,7 @@ void ImageWidget::goPrevImage()
nextImage = currentImage;
currentImage = prevImage;
if (position > 0)
prevImage = loadImage(path + QLatin1Char('/') + files.at(position-1));
prevImage = loadImage(files.at(position - 1));
else
prevImage = QImage();
}
Expand Down Expand Up @@ -281,12 +289,12 @@ void ImageWidget::goToImage(int index)
position = index;

if (index > 0)
prevImage = loadImage(path + QLatin1Char('/') + files.at(position-1));
prevImage = loadImage(files.at(position - 1));
else
prevImage = QImage();
currentImage = loadImage(path + QLatin1Char('/') + files.at(position));
currentImage = loadImage(files.at(position));
if (position+1 < files.size())
nextImage = loadImage(path + QLatin1Char('/') + files.at(position+1));
nextImage = loadImage(files.at(position + 1));
else
nextImage = QImage();
update();
Expand Down
5 changes: 3 additions & 2 deletions examples/widgets/gestures/imagegestures/imagewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#ifndef IMAGEWIDGET_H
#define IMAGEWIDGET_H

#include <QFileInfo>
#include <QImage>
#include <QLoggingCategory>
#include <QWidget>
Expand Down Expand Up @@ -87,14 +88,14 @@ class ImageWidget : public QWidget
void swipeTriggered(QSwipeGesture*);
//! [class definition begin]

QImage loadImage(const QString &fileName) const;
QImage loadImage(const QFileInfo &fileInfo) const;
void loadImage();
void goNextImage();
void goPrevImage();
void goToImage(int index);

QString path;
QStringList files;
QFileInfoList files;
int position;

QImage prevImage, nextImage;
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/tools/echoplugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(plugandpaint LANGUAGES CXX)
project(echoplugin LANGUAGES CXX)

set(CMAKE_AUTOMOC ON)

Expand Down
9 changes: 6 additions & 3 deletions mkspecs/features/toolchain.prf
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) {
}
}
}
isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \
isEmpty(QMAKE_DEFAULT_INCDIRS): \
!integrity: \
error("failed to parse default search paths from compiler output")
error("failed to parse default include paths from compiler output")
isEmpty(QMAKE_DEFAULT_LIBDIRS): \
!integrity:!darwin: \
error("failed to parse default library paths from compiler output")
QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
} else: ghs {
cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp
Expand Down Expand Up @@ -411,7 +414,7 @@ isEmpty($${target_prefix}.INCDIRS) {
QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
}

unix:if(!cross_compile|host_build) {
unix:!darwin:if(!cross_compile|host_build) {
isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
}
Expand Down
15 changes: 10 additions & 5 deletions qmake/propertyprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@

#include <iostream>

#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonValue>

QT_BEGIN_NAMESPACE

void qmakePropertyPrinter(const QList<QPair<QString, QString>> &values)
Expand All @@ -58,11 +62,12 @@ void qmakePropertyPrinter(const QList<QPair<QString, QString>> &values)

void jsonPropertyPrinter(const QList<QPair<QString, QString>> &values)
{
std::cout << "{\n";
for (const auto &val : values) {
std::cout << "\"" << qPrintable(val.first) << "\":\"" << qPrintable(val.second) << "\",\n";
}
std::cout << "}\n";
QJsonObject object;
for (const auto &val : values)
object.insert(val.first, val.second);

QJsonDocument document(object);
std::cout << document.toJson().constData();
}

QT_END_NAMESPACE
5 changes: 5 additions & 0 deletions src/3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if(QT_FEATURE_gui AND QT_FEATURE_png AND NOT QT_FEATURE_system_png)
endif()
qt_install_3rdparty_library_wrap_config_extra_file(BundledLibpng)

if(QT_FEATURE_gui AND QT_FEATURE_jpeg AND NOT QT_FEATURE_system_jpeg)
add_subdirectory(libjpeg)
endif()
qt_install_3rdparty_library_wrap_config_extra_file(BundledLibjpeg)

if(QT_FEATURE_gui AND QT_FEATURE_freetype AND NOT QT_FEATURE_system_freetype)
add_subdirectory(freetype)
endif()
Expand Down
13 changes: 7 additions & 6 deletions src/3rdparty/double-conversion/double-conversion/bignum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ void Bignum::AssignHexString(Vector<const char> value) {
}
}
if (tmp > 0) {
RawBigit(used_bigits_++) = tmp;
DOUBLE_CONVERSION_ASSERT(tmp <= kBigitMask);
RawBigit(used_bigits_++) = static_cast<Bignum::Chunk>(tmp & kBigitMask);
}
Clamp();
}
Expand Down Expand Up @@ -203,7 +204,7 @@ void Bignum::AddBignum(const Bignum& other) {
carry = sum >> kBigitSize;
++bigit_pos;
}
used_bigits_ = (std::max)(bigit_pos, static_cast<int>(used_bigits_));
used_bigits_ = static_cast<int16_t>(std::max(bigit_pos, static_cast<int>(used_bigits_)));
DOUBLE_CONVERSION_ASSERT(IsClamped());
}

Expand Down Expand Up @@ -239,7 +240,7 @@ void Bignum::ShiftLeft(const int shift_amount) {
if (used_bigits_ == 0) {
return;
}
exponent_ += (shift_amount / kBigitSize);
exponent_ += static_cast<int16_t>(shift_amount / kBigitSize);
const int local_shift = shift_amount % kBigitSize;
EnsureCapacity(used_bigits_ + 1);
BigitsShiftLeft(local_shift);
Expand Down Expand Up @@ -417,7 +418,7 @@ void Bignum::Square() {
DOUBLE_CONVERSION_ASSERT(accumulator == 0);

// Don't forget to update the used_digits and the exponent.
used_bigits_ = product_length;
used_bigits_ = static_cast<int16_t>(product_length);
exponent_ *= 2;
Clamp();
}
Expand Down Expand Up @@ -738,8 +739,8 @@ void Bignum::Align(const Bignum& other) {
for (int i = 0; i < zero_bigits; ++i) {
RawBigit(i) = 0;
}
used_bigits_ += zero_bigits;
exponent_ -= zero_bigits;
used_bigits_ += static_cast<int16_t>(zero_bigits);
exponent_ -= static_cast<int16_t>(zero_bigits);

DOUBLE_CONVERSION_ASSERT(used_bigits_ >= 0);
DOUBLE_CONVERSION_ASSERT(exponent_ >= 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ void DoubleToStringConverter::CreateExponentialRepresentation(
StringBuilder* result_builder) const {
DOUBLE_CONVERSION_ASSERT(length != 0);
result_builder->AddCharacter(decimal_digits[0]);
if (length != 1) {
if (length == 1) {
if ((flags_ & EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL) != 0) {
result_builder->AddCharacter('.');
if ((flags_ & EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL) != 0) {
result_builder->AddCharacter('0');
}
}
} else {
result_builder->AddCharacter('.');
result_builder->AddSubstring(&decimal_digits[1], length-1);
}
Expand Down
Loading

0 comments on commit 017d80e

Please sign in to comment.