From 0dabe2dd2492553c33eb62f94712e668c3ec2d8c Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 16 Jun 2022 09:52:54 +0200 Subject: [PATCH 1/3] Ensure FileAttributeSetTable is filled ordered so we get the same qch file each time This is part of making all of Qt reproducible Change-Id: I1a4120cab6844887fb4b48edb238b8f1b55f0eb9 Reviewed-by: Kai Koehne Reviewed-by: Friedemann Kleint (cherry picked from commit 45dc9fa0221a3aadc9925eead484f012a62a6a58) --- src/assistant/qhelpgenerator/helpgenerator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/assistant/qhelpgenerator/helpgenerator.cpp b/src/assistant/qhelpgenerator/helpgenerator.cpp index feab1e2d5..cbfb82507 100644 --- a/src/assistant/qhelpgenerator/helpgenerator.cpp +++ b/src/assistant/qhelpgenerator/helpgenerator.cpp @@ -445,7 +445,9 @@ bool HelpGeneratorPrivate::insertFiles(const QStringList &files, const QString & if (filterSetId < 0) return false; ++filterSetId; - for (int attId : qAsConst(filterAtts)) { + QList attValues = filterAtts.values(); + std::sort(attValues.begin(), attValues.end()); + for (int attId : qAsConst(attValues)) { m_query->prepare(QLatin1String("INSERT INTO FileAttributeSetTable " "VALUES(?, ?)")); m_query->bindValue(0, filterSetId); -- 2.49.0 From 3512c3ac72abce0c44fdfe1657a8e32a8603efe7 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Fri, 18 Mar 2022 12:43:18 +0100 Subject: [PATCH 2/3] Drop superfluous network dependency from assistant/{help,qhelpgenerator}.pro Upstream's cmake equivalent commit is a9804f1a6496eccb79fb006fe4c9247eee1c4cec See also: https://codereview.qt-project.org/gitweb?p=qt%2Fqttools.git;a=commit;h=a9804f1a6496eccb79fb006fe4c9247eee1c4cec Signed-off-by: Andreas Sturmlechner --- src/assistant/help/help.pro | 1 - src/assistant/qhelpgenerator/qhelpgenerator.pro | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/assistant/help/help.pro b/src/assistant/help/help.pro index 800c4a38d..7556f451b 100644 --- a/src/assistant/help/help.pro +++ b/src/assistant/help/help.pro @@ -1,7 +1,6 @@ TARGET = QtHelp QT = core-private gui widgets sql -QT_PRIVATE = network DEFINES += QHELP_LIB diff --git a/src/assistant/qhelpgenerator/qhelpgenerator.pro b/src/assistant/qhelpgenerator/qhelpgenerator.pro index bb22000c8..415347a00 100644 --- a/src/assistant/qhelpgenerator/qhelpgenerator.pro +++ b/src/assistant/qhelpgenerator/qhelpgenerator.pro @@ -1,4 +1,4 @@ -QT += network help-private +QT += help-private QTPLUGIN.platforms = qminimal QTPLUGIN.sqldrivers = qsqlite -- 2.49.0 From e02ce0dfa692913bd5dcc50917f7e21f5a41cd2b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 16 Jan 2023 09:31:24 +0000 Subject: [PATCH 3/3] qdoc: Ensure the generated temporary header file is closed properly Use the correct scope for the QFile object used for writing the temporary header file; this ensures that the associated QTextStream object is destroyed first and its contents flushed before destroying the QFile, potentially leading to truncated writes to the file. Pick-to: 6.5 6.4 6.2 5.15 Done-with: Simon Geisseler Fixes: QTBUG-109614 Change-Id: Ic6a68c0b52219ce607a5116c730862ee0cb37f04 Reviewed-by: Luca Di Sera (cherry picked from commit 0d8837c4103f941297adc3c76cb0ae6f67b6e34b) --- src/qdoc/clangcodeparser.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 539a603da..a41b99cec 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1395,8 +1395,7 @@ void ClangCodeParser::buildPCH() args_.push_back("-xc++"); CXTranslationUnit tu; QString tmpHeader = pchFileDir_->path() + "/" + module; - QFile tmpHeaderFile(tmpHeader); - if (tmpHeaderFile.open(QIODevice::Text | QIODevice::WriteOnly)) { + { QFile tmpHeaderFile(tmpHeader); if (tmpHeaderFile.open(QIODevice::Text | QIODevice::WriteOnly)) { QTextStream out(&tmpHeaderFile); if (header.isEmpty()) { for (auto it = allHeaders_.constKeyValueBegin(); @@ -1421,8 +1420,7 @@ void ClangCodeParser::buildPCH() out << line << "\n"; } } - tmpHeaderFile.close(); - } + } } if (printParsingErrors_ == 0) qCWarning(lcQdoc) << "clang not printing errors; include paths were guessed"; CXErrorCode err = -- 2.49.0