summaryrefslogtreecommitdiffstats
path: root/src/assistant/help/qhelpenginecore.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtHelp: Rename provideXxx() into requestXxx() for async tasksHEADdevJarek Kobus4 hours1-7/+7
| | | | | | | | | This is more in line with Qt naming conventions. Addresses the API review 6.7 vs 6.8. Pick-to: 6.8 Change-Id: I6861fd4518ee3e2dce1963880fe6606b7884da20 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QHelpEngineCore: Reinitialize on changing the read only modeJarek Kobus2024-04-261-0/+4
| | | | | | Fixes: QTBUG-119515 Change-Id: I3d80138ce9282594f7d68c440c4666a9e4896c37 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QHelpEngineCore: Remove the old hack for dynamic readonly propertyJarek Kobus2024-04-181-3/+1
| | | | | | | | | | | | | | | | [ChangeLog][QtHelp][QHelpEngineCore] Remove the old hack with setting the dynamic "_q_readonly" property to change the read only mode. Use QHelpEngineCore::setReadOnly() instead. Use public QHelpEngineCore::setReadOnly() instead. The hack had to still exist around when the amended change was done so that it was still available for Qt 5 series. Now it's not needed anymore. Amends 15d7a30d41b423846fc74d9dd252c1e2a84769e2 Change-Id: I79e23850dc597db19f0da8b4dfec9fde4b529a35 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* QtHelp: More _L1Jarek Kobus2024-02-221-10/+10
| | | | | | | Task-number: QTBUG-122025 Change-Id: Icbdb003e9bd1b05bfb9d92002aab2aa5cc1aa0f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtHelp: Get rid of legacyCurrentFilterName()Jarek Kobus2024-02-161-5/+0
| | | | | | | | | Unused now. Task-number: QTBUG-122025 Change-Id: Ia165374d4234e2590c9075486a091844b3d18ba7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* QtHelp: Introduce QHelpEngineCore::provideIndex()Jarek Kobus2024-02-151-0/+39
| | | | | | | | | This is going to replace QHelpIndexProvider. Task-number: QTBUG-122025 Change-Id: I7206020ada3b57035c5952d58026f16f862cd98c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* QtHelp: Introduce QHelpEngineCore::provideContent()Jarek Kobus2024-02-151-0/+127
| | | | | | | | | This is going to replace QHelpContentProvider. Task-number: QTBUG-122025 Change-Id: I90f7cf822437819cbf7212be9f6cc340e9709673 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtHelp: Don't pass QThread pointer into uniquifyConnectionName()Jarek Kobus2024-02-151-4/+5
| | | | | | | | | Pass some other pointer. Task-number: QTBUG-122025 Change-Id: Ibb02543969e0dc38dcbc1f809353f64983ab9c05 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtHelp: Use more std::unique_ptrJarek Kobus2024-02-141-15/+6
| | | | | | | Task-number: QTBUG-122025 Change-Id: Ib29b14f56dd0401b986631bc685e652695857ff8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtHelp: Bit more cleanup in cpp filesJarek Kobus2024-02-131-46/+28
| | | | | | | | | | | | Inline some short methods in private API. Use more {} for default constructed values. Fix indentations. Add some TODOs. Task-number: QTBUG-122025 Change-Id: I29062709f6d302a8768ead1c20eda3af5c256c74 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtHelp: Deprecate protected c'tor of QHelpEngineCoreJarek Kobus2024-02-131-0/+2
| | | | | | | | | Not needed anymore. Task-number: QTBUG-122025 Change-Id: I2184d91cb76d7f90ba9c9de3f74fc105d3bac254 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtHelp: Dismantle qhelpenginecore_p.hJarek Kobus2024-02-091-8/+23
| | | | | | | | | De-qobject-ify QHelpEngineCorePrivate. Task-number: QTBUG-122025 Change-Id: I1efaa7a1ecc6b43d4a5df2cb4f9da6dcff86c0f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtHelp: Separate QHelpEnginePrivate from QHelpEngineCorePrivateJarek Kobus2024-02-091-20/+21
| | | | | | | Task-number: QTBUG-122025 Change-Id: Iec252a705046d7e5fab6606210ffb29585b3019e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QtHelp: Add QHelpEngineCore::legacyCurrentFilterName()Jarek Kobus2024-02-081-0/+5
| | | | | | | | | | | | | | To avoid dependencies between QHelpEngineCore and QHelpEngine. In theory we could have removed QHelpIndexModel::createIndex(const QString &customFilterName) and QHelpContentModel::createContents(const QString &customFilterName), but they are part of the public API, so let's keep them untouched. Task-number: QTBUG-122025 Change-Id: I5641a021ae0a842cd204a653e9c196899dc69b54 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtHelp: Separate QHelpEngineCorePrivate from QHelpEnginePrivateJarek Kobus2024-02-071-1/+1
| | | | | | | | | This is a preparation step towards splitting the QtHelp lib into widgetless QtHelpCore lib and widgetrich QtHelp. Task-number: QTBUG-122025 Change-Id: Iab23d95c7a6a842ddde7e01114f622c7a0f4ca08 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtHelp: Port includes to standard conventionJarek Kobus2024-02-071-3/+3
| | | | | | | | | | According to today's content of: https://wiki.qt.io/Coding_Conventions. Task-number: QTBUG-122025 Change-Id: I55f417060c989e28c38e1abaea1259bb87ccafe7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtHelp: Cleanup includesJarek Kobus2024-02-071-7/+3
| | | | | | | | | | Get rid of unused includes and forward declarations. Order includes and forward declarations alphabetically. Replace some includes with forward declarations. Task-number: QTBUG-122025 Change-Id: I224dc5371c982137b33f5b63c54f5da6cd435ce7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Fix typoKai Köhne2022-06-221-1/+1
| | | | | | Pick-to: 6.4 Change-Id: Iad35cbe157b10bd7636186c8a27d7381fdbfe043 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-191-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I5335388c0472b0ee554234fc7eca60769e504660 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Use \deprecated instead of \obsoletePaul Wicking2021-06-071-10/+10
| | | | | | Task-number: QTBUG-93990 Change-Id: I931cb10e0f217b32687c4b18379b9fdac77bfee8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix documentation warnings for qttoolsTopi Reinio2020-11-071-7/+0
| | | | | | | | Fix linking failures caused by the removal of Qt Assistant, and fix usage of obsolete/removed functionality. Change-Id: Iaefbebcc1371b41429377dc8219101bda9fbf79a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QtHelp: Reverse the default state for readonly property for help engineJarek Kobus2020-09-161-1/+38
| | | | | | | | | | | | | | | | From now the read only property is true by default. The old workaround with setting the dynamic property '_q_readonly' to true for the help engine should still work, so the change shouldn't break the user code with the workaround. This fixes the most common usage of QtHelp, when help engine is used for read only help collection files. Task-number: QTBUG-83268 Task-number: QTBUG-82126 Task-number: QTBUG-84745 Change-Id: Iee6fd18269d68f43633a5fecbb65abc60c99091a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QtHelp: Fix documentsFor() when not using filter engineJarek Kobus2020-09-111-4/+10
| | | | | | | | Fixes: QTBUG-84727 Pick-to: 5.15 Change-Id: Id66cc071a24cc761dc63d044b7f74d0e1959cd22 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove deprecated functionalityLars Knoll2020-08-241-48/+0
| | | | | | | Required to get the module to compile against a new qtbase Change-Id: I4f7c6f10c94da640c1f1eec0bbbbc22bbd7cb2ea Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Assistant: Fix compilation issues with QMultiMapKai Koehne2020-08-131-4/+4
| | | | | | | Fixes: QTBUG-86030 Change-Id: I87387a795dbf6609d8f22a84d93f95d68bbb646e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Doc: make it clearer that setUsesFilterEngine is required for filteringSamuel Gaist2020-06-081-4/+5
| | | | | | | | | The new API to use is an "opt in" with regard to the deprecated API so make it more prominent in the documentation as it is easily missed. Pick-to: 5.15 Change-Id: Ifacac03f0e05cea141c6c4a7d88eaac609e7b712 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Adapt the QtHelp API according to recent QMap changesJarek Kobus2020-03-191-37/+73
| | | | | | | | | | The usage of QMap as a multi map has just been deprecated. Adapt the QtHelp API accordingly. Introduce QHelpLink data structure. Fixes: QTBUG-82334 Change-Id: I8ff15710b1a433ddcb3000e5bcf58790c983e63f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtHelp: add new useful methodsJarek Kobus2019-12-101-4/+39
| | | | | | | | This methods are going to be used in QtCreator help integration. Change-Id: If226ba3e612af013694afc8508527516e3e0daea Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-181-0/+4
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/assistant/help/qhelpcollectionhandler.cpp Change-Id: If1408a5893bc9ade9088e01c00aab695eff131aa
| * Assistant: Mark the readonly collection filesJarek Kobus2019-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | The qhc file may be installed in readonly location. Don't try to fix tables there, we leave it for the cached qhc file. Task-number: QTBUG-72174 Change-Id: I513c799d2b571a9dd9bc77b7c122e635c863fcff Reviewed-by: Kai Pastor <dg0yt@darc.de> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Add new filter API, enclosed in QHelpFilterEngineJarek Kobus2018-11-121-21/+140
| | | | | | | | | | | | | | | | | | | | | | Implement new filter mechanism and provide component filtering. Task-number: QTCREATORBUG-19724 Task-number: QTCREATORBUG-7301 Change-Id: I48400e3bc969495a66c3002fed13a7c3ddb1e249 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Create new filter tables inside qch filesJarek Kobus2018-10-171-1/+1
| | | | | | | | | | | | | | Add a new internal API for dealing with new filters. Change-Id: Id26d90fe3e20aa576f6c2403cd36aa5e679a96b7 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Obsolete readersAboutToBeInvalidated()Jarek Kobus2018-10-171-8/+5
|/ | | | | | | | | | | | | There is not anymore any "reader" for the content and index providers. They were removed in commit 829f9dec6bff57e8b3f1afdc982778a9d573174f in 5.11 branch, when introducing the index and contents caches in qhc file. Also currently readersAboutToBeInvalidated() wasn't used anymore anywhere, so this patch just removes the emission of this signal. Change-Id: Ie1a0f7535d497687ff74472528fffdc85cba3a3b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Assistant: Fix clang warningsJarek Kobus2018-05-141-3/+3
| | | | | Change-Id: I8315c97fcd20ea9be90f4258628b88c809dc7fdb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Store the copy of the index inside the help collection fileJarek Kobus2018-04-231-151/+49
| | | | | | | | | | | | | | | | | | | | This avoids having to open all .qch files at startup, which is slow and can lead to contention on open file handles. This change is backward compatible. The old help lib won't use the new tables. The new help lib will generate the new tables on first run or regenerate them when it detects they are not anymore in sync. Store also the timestamp info about the qch files and compare it upon every startup. If it doesn't match then new tables' data is regenerated. The case when running new Creator, then running old Creator and reconfiguring doc set and then running new Creator again should work properly. Task-number: QTCREATORBUG-18242 Change-Id: I7f656935ae2383b866b27e256eec23dab588efc5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Assistant: Don't query the database for unneeded dataUlf Hermann2018-03-221-1/+1
| | | | | | | | | If we only need registered documentations of a specific namespace we can restrict the SQL query accordingly, so that we don't have to iterate through all the results afterwards. Change-Id: I124cf16ed95e1010b8a05d8cb723c2a1f03120d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Move the linksForKeyword from QHelpModelIndex to QHelpEngineCoreJarek Kobus2017-05-091-0/+15
| | | | | | | | Obsolete it inside QHelpModelIndex. Change-Id: I11f1e67c6eac6e6790a7c73d5850f5b415214db1 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Refactor help libJarek Kobus2017-05-021-36/+28
| | | | | | | | | | Fix const correctness. Use default member initializers. Fix some coding style issues. Change-Id: Ib89a2840648dcacc518cda4eb0ffce97ee8444cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Refactor connect to use Qt5 styleJarek Kobus2017-05-021-2/+2
| | | | | | | Change-Id: I9fed1b82d5afd0458b772475d303d2c0179ac73e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Refactor some APIJarek Kobus2017-05-021-5/+5
| | | | | | | | Deprecate old sfuff. Adjust documentation accordingly. Change-Id: I976823b29cb05dcf5880cb97f17408f85dae2e1b Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-101-1/+0
|\ | | | | | | Change-Id: I550cd94029cb515a487ccbf700dfc083101ed945
| * Drop some unused includesUlf Hermann2017-03-061-1/+0
| | | | | | | | | | Change-Id: Ida9409117c9fd4a022671fadb77ba96734118861 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Use sqlite's FTS5 for searchJarek Kobus2017-03-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change drops the usage of clucene library. We store the plain text version of html content of all the documentation inside the sqlite database. We transform the html into plain text using QTextDocumentFragment::fromHtml() and QTextDocumentFragment::toPlainText() methods, what causes the indexing a bit slower, however it makes the indexing much more accurate (try e.g. searching for [charset] or ["utf-8"] keywords) and enables showing the highlight (next patch). Dropped usage of local socket in order to detect if the other assistant instance is running. Obsoleted the -rebuild-search-index cmd line option. Comparison for the whole documentation of Qt: Disk usage for index: ~15 MB (5.8), ~85 MB (current) Indexing time: ~40 s (5.8), ~60 s (current). Change-Id: I89f2fa9efddc354f86e5ed0f5b4f5e2790057121 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* | Refactor for loopsJarek Kobus2017-01-101-10/+10
| | | | | | | | | | | | | | | | | | Use range based for loops where possible. Use & for local const variables. Fix some whitespaces and QLatin1Chars. Change-Id: I0e02062cf91e135edae27c4eae78fd70a3613805 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* | Refactor Assistant's iteratorsJarek Kobus2017-01-101-12/+11
|/ | | | | | | | | | | | Replace foreach with for. Remove java-style iterators. Don't mix const iterators with non-const ones. Use std algorithms when possible. Fix const correctness. Change-Id: I6519e490b6270f56b54f05867c6def5f140e57cd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Updated license headersAntti Kokko2016-06-101-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I25237f97989d42da1130ed5c0839c31eb3904d34 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Update copyright headersAntti Kokko2015-02-141-7/+7
| | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7f14f408e04c5c4f73a913fae153adcffbebe38f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-10-141-0/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/assistant/assistant/mainwindow.cpp src/linguist/linguist/mainwindow.cpp src/qdbus/qdbusviewer/qdbusviewer.cpp Change-Id: I1f5524ab747be561ed0b13d8b1fd8cb51a890363
| * Fix crash when accessing the content model.Christian Kandeler2014-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 1) Make sure invalidateContents() is called whenever the help engine's DB readers are destroyed. 2) In QHelpContentProvider::stopCollecting(), remove all root items, as they are invalid now: Their child items reference DB readers that are going to be destroyed. Task-number: QTBUG-18829 Change-Id: Id9cc4ea99c43c36ad5c5d1f04157a68bac79d44a Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-09-251-19/+11
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: I23ef9591f4d9054e0b6a252ba7767baf4189aeab Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>