From 7d65f791733d9290849995217a169e898a390bb3 Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Fri, 31 Dec 2021 15:31:37 +0200 Subject: Bump version --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 560f538fb..3283eb34f 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) DEFINES += QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.15.8 +MODULE_VERSION = 5.15.9 -- cgit v1.2.1 From 2a46b6d4eff743d11cba991a381736a9a159e786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Wed, 5 Jan 2022 12:01:13 +0100 Subject: Bump copyright year to 2022 Change-Id: I1b3f0d1b84f507e45728a00fa652d0db936cebca Reviewed-by: Friedemann Kleint (cherry picked from commit bd8827cd95552372a5aca78a21210a46bddadc36) Reviewed-by: Qt Cherry-pick Bot --- src/assistant/assistant/mainwindow.cpp | 2 +- src/designer/src/designer/versiondialog.cpp | 2 +- src/linguist/linguist/mainwindow.cpp | 2 +- src/qdbus/qdbusviewer/mainwindow.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp index 435781061..503fabd17 100644 --- a/src/assistant/assistant/mainwindow.cpp +++ b/src/assistant/assistant/mainwindow.cpp @@ -912,7 +912,7 @@ void MainWindow::showAboutDialog() "

Version %2

" "

Browser: %3

" "

Copyright (C) %4 The Qt Company Ltd.

") - .arg(tr("Qt Assistant"), QLatin1String(QT_VERSION_STR), browser, QStringLiteral("2021")), + .arg(tr("Qt Assistant"), QLatin1String(QT_VERSION_STR), browser, QStringLiteral("2022")), resources); QLatin1String path(":/qt-project.org/assistant/images/assistant-128.png"); aboutDia.setPixmap(QString(path)); diff --git a/src/designer/src/designer/versiondialog.cpp b/src/designer/src/designer/versiondialog.cpp index 68cacac43..d609fd82e 100644 --- a/src/designer/src/designer/versiondialog.cpp +++ b/src/designer/src/designer/versiondialog.cpp @@ -160,7 +160,7 @@ VersionDialog::VersionDialog(QWidget *parent) lbl->setText(tr("%1" "
Copyright (C) %2 The Qt Company Ltd." - ).arg(version, QStringLiteral("2021"))); + ).arg(version, QStringLiteral("2022"))); lbl->setWordWrap(true); lbl->setOpenExternalLinks(true); diff --git a/src/linguist/linguist/mainwindow.cpp b/src/linguist/linguist/mainwindow.cpp index 7b3791947..eff87ab12 100644 --- a/src/linguist/linguist/mainwindow.cpp +++ b/src/linguist/linguist/mainwindow.cpp @@ -1363,7 +1363,7 @@ void MainWindow::about() const QString description = tr("Qt Linguist is a tool for adding translations to Qt applications."); const QString copyright - = tr("Copyright (C) %1 The Qt Company Ltd.").arg(QStringLiteral("2021")); + = tr("Copyright (C) %1 The Qt Company Ltd.").arg(QStringLiteral("2022")); box.setText(QStringLiteral("

%1

" "

%2

" "

%3

").arg(version, description, copyright)); diff --git a/src/qdbus/qdbusviewer/mainwindow.cpp b/src/qdbus/qdbusviewer/mainwindow.cpp index 3e032c9ce..d521050c3 100644 --- a/src/qdbus/qdbusviewer/mainwindow.cpp +++ b/src/qdbus/qdbusviewer/mainwindow.cpp @@ -90,7 +90,7 @@ void MainWindow::about() "

%1

" "

Version %2

" "

Copyright (C) %3 The Qt Company Ltd.

