summaryrefslogtreecommitdiff
path: root/src/assistant/help
diff options
context:
space:
mode:
Diffstat (limited to 'src/assistant/help')
-rw-r--r--src/assistant/help/doc/qthelp.qdocconf12
-rw-r--r--src/assistant/help/doc/snippets/doc_src_qthelp.cpp2
-rw-r--r--src/assistant/help/doc/snippets/doc_src_qthelp.qdoc2
-rw-r--r--src/assistant/help/doc/src/qthelp-examples.qdoc2
-rw-r--r--src/assistant/help/doc/src/qthelp-index.qdoc4
-rw-r--r--src/assistant/help/doc/src/qthelp-module.qdoc2
-rw-r--r--src/assistant/help/doc/src/qthelp.qdoc24
-rw-r--r--src/assistant/help/qclucenefieldnames.cpp2
-rw-r--r--src/assistant/help/qclucenefieldnames_p.h2
-rw-r--r--src/assistant/help/qhelp_global.cpp2
-rw-r--r--src/assistant/help/qhelp_global.h2
-rw-r--r--src/assistant/help/qhelpcollectionhandler.cpp2
-rw-r--r--src/assistant/help/qhelpcollectionhandler_p.h2
-rw-r--r--src/assistant/help/qhelpcontentwidget.cpp25
-rw-r--r--src/assistant/help/qhelpcontentwidget.h2
-rw-r--r--src/assistant/help/qhelpdatainterface.cpp2
-rw-r--r--src/assistant/help/qhelpdatainterface_p.h2
-rw-r--r--src/assistant/help/qhelpdbreader.cpp2
-rw-r--r--src/assistant/help/qhelpdbreader_p.h2
-rw-r--r--src/assistant/help/qhelpengine.cpp2
-rw-r--r--src/assistant/help/qhelpengine.h2
-rw-r--r--src/assistant/help/qhelpengine_p.h3
-rw-r--r--src/assistant/help/qhelpenginecore.cpp4
-rw-r--r--src/assistant/help/qhelpenginecore.h2
-rw-r--r--src/assistant/help/qhelpgenerator.cpp2
-rw-r--r--src/assistant/help/qhelpgenerator_p.h2
-rw-r--r--src/assistant/help/qhelpindexwidget.cpp2
-rw-r--r--src/assistant/help/qhelpindexwidget.h2
-rw-r--r--src/assistant/help/qhelpprojectdata.cpp2
-rw-r--r--src/assistant/help/qhelpprojectdata_p.h2
-rw-r--r--src/assistant/help/qhelpsearchengine.cpp2
-rw-r--r--src/assistant/help/qhelpsearchengine.h2
-rw-r--r--src/assistant/help/qhelpsearchindex_default.cpp2
-rw-r--r--src/assistant/help/qhelpsearchindex_default_p.h2
-rw-r--r--src/assistant/help/qhelpsearchindexreader.cpp2
-rw-r--r--src/assistant/help/qhelpsearchindexreader_clucene.cpp4
-rw-r--r--src/assistant/help/qhelpsearchindexreader_clucene_p.h2
-rw-r--r--src/assistant/help/qhelpsearchindexreader_default.cpp2
-rw-r--r--src/assistant/help/qhelpsearchindexreader_default_p.h2
-rw-r--r--src/assistant/help/qhelpsearchindexreader_p.h2
-rw-r--r--src/assistant/help/qhelpsearchindexwriter_clucene.cpp2
-rw-r--r--src/assistant/help/qhelpsearchindexwriter_clucene_p.h2
-rw-r--r--src/assistant/help/qhelpsearchindexwriter_default.cpp2
-rw-r--r--src/assistant/help/qhelpsearchindexwriter_default_p.h2
-rw-r--r--src/assistant/help/qhelpsearchquerywidget.cpp39
-rw-r--r--src/assistant/help/qhelpsearchquerywidget.h2
-rw-r--r--src/assistant/help/qhelpsearchresultwidget.cpp2
-rw-r--r--src/assistant/help/qhelpsearchresultwidget.h2
48 files changed, 109 insertions, 86 deletions
diff --git a/src/assistant/help/doc/qthelp.qdocconf b/src/assistant/help/doc/qthelp.qdocconf
index b2072adc6..a047d8576 100644
--- a/src/assistant/help/doc/qthelp.qdocconf
+++ b/src/assistant/help/doc/qthelp.qdocconf
@@ -2,22 +2,22 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtHelp
description = Qt Help Reference Documentation
-url = http://qt-project.org/doc/qthelp
-version = 5.0.1
+url = http://qt-project.org/doc/qt-$QT_VER/qthelp
+version = $QT_VERSION
examplesinstallpath = help
qhp.projects = QtHelp
qhp.QtHelp.file = qthelp.qhp
-qhp.QtHelp.namespace = org.qt-project.qthelp.501
+qhp.QtHelp.namespace = org.qt-project.qthelp.$QT_VERSION_TAG
qhp.QtHelp.virtualFolder = qthelp
qhp.QtHelp.indexTitle = Qt Help
qhp.QtHelp.indexRoot =
-qhp.QtHelp.filterAttributes = qthelp 5.0.1 tools assistant qtrefdoc
-qhp.QtHelp.customFilters.QtHelp.name = QtHelp 5.0.1
-qhp.QtHelp.customFilters.QtHelp.filterAttributes = qthelp 5.0.1
+qhp.QtHelp.filterAttributes = qthelp $QT_VERSION tools assistant qtrefdoc
+qhp.QtHelp.customFilters.QtHelp.name = QtHelp $QT_VERSION
+qhp.QtHelp.customFilters.QtHelp.filterAttributes = qthelp $QT_VERSION
qhp.QtHelp.subprojects = classes
qhp.QtHelp.subprojects.classes.title = C++ Classes
qhp.QtHelp.subprojects.classes.indexTitle = Qt Help C++ Classes
diff --git a/src/assistant/help/doc/snippets/doc_src_qthelp.cpp b/src/assistant/help/doc/snippets/doc_src_qthelp.cpp
index a043e4531..4d31e4499 100644
--- a/src/assistant/help/doc/snippets/doc_src_qthelp.cpp
+++ b/src/assistant/help/doc/snippets/doc_src_qthelp.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
diff --git a/src/assistant/help/doc/snippets/doc_src_qthelp.qdoc b/src/assistant/help/doc/snippets/doc_src_qthelp.qdoc
index 539782bd8..c8f2ed960 100644
--- a/src/assistant/help/doc/snippets/doc_src_qthelp.qdoc
+++ b/src/assistant/help/doc/snippets/doc_src_qthelp.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
diff --git a/src/assistant/help/doc/src/qthelp-examples.qdoc b/src/assistant/help/doc/src/qthelp-examples.qdoc
index d6f441e3a..2f10cfc96 100644
--- a/src/assistant/help/doc/src/qthelp-examples.qdoc
+++ b/src/assistant/help/doc/src/qthelp-examples.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
diff --git a/src/assistant/help/doc/src/qthelp-index.qdoc b/src/assistant/help/doc/src/qthelp-index.qdoc
index 5143886c2..fe2b930f8 100644
--- a/src/assistant/help/doc/src/qthelp-index.qdoc
+++ b/src/assistant/help/doc/src/qthelp-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
@@ -73,7 +73,7 @@
\legalese
Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team \BR
- Changes are Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+ Changes are Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/src/assistant/help/doc/src/qthelp-module.qdoc b/src/assistant/help/doc/src/qthelp-module.qdoc
index 7cd12182e..e8fd17f9f 100644
--- a/src/assistant/help/doc/src/qthelp-module.qdoc
+++ b/src/assistant/help/doc/src/qthelp-module.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
diff --git a/src/assistant/help/doc/src/qthelp.qdoc b/src/assistant/help/doc/src/qthelp.qdoc
index 28ba9f2ed..a191b0261 100644
--- a/src/assistant/help/doc/src/qthelp.qdoc
+++ b/src/assistant/help/doc/src/qthelp.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
@@ -64,7 +64,7 @@
help into Qt applications.
The actual help data, meaning the table of contents, index
- keywords or html documents, is contained in Qt compressed help
+ keywords or HTML documents, is contained in Qt compressed help
files. So, one such a help file represents usually one manual
or documentation set. Since most products are more comprehensive
and consist of a number of tools, one manual is rarely enough.
@@ -85,7 +85,7 @@
generation of the compressed help file.
As already mentioned, the Qt compressed help file contains all
- data, so there is no need any longer to ship all single html
+ data, so there is no need any longer to ship all single HTML
files. Instead, only the compressed help file and optionally the
collection file has to be distributed. The collection file is
optional since any existing collection file, e.g. from an older
@@ -134,21 +134,23 @@
\section1 Generating Qt Help
- Building help files for the Qt help system assumes that the html
- documentation files already exist, i.e. the Qt help system does
- not offer the possibility to create html files like e.g. Doxygen.
+ Building help files for the Qt help system assumes that the HTML
+ documentation files already exist.
- Once the html documentents are in place, a \l {Qt Help Project} file
- has to be created. After specifying all relevant information in
- this file, it needs to be compiled by calling:
+ Once the HTML documents are in place, a \l {Qt Help Project} file, with
+ an extension of \c .qhp, has to be created. After specifying all relevant
+ information in this file, it needs to be compiled by calling:
- \snippet doc_src_qthelp.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 2
- The file 'doc.qch' contains then all html files in compressed
+ The file 'doc.qch' contains then all HTML files in compressed
form along with the table of contents and index keywords. To
test if the generated file is correct, open Qt Assistant and
install the file via the Settings|Documentation page.
+ For the standard Qt source build, the .qhp file is generated and placed
+ in the same directory as the HTML pages.
+
\target Qt Help Collection Project
\section2 Creating a Qt Help Collection
diff --git a/src/assistant/help/qclucenefieldnames.cpp b/src/assistant/help/qclucenefieldnames.cpp
index 798200180..3f3e80966 100644
--- a/src/assistant/help/qclucenefieldnames.cpp
+++ b/src/assistant/help/qclucenefieldnames.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qclucenefieldnames_p.h b/src/assistant/help/qclucenefieldnames_p.h
index 7298c1ca2..84640d6c2 100644
--- a/src/assistant/help/qclucenefieldnames_p.h
+++ b/src/assistant/help/qclucenefieldnames_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelp_global.cpp b/src/assistant/help/qhelp_global.cpp
index 3bee8b241..ff972633f 100644
--- a/src/assistant/help/qhelp_global.cpp
+++ b/src/assistant/help/qhelp_global.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelp_global.h b/src/assistant/help/qhelp_global.h
index 79989fee7..409d49b9d 100644
--- a/src/assistant/help/qhelp_global.h
+++ b/src/assistant/help/qhelp_global.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp
index 2e646183b..548f2b8af 100644
--- a/src/assistant/help/qhelpcollectionhandler.cpp
+++ b/src/assistant/help/qhelpcollectionhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpcollectionhandler_p.h b/src/assistant/help/qhelpcollectionhandler_p.h
index 7d9f331b2..744dfa14d 100644
--- a/src/assistant/help/qhelpcollectionhandler_p.h
+++ b/src/assistant/help/qhelpcollectionhandler_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpcontentwidget.cpp b/src/assistant/help/qhelpcontentwidget.cpp
index e25dd0366..cf3838c2b 100644
--- a/src/assistant/help/qhelpcontentwidget.cpp
+++ b/src/assistant/help/qhelpcontentwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
@@ -44,6 +44,7 @@
#include "qhelpengine_p.h"
#include "qhelpdbreader_p.h"
+#include <QDir>
#include <QtCore/QStack>
#include <QtCore/QThread>
#include <QtCore/QMutex>
@@ -530,41 +531,35 @@ QHelpContentWidget::QHelpContentWidget()
*/
QModelIndex QHelpContentWidget::indexOf(const QUrl &link)
{
- QHelpContentModel *contentModel =
- qobject_cast<QHelpContentModel*>(model());
+ QHelpContentModel *contentModel = qobject_cast<QHelpContentModel*>(model());
if (!contentModel || link.scheme() != QLatin1String("qthelp"))
return QModelIndex();
m_syncIndex = QModelIndex();
- for (int i=0; i<contentModel->rowCount(); ++i) {
- QHelpContentItem *itm =
- contentModel->contentItemAt(contentModel->index(i, 0));
+ for (int i = 0; i < contentModel->rowCount(); ++i) {
+ QHelpContentItem *itm = contentModel->contentItemAt(contentModel->index(i, 0));
if (itm && itm->url().host() == link.host()) {
- QString path = link.path();
- if (path.startsWith(QLatin1Char('/')))
- path = path.mid(1);
- if (searchContentItem(contentModel, contentModel->index(i, 0), path)) {
+ if (searchContentItem(contentModel, contentModel->index(i, 0), QDir::cleanPath(link.path())))
return m_syncIndex;
- }
}
}
return QModelIndex();
}
-bool QHelpContentWidget::searchContentItem(QHelpContentModel *model,
- const QModelIndex &parent, const QString &path)
+bool QHelpContentWidget::searchContentItem(QHelpContentModel *model, const QModelIndex &parent,
+ const QString &cleanPath)
{
QHelpContentItem *parentItem = model->contentItemAt(parent);
if (!parentItem)
return false;
- if (parentItem->url().path() == path) {
+ if (QDir::cleanPath(parentItem->url().path()) == cleanPath) {
m_syncIndex = parent;
return true;
}
for (int i=0; i<parentItem->childCount(); ++i) {
- if (searchContentItem(model, model->index(i, 0, parent), path))
+ if (searchContentItem(model, model->index(i, 0, parent), cleanPath))
return true;
}
return false;
diff --git a/src/assistant/help/qhelpcontentwidget.h b/src/assistant/help/qhelpcontentwidget.h
index e8617c223..f10cb35f2 100644
--- a/src/assistant/help/qhelpcontentwidget.h
+++ b/src/assistant/help/qhelpcontentwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpdatainterface.cpp b/src/assistant/help/qhelpdatainterface.cpp
index 140f8d0d0..fa3af6fd6 100644
--- a/src/assistant/help/qhelpdatainterface.cpp
+++ b/src/assistant/help/qhelpdatainterface.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpdatainterface_p.h b/src/assistant/help/qhelpdatainterface_p.h
index a93b9e286..3b4e3ac84 100644
--- a/src/assistant/help/qhelpdatainterface_p.h
+++ b/src/assistant/help/qhelpdatainterface_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpdbreader.cpp b/src/assistant/help/qhelpdbreader.cpp
index e4b496233..415710525 100644
--- a/src/assistant/help/qhelpdbreader.cpp
+++ b/src/assistant/help/qhelpdbreader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpdbreader_p.h b/src/assistant/help/qhelpdbreader_p.h
index 114d5ab3b..3b8014425 100644
--- a/src/assistant/help/qhelpdbreader_p.h
+++ b/src/assistant/help/qhelpdbreader_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpengine.cpp b/src/assistant/help/qhelpengine.cpp
index 0d30f5062..7e79b2d10 100644
--- a/src/assistant/help/qhelpengine.cpp
+++ b/src/assistant/help/qhelpengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpengine.h b/src/assistant/help/qhelpengine.h
index c6cf8fec8..45bdec090 100644
--- a/src/assistant/help/qhelpengine.h
+++ b/src/assistant/help/qhelpengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpengine_p.h b/src/assistant/help/qhelpengine_p.h
index a24b5173e..91a298fff 100644
--- a/src/assistant/help/qhelpengine_p.h
+++ b/src/assistant/help/qhelpengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
@@ -89,7 +89,6 @@ public:
QMap<QString, QHelpDBReader*> fileNameReaderMap;
QMultiMap<QString, QHelpDBReader*> virtualFolderMap;
QStringList orderedFileNameList;
- QHash<QString, QString> nameSpaceVirtualFolderMap;
QHelpCollectionHandler *collectionHandler;
QString currentFilter;
diff --git a/src/assistant/help/qhelpenginecore.cpp b/src/assistant/help/qhelpenginecore.cpp
index 4f05b2e6c..15ce07620 100644
--- a/src/assistant/help/qhelpenginecore.cpp
+++ b/src/assistant/help/qhelpenginecore.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
@@ -88,7 +88,6 @@ void QHelpEngineCorePrivate::clearMaps()
fileNameReaderMap.clear();
virtualFolderMap.clear();
orderedFileNameList.clear();
- nameSpaceVirtualFolderMap.clear();
}
bool QHelpEngineCorePrivate::setup()
@@ -129,7 +128,6 @@ bool QHelpEngineCorePrivate::setup()
fileNameReaderMap.insert(absFileName, reader);
virtualFolderMap.insert(info.folderName, reader);
orderedFileNameList.append(absFileName);
- nameSpaceVirtualFolderMap.insert(info.namespaceName, info.folderName);
}
q->currentFilter();
emit q->setupFinished();
diff --git a/src/assistant/help/qhelpenginecore.h b/src/assistant/help/qhelpenginecore.h
index 1123fbd4d..e17ae880c 100644
--- a/src/assistant/help/qhelpenginecore.h
+++ b/src/assistant/help/qhelpenginecore.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpgenerator.cpp b/src/assistant/help/qhelpgenerator.cpp
index 01394b1a3..ac251246a 100644
--- a/src/assistant/help/qhelpgenerator.cpp
+++ b/src/assistant/help/qhelpgenerator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpgenerator_p.h b/src/assistant/help/qhelpgenerator_p.h
index 698c4ae4a..3c447e898 100644
--- a/src/assistant/help/qhelpgenerator_p.h
+++ b/src/assistant/help/qhelpgenerator_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpindexwidget.cpp b/src/assistant/help/qhelpindexwidget.cpp
index 515b95df8..c5f26a701 100644
--- a/src/assistant/help/qhelpindexwidget.cpp
+++ b/src/assistant/help/qhelpindexwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpindexwidget.h b/src/assistant/help/qhelpindexwidget.h
index dc10e77ac..f852f44ed 100644
--- a/src/assistant/help/qhelpindexwidget.h
+++ b/src/assistant/help/qhelpindexwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpprojectdata.cpp b/src/assistant/help/qhelpprojectdata.cpp
index 7d8cdd0cf..ee86f78a5 100644
--- a/src/assistant/help/qhelpprojectdata.cpp
+++ b/src/assistant/help/qhelpprojectdata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpprojectdata_p.h b/src/assistant/help/qhelpprojectdata_p.h
index c3b6bf0f7..198bac8fc 100644
--- a/src/assistant/help/qhelpprojectdata_p.h
+++ b/src/assistant/help/qhelpprojectdata_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchengine.cpp b/src/assistant/help/qhelpsearchengine.cpp
index 823c1a5ed..acdd306b6 100644
--- a/src/assistant/help/qhelpsearchengine.cpp
+++ b/src/assistant/help/qhelpsearchengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchengine.h b/src/assistant/help/qhelpsearchengine.h
index 3c158c000..5312ff25a 100644
--- a/src/assistant/help/qhelpsearchengine.h
+++ b/src/assistant/help/qhelpsearchengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindex_default.cpp b/src/assistant/help/qhelpsearchindex_default.cpp
index f24f57fd2..ddf86d69e 100644
--- a/src/assistant/help/qhelpsearchindex_default.cpp
+++ b/src/assistant/help/qhelpsearchindex_default.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindex_default_p.h b/src/assistant/help/qhelpsearchindex_default_p.h
index 65a132093..a1d55dd03 100644
--- a/src/assistant/help/qhelpsearchindex_default_p.h
+++ b/src/assistant/help/qhelpsearchindex_default_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexreader.cpp b/src/assistant/help/qhelpsearchindexreader.cpp
index abc1f1e7d..f434ef2b1 100644
--- a/src/assistant/help/qhelpsearchindexreader.cpp
+++ b/src/assistant/help/qhelpsearchindexreader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexreader_clucene.cpp b/src/assistant/help/qhelpsearchindexreader_clucene.cpp
index 1221b38b6..4fb48176c 100644
--- a/src/assistant/help/qhelpsearchindexreader_clucene.cpp
+++ b/src/assistant/help/qhelpsearchindexreader_clucene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
@@ -269,7 +269,7 @@ bool QHelpSearchIndexReaderClucene::buildTryHarderQuery(
return false;
if (isNegativeQuery(query))
return false;
- if (!addDefaultQuery(query, fieldName, false, booleanQuery, analyzer))
+ if (!addDefaultQuery(query, fieldName, !filterAttributes.isEmpty(), booleanQuery, analyzer))
return false;
if (filterAttributes.isEmpty())
return true;
diff --git a/src/assistant/help/qhelpsearchindexreader_clucene_p.h b/src/assistant/help/qhelpsearchindexreader_clucene_p.h
index ae0d5d0fa..9ae68aad3 100644
--- a/src/assistant/help/qhelpsearchindexreader_clucene_p.h
+++ b/src/assistant/help/qhelpsearchindexreader_clucene_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexreader_default.cpp b/src/assistant/help/qhelpsearchindexreader_default.cpp
index f7298f89e..a08845663 100644
--- a/src/assistant/help/qhelpsearchindexreader_default.cpp
+++ b/src/assistant/help/qhelpsearchindexreader_default.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexreader_default_p.h b/src/assistant/help/qhelpsearchindexreader_default_p.h
index 0d48c5d10..f5099a0d0 100644
--- a/src/assistant/help/qhelpsearchindexreader_default_p.h
+++ b/src/assistant/help/qhelpsearchindexreader_default_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexreader_p.h b/src/assistant/help/qhelpsearchindexreader_p.h
index 4313c228f..4922df4ec 100644
--- a/src/assistant/help/qhelpsearchindexreader_p.h
+++ b/src/assistant/help/qhelpsearchindexreader_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexwriter_clucene.cpp b/src/assistant/help/qhelpsearchindexwriter_clucene.cpp
index c70d5ecd5..f717aed99 100644
--- a/src/assistant/help/qhelpsearchindexwriter_clucene.cpp
+++ b/src/assistant/help/qhelpsearchindexwriter_clucene.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexwriter_clucene_p.h b/src/assistant/help/qhelpsearchindexwriter_clucene_p.h
index f94905eb0..7253119be 100644
--- a/src/assistant/help/qhelpsearchindexwriter_clucene_p.h
+++ b/src/assistant/help/qhelpsearchindexwriter_clucene_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexwriter_default.cpp b/src/assistant/help/qhelpsearchindexwriter_default.cpp
index 47f6aa32a..ebfae3fc9 100644
--- a/src/assistant/help/qhelpsearchindexwriter_default.cpp
+++ b/src/assistant/help/qhelpsearchindexwriter_default.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchindexwriter_default_p.h b/src/assistant/help/qhelpsearchindexwriter_default_p.h
index 8d1e22545..67e1e416e 100644
--- a/src/assistant/help/qhelpsearchindexwriter_default_p.h
+++ b/src/assistant/help/qhelpsearchindexwriter_default_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchquerywidget.cpp b/src/assistant/help/qhelpsearchquerywidget.cpp
index befb5d444..d2e5da082 100644
--- a/src/assistant/help/qhelpsearchquerywidget.cpp
+++ b/src/assistant/help/qhelpsearchquerywidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
@@ -136,6 +136,35 @@ private:
#endif
}
+ QList<QHelpSearchQuery> escapeQueries(const QList<QHelpSearchQuery> &queries)
+ {
+ static QStringList charsToEscapeList;
+ if (charsToEscapeList.isEmpty()) {
+ charsToEscapeList << QLatin1String("\\") << QLatin1String("+") << QLatin1String("-")
+ << QLatin1String("!") << QLatin1String("(") << QLatin1String(")") << QLatin1String(":")
+ << QLatin1String("^") << QLatin1String("[") << QLatin1String("]") << QLatin1String("{")
+ << QLatin1String("}") << QLatin1String("~");
+ }
+
+ static QString escapeChar(QLatin1String("\\"));
+ static QRegExp regExp(QLatin1String("[\\+\\-\\!\\(\\)\\^\\[\\]\\{\\}~:]"));
+
+ QList<QHelpSearchQuery> escapedQueries;
+ foreach (const QHelpSearchQuery &query, queries) {
+ QHelpSearchQuery escapedQuery;
+ escapedQuery.fieldName = query.fieldName;
+ foreach (QString word, query.wordList) {
+ if (word.contains(regExp)) {
+ foreach (const QString &charToEscape, charsToEscapeList)
+ word.replace(charToEscape, escapeChar + charToEscape);
+ }
+ escapedQuery.wordList.append(word);
+ }
+ escapedQueries.append(escapedQuery);
+ }
+ return escapedQueries;
+ }
+
QStringList buildTermList(const QString query)
{
bool s = false;
@@ -279,7 +308,6 @@ private slots:
#if !defined(QT_CLUCENE_SUPPORT)
queryList.append(QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
QStringList(defaultQuery->text())));
-
#else
if (defaultQuery->isEnabled()) {
queryList.append(QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
@@ -393,7 +421,7 @@ private:
\fn void QHelpSearchQueryWidget::search()
This signal is emitted when a the user has the search button invoked.
- After reciving the signal you can ask the QHelpSearchQueryWidget for the
+ After receiving the signal you can ask the QHelpSearchQueryWidget for the
build list of QHelpSearchQuery's that you may pass to the QHelpSearchEngine's
search() function.
*/
@@ -538,8 +566,9 @@ QList<QHelpSearchQuery> QHelpSearchQueryWidget::query() const
{
const QHelpSearchQueryWidgetPrivate::QueryHistory &queryHist =
d->simpleSearch ? d->simpleQueries : d->complexQueries;
- return queryHist.queries.isEmpty() ?
- QList<QHelpSearchQuery>() : queryHist.queries.last();
+ if (queryHist.queries.isEmpty())
+ return QList<QHelpSearchQuery>();
+ return d->escapeQueries(queryHist.queries.last());
}
/*!
diff --git a/src/assistant/help/qhelpsearchquerywidget.h b/src/assistant/help/qhelpsearchquerywidget.h
index f313fdf1a..b55961c23 100644
--- a/src/assistant/help/qhelpsearchquerywidget.h
+++ b/src/assistant/help/qhelpsearchquerywidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchresultwidget.cpp b/src/assistant/help/qhelpsearchresultwidget.cpp
index 9a5f24415..d038d9852 100644
--- a/src/assistant/help/qhelpsearchresultwidget.cpp
+++ b/src/assistant/help/qhelpsearchresultwidget.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.
diff --git a/src/assistant/help/qhelpsearchresultwidget.h b/src/assistant/help/qhelpsearchresultwidget.h
index a054f169d..a8af7f04d 100644
--- a/src/assistant/help/qhelpsearchresultwidget.h
+++ b/src/assistant/help/qhelpsearchresultwidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Assistant of the Qt Toolkit.