[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1059592: qhelpgenerator-qt5: emits .qch file attribute entries with unpredictable ordering



Followup-For: Bug #1059592
Description: helpgenerator: populate FileAttributeSetTable in sorted attribute ID order.
Author: James Addison <jay@jp-hosting.net>
Bug-Debian: https://bugs.debian.org/1059592

--- qttools-opensource-src-5.15.10.orig/src/assistant/qhelpgenerator/helpgenerator.cpp
+++ qttools-opensource-src-5.15.10/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> sortedAtts = filterAtts.values();
+    std::sort(sortedAtts.begin(), sortedAtts.end());
+    for (int attId : qAsConst(sortedAtts)) {
         m_query->prepare(QLatin1String("INSERT INTO FileAttributeSetTable "
             "VALUES(?, ?)"));
         m_query->bindValue(0, filterSetId);

Reply to: