summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2010-10-12 12:25:24 (GMT)
committerkh1 <qt-info@nokia.com>2010-10-12 12:25:24 (GMT)
commit601fc892705c3aeb751f8bec9924200822f1a85d (patch)
treed042e3afc5dd714c4720a13f5710550ed9ccf5bb /tools
parent52873c02d06492f38f5aad9784e4b11656cc9521 (diff)
downloadQt-601fc892705c3aeb751f8bec9924200822f1a85d.zip
Qt-601fc892705c3aeb751f8bec9924200822f1a85d.tar.gz
Qt-601fc892705c3aeb751f8bec9924200822f1a85d.tar.bz2
Assistant: Insert all keywords with empty ids, as ids are not mendatory.
Task-number: QTBUG-14393 Reviewed-by: ck
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 85bdd75..f94031b 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -712,14 +712,15 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> &keywords,
d->query->exec(QLatin1String("BEGIN"));
QSet<QString> indices;
foreach (const QHelpDataIndexItem &itm, keywords) {
-
- /*
- * Identical ids make no sense and just confuse the Assistant user,
- * so we ignore all repetitions.
- */
+ // Identical ids make no sense and just confuse the Assistant user,
+ // so we ignore all repetitions.
if (indices.contains(itm.identifier))
continue;
- indices.insert(itm.identifier);
+
+ // Still empty ids should be ignored, as otherwise we will include only
+ // the first keyword with an empty id.
+ if (!itm.identifier.isEmpty())
+ indices.insert(itm.identifier);
pos = itm.reference.indexOf(QLatin1Char('#'));
fileName = itm.reference.left(pos);