diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 16:00:31 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 16:00:31 +0200 |
commit | 1e7d50937f4b94c37a16f6370c0fd4ccb4329190 (patch) | |
tree | 94b5752f1ae4372db08848e3020295c1de567686 /src | |
parent | 6914f7c8039e5d9aab9446a6d0d882caf9f61025 (diff) | |
parent | 55fe27c4455eb54830bb08f19e34d8f2f137ad2f (diff) | |
download | qttools-1e7d50937f4b94c37a16f6370c0fd4ccb4329190.tar.gz |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into tqtc/lts-5.15-opensourcev5.15.9-lts-lgpl5.15
Change-Id: I2813471aad9bc8b9bd04efe8571be6d1bee3045c
Diffstat (limited to 'src')
-rw-r--r-- | src/assistant/assistant/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/designer/src/designer/versiondialog.cpp | 2 | ||||
-rw-r--r-- | src/linguist/Qt5LinguistToolsMacros.cmake | 24 | ||||
-rw-r--r-- | src/linguist/linguist/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/linguist/lupdate/cpp.cpp | 4 | ||||
-rw-r--r-- | src/macdeployqt/shared/shared.cpp | 4 | ||||
-rw-r--r-- | src/qdbus/qdbusviewer/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/qdoc/xmlgenerator.cpp | 4 | ||||
-rw-r--r-- | src/shared/qtgradienteditor/qtgradientstopsmodel.cpp | 9 |
9 files changed, 33 insertions, 20 deletions
diff --git a/src/assistant/assistant/mainwindow.cpp b/src/assistant/assistant/mainwindow.cpp index b09dfc1b5..5bb218b0e 100644 --- a/src/assistant/assistant/mainwindow.cpp +++ b/src/assistant/assistant/mainwindow.cpp @@ -912,7 +912,7 @@ void MainWindow::showAboutDialog() "<p>Version %2</p>" "<p>Browser: %3</p></center>" "<p>Copyright (C) %4 The Qt Company Ltd.</p>") - .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 80bc2b6d2..215f6979d 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" "<br/>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/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() diff --git a/src/linguist/linguist/mainwindow.cpp b/src/linguist/linguist/mainwindow.cpp index 52b8044f6..ec6631f47 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("<center><img src=\":/images/icons/linguist-128-32.png\"/></img><p>%1</p></center>" "<p>%2</p>" "<p>%3</p>").arg(version, description, copyright)); diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp index 9fe4ed710..175b1816d 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/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index a29b3be6e..5e0c123de 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; } } diff --git a/src/qdbus/qdbusviewer/mainwindow.cpp b/src/qdbus/qdbusviewer/mainwindow.cpp index 949663616..35d06e5eb 100644 --- a/src/qdbus/qdbusviewer/mainwindow.cpp +++ b/src/qdbus/qdbusviewer/mainwindow.cpp @@ -90,7 +90,7 @@ void MainWindow::about() "<h3>%1</h3>" "<p>Version %2</p></center>" "<p>Copyright (C) %3 The Qt Company Ltd.</p>") - .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(); } diff --git a/src/qdoc/xmlgenerator.cpp b/src/qdoc/xmlgenerator.cpp index ffffc283a..734b171a3 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/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp b/src/shared/qtgradienteditor/qtgradientstopsmodel.cpp index 0afbf49bb..2422926c4 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 <typename BidirectionalIterator> - std::reverse_iterator<BidirectionalIterator> rev(BidirectionalIterator it) - { return std::reverse_iterator<BidirectionalIterator>(it); } -} - void QtGradientStopsModel::flipAll() { QMap<qreal, QtGradientStop *> stopsMap = stops(); QMap<QtGradientStop *, bool> 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; |