") - .arg(tr("D-Bus Viewer"), QLatin1String(QT_VERSION_STR), QStringLiteral("2021"))); + .arg(tr("D-Bus Viewer"), QLatin1String(QT_VERSION_STR), QStringLiteral("2022"))); box.setWindowTitle(tr("D-Bus Viewer")); box.exec(); } -- cgit v1.2.1 From 6a05c1ac8b73bc009da6cef62eb1ff180811f5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Tue, 4 Jan 2022 14:52:03 +0100 Subject: designer: Fix MSVC warning about returning address of local variable or temporary std::reverse_iterator::operator*() returns by reference while QKeyValueIterator::operator*() returns by value, so MSVC is correct when it warns about returning the address of a local variable or temporary in (*itStop).second: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\xutility(1582) : error C2220: the following warning is treated as an error C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\xutility(1582) : warning C4172: returning address of local variable or temporary Avoid this by just iterating backwards. Amends 6ed8a22dd2756557954dc85052870c0894de06ba. Change-Id: I01ce7cb151efa61e8702686b3a463790869df72c Reviewed-by: Marc Mutz Reviewed-by: Giuseppe D'Angelo (cherry picked from commit a9084297f629423c64d571d7f7286d3c0e239247) Reviewed-by: Qt Cherry-pick Bot --- src/shared/qtgradienteditor/qtgradientstopsmodel.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp b/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp index cd587793e..c064eeff4 100644 --- a/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp +++ b/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp @@ -418,17 +418,12 @@ void QtGradientStopsModel::clearSelection() selectStop(stop, false); } -namespace { - template - std::reverse_iterator rev(BidirectionalIterator it) - { return std::reverse_iterator(it); } -} - void QtGradientStopsModel::flipAll() { QMap stopsMap = stops(); QMap swappedList; - for (auto itStop = rev(stopsMap.keyValueEnd()), end = rev(stopsMap.keyValueBegin()); itStop != end; ++itStop) { + for (auto itStop = stopsMap.keyValueEnd(), begin = stopsMap.keyValueBegin(); itStop != begin;) { + --itStop; QtGradientStop *stop = (*itStop).second; if (swappedList.contains(stop)) continue; -- cgit v1.2.1 From b1eb97e3658fd153bd3742039b7fb62fa74aafba Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 6 Jan 2022 13:12:24 +0100 Subject: lupdate: Support numeric literal separators Numeric literals that use apostrophes were introduced in C++14 so this adds support for cases like: int d = 10'000'00; int x = 0xAF'FE; This patch allows just any number and combination of apostrophes in numeric literals and doesn't attempt to detect ill-formed literals. We assume, lupdate runs on code that has been accepted by a C++ compiler. Task-number: QTBUG-53326 Change-Id: I23bd9b4c676694dc69199e4a17a612a011449e61 Reviewed-by: Oswald Buddenhagen Reviewed-by: Kai Koehne (cherry picked from commit c2d1163004078b98abc86318f45a6796aef18811) Reviewed-by: Qt Cherry-pick Bot --- src/linguist/lupdate/cpp.cpp | 4 ++-- tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp index 07ffd49ae..068273cda 100644 --- a/src/linguist/lupdate/cpp.cpp +++ b/src/linguist/lupdate/cpp.cpp @@ -887,7 +887,7 @@ CppParser::TokenType CppParser::getToken() if (yyCh == 'x') { do { yyCh = getChar(); - } while ((yyCh >= '0' && yyCh <= '9') + } while ((yyCh >= '0' && yyCh <= '9') || yyCh == '\'' || (yyCh >= 'a' && yyCh <= 'f') || (yyCh >= 'A' && yyCh <= 'F')); return Tok_Integer; } @@ -905,7 +905,7 @@ CppParser::TokenType CppParser::getToken() case '9': do { yyCh = getChar(); - } while (yyCh >= '0' && yyCh <= '9'); + } while ((yyCh >= '0' && yyCh <= '9') || yyCh == '\''); return Tok_Integer; default: yyCh = getChar(); diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp index dec5232fc..9e0136258 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp @@ -139,3 +139,10 @@ const QString nodelimiter(QObject::tr(R"( const Qstring withdelimiter = QObject::tr(R"delim( This is a test string )delim"); + + +// New in C++14: integer literals may contain single quotes as separator. +struct IntLiteralsWithSeparators { + long d = 10'000'000'0'00; + int x = 0x1'AF'FE; +}; -- cgit v1.2.1 From a100f74851afc596b828c67f9eb402d95081e907 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 16 Feb 2022 10:19:33 +0100 Subject: CMake: Fix qt_create_translation to not remove .ts files on "clean" When running "make clean", .ts files were deleted. This must not happen, because .ts files are source files. Remove the .ts file from the OUTPUT of the custom command that updates the .ts file. Add a timestamp file instead that is touched upon updating the .ts file. In qt_add_translation we must depend on this timestamp file. If users call qt_add_translation, we don't depend on a timestamp file but directly on the .ts file like before. Fixes: QTBUG-96549 Change-Id: If93a6d1b47a33b29dc92fb987da2afcf8d29e895 Reviewed-by: Alexandru Croitor (cherry picked from commit 153db2fedc5935d858d3adeb283ced5e4de5babf) --- src/linguist/Qt5LinguistToolsMacros.cmake | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake index ab1534144..6a45e57be 100644 --- a/src/linguist/Qt5LinguistToolsMacros.cmake +++ b/src/linguist/Qt5LinguistToolsMacros.cmake @@ -1,4 +1,5 @@ #============================================================================= +# Copyright (C) 2022 The Qt Company Ltd. # Copyright 2005-2011 Kitware, Inc. # All rights reserved. # @@ -63,11 +64,15 @@ function(QT5_CREATE_TRANSLATION _qm_files) list(APPEND _my_sources ${_abs_FILE}) endif() endforeach() + set(stamp_file_dir "${CMAKE_CURRENT_BINARY_DIR}/.lupdate") + if(NOT EXISTS "${stamp_file_dir}") + file(MAKE_DIRECTORY "${stamp_file_dir}") + endif() foreach(_ts_file ${_my_tsfiles}) + get_filename_component(_ts_name ${_ts_file} NAME) if(_my_sources) # make a list file to call lupdate on, so we don't make our commands too # long for some systems - get_filename_component(_ts_name ${_ts_file} NAME) set(_ts_lst_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lst_file") set(_lst_file_srcs) set(_dependencies) @@ -90,13 +95,15 @@ function(QT5_CREATE_TRANSLATION _qm_files) file(WRITE ${_ts_lst_file} "${_lst_file_srcs}") endif() - add_custom_command(OUTPUT ${_ts_file} + set(stamp_file "${stamp_file_dir}/${_ts_name}.stamp") + add_custom_command(OUTPUT ${stamp_file} COMMAND ${Qt5_LUPDATE_EXECUTABLE} ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file} + COMMAND ${CMAKE_COMMAND} -E touch "${stamp_file}" DEPENDS ${_dependencies} VERBATIM) endforeach() - qt5_add_translation(${_qm_files} ${_my_tsfiles}) + qt5_add_translation(${_qm_files} __QT_INTERNAL_DEPEND_ON_TIMESTAMP_FILE ${_my_tsfiles}) set(${_qm_files} ${${_qm_files}} PARENT_SCOPE) endfunction() @@ -113,7 +120,7 @@ endif() function(QT5_ADD_TRANSLATION _qm_files) - set(options) + set(options __QT_INTERNAL_DEPEND_ON_TIMESTAMP_FILE) set(oneValueArgs) set(multiValueArgs OPTIONS) @@ -123,6 +130,7 @@ function(QT5_ADD_TRANSLATION _qm_files) foreach(_current_FILE ${_lrelease_files}) get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) get_filename_component(qm ${_abs_FILE} NAME) + set(ts_stamp_file "${CMAKE_CURRENT_BINARY_DIR}/.lupdate/${qm}.stamp") # everything before the last dot has to be considered the file name (including other dots) string(REGEX REPLACE "\\.[^.]*$" "" FILE_NAME ${qm}) get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION) @@ -133,10 +141,16 @@ function(QT5_ADD_TRANSLATION _qm_files) set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm") endif() + if(_LRELEASE___QT_INTERNAL_DEPEND_ON_TIMESTAMP_FILE) + set(qm_dep "${ts_stamp_file}") + else() + set(qm_dep "${_abs_FILE}") + endif() + add_custom_command(OUTPUT ${qm} COMMAND ${Qt5_LRELEASE_EXECUTABLE} ARGS ${_LRELEASE_OPTIONS} ${_abs_FILE} -qm ${qm} - DEPENDS ${_abs_FILE} VERBATIM + DEPENDS ${qm_dep} VERBATIM ) list(APPEND ${_qm_files} ${qm}) endforeach() -- cgit v1.2.1 From fed9bcfc97ade6366c8f5a4559607daf18befb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 24 Feb 2022 19:56:22 +0100 Subject: Don't run qdoc tests if qdoc was not enabled during configure Change-Id: I2dd4998811769cc8df3b190cc411390e5a2557d6 Reviewed-by: Volker Hilsheimer --- tests/auto/qdoc/qdoc.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qdoc/qdoc.pro b/tests/auto/qdoc/qdoc.pro index c7af516ae..481e59d1d 100644 --- a/tests/auto/qdoc/qdoc.pro +++ b/tests/auto/qdoc/qdoc.pro @@ -1,5 +1,9 @@ TEMPLATE = subdirs +include($$OUT_PWD/../../../src/qdoc/qtqdoc-config.pri) +QT_FOR_CONFIG += qdoc-private +requires(qtConfig(qdoc)) + SUBDIRS = \ config \ generatedoutput \ -- cgit v1.2.1 From 53e0ac017ade09238ab72664086baec6282beec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 14 Mar 2022 16:20:10 +0100 Subject: =?UTF-8?q?macdeployqt:=20don=E2=80=99t=20err=20on=20unexpected=20?= =?UTF-8?q?otool=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Binaries with multiple slices (e.g. arm64, x86_64) will have an extra line for the slice, like: “/path/to/QtGui.framework/QtGui (architecture arm64)” The parsing code will skip this line since it does not match the regexp. In other words the parsing works by looking for lines which matches, and finding lines which don’t match is not an error condition. Task-number: QTBUG-98466 Reviewed-by: Timur Pocheptsov (cherry-picked from commit 4184a127fa08c3ffafad863f6dde5d4bdc349bf1) Change-Id: Ifc2a37f867b724b9773c578fc2ad018959842482 Reviewed-by: Morten Johan Sørvig --- src/macdeployqt/shared/shared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index 52597209d..85653cee7 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -200,7 +200,7 @@ OtoolInfo findDependencyInfo(const QString &binaryPath) info.compatibilityVersion = QVersionNumber::fromString(match.captured(2)); info.currentVersion = QVersionNumber::fromString(match.captured(3)); } else { - LogError() << "Could not parse otool output line:" << outputLines.first(); + LogDebug() << "Could not parse otool output line:" << outputLines.first(); } outputLines.removeFirst(); } @@ -214,7 +214,7 @@ OtoolInfo findDependencyInfo(const QString &binaryPath) dylib.currentVersion = QVersionNumber::fromString(match.captured(3)); info.dependencies << dylib; } else { - LogError() << "Could not parse otool output line:" << outputLine; + LogDebug() << "Could not parse otool output line:" << outputLine; } } -- cgit v1.2.1 From 55fe27c4455eb54830bb08f19e34d8f2f137ad2f Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 15 Oct 2021 16:33:41 +0200 Subject: qdoc: Fix assert on empty link target Fixes: QTBUG-97562 Change-Id: I9e2b2b3979f9c0ca22f23a1a5fef5296b2a34a00 Done-with: Luca Di Sera Reviewed-by: Kai Koehne --- src/qdoc/xmlgenerator.cpp | 4 ++++ tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf | 4 ++-- .../outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/qdoc/xmlgenerator.cpp b/src/qdoc/xmlgenerator.cpp index 647904af5..f5c0809f3 100644 --- a/src/qdoc/xmlgenerator.cpp +++ b/src/qdoc/xmlgenerator.cpp @@ -378,6 +378,10 @@ QString XmlGenerator::linkForNode(const Node *node, const Node *relative) QString XmlGenerator::getLink(const Atom *atom, const Node *relative, const Node **node) { const QString &t = atom->string(); + + if (t.isEmpty()) + return t; + if (t.at(0) == QChar('h')) { if (t.startsWith("http:") || t.startsWith("https:")) return t; diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf index e4cef822e..3844c2acf 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf +++ b/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf @@ -7,6 +7,6 @@ sources = ../outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc macro.beginqdoc = "\\c {/*!}" macro.endqdoc = "\\c */" -# zero warning tolerance -warninglimit = 0 +# allow (qdoc) warning: Can't link to '' +warninglimit = 1 warninglimit.enabled = true diff --git a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc index e56c447c4..b0f4f16d6 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc +++ b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc @@ -81,3 +81,10 @@ titles, targets defined with \\target or \\keyword commands, and API reference keywords (types, methods, namespaces, and so on). */ + +// Empty link target that was known to assert +/*! + \page crash.html + + \l {} +*/ -- cgit v1.2.1