File: qhelpgenerator_fileattrset_order.diff

package info (click to toggle)
qttools-opensource-src 5.15.17-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 58,636 kB
  • sloc: cpp: 204,308; xml: 3,621; ansic: 265; javascript: 120; perl: 118; makefile: 64; java: 32
file content (17 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: ensure FileAttributeSetTable is filled ordered so we get the same qch file each time
Origin: upstream, https://code.qt.io/cgit/qt/qttools.git/commit/?id=45dc9fa0221a3aad
Last-Update: 2024-01-13

--- a/src/assistant/qhelpgenerator/helpgenerator.cpp
+++ b/src/assistant/qhelpgenerator/helpgenerator.cpp
@@ -445,7 +445,9 @@ bool HelpGeneratorPrivate::insertFiles(c
     if (filterSetId < 0)
         return false;
     ++filterSetId;
-    for (int attId : qAsConst(filterAtts)) {
+    QList<int> 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);