Commit Graph

65 Commits

Author SHA1 Message Date
Eike Ziller
91d785a123 Help: Unregister documentation when unregistering Qt versions
While doing we must take care that we do not remove documentation that
is used by other, still registered Qt versions (since for example
desktop & mobile Qt versions share the same documentation).

Fixes: QTCREATORBUG-16631
Change-Id: I77a38c89698cb3050d4a0a6963ab12d3238e2068
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-10-18 12:08:08 +00:00
Eike Ziller
2c2bca924a Help: Remove functionality of unregistering namespace from public API
Only used by the options page and generally needs knowledge of help
namespaces, which requires querying QtHelp.

Change-Id: Id8eda86e5b373ab3214e8eff6e2e3ce92c1239ba
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-10-16 07:19:18 +00:00
Eike Ziller
8309606a52 Help: Lookup in index if ID is not found
And if multiple topics are found in the index, show the topic chooser
dialog that we already have for the help index.

Fixes: QTCREATORBUG-12704
Task-number: QTCREATORBUG-15959
Change-Id: I7afa6f44bbecc12f602aaaa4a11209ec72399689
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-11 08:24:40 +00:00
Eike Ziller
0345bcb7cc Help: Rename handleHelpRequest to showHelpUrl
Since that is what it does.

Change-Id: I13ffe21cdb625a0df1313f2ff09bf84196f08768
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-01-25 08:23:18 +00:00
Eike Ziller
b9db5ea86e Move documentationPath() from Core::ICore to Core::HelpManager
It is documentation related API, so it belongs there.

Change-Id: I5d1676f251e6deb92050ddedac19bf3c332aab54
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-09-20 07:19:49 +00:00
Eike Ziller
2c17fbe8dd Make Core independent from QtHelp
We don't want various plugins to depend on the Help plugin,
but we also do not want Core to depend on QtHelp.
For example when turning the Help plugin off, documentation should
actually no longer be registered through QtHelp. So we need
parts of the interface in Core, which must then be delegated
to the actual implementation in Help.

As positive side-effects the interface in Core will be slimmer,
and the code in the Help plugin can later be simplified, too,
because then we don't have the "Core" and the "Gui" help engines
separated in different plugins anymore, which should remove the
need for some setup indirections.

Task-number: QTCREATORBUG-20381
Change-Id: I634c5811c45d6a3dfd6ddc682cae270e38384cbf
Reviewed-by: hjk <hjk@qt.io>
2018-09-04 11:21:18 +00:00
Alessandro Portale
f36f04deba Core: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init (partially)

Change-Id: Idf10d7ffb1d98a04edc09a25c35e4e9e3abe87b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-08 16:04:21 +00:00
David Schulz
35efebf6f8 Core: Do not use help engine of another thread
As documentation is now registered in another thread
accessing the help engine from the main thread may crash.

Task-number: QTCREATORBUG-19933
Change-Id: Id5e376c793156bf2d553c237cfb068b000c5afb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-01 11:40:40 +00:00
David Schulz
4c629ed356 Core: initialize helpengine in async register thread
Task-number: QTCREATORBUG-19933
Change-Id: I97e7391e1c1ab7b58caa4796d557c9cc7f484005
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-28 13:43:27 +00:00
Christian Stenger
e8e3ade858 Core: Fix build without Qt Help library
Change-Id: If8229ad96fbe1aeb327bb77dd14bb55ec52d608e
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-26 06:45:29 +00:00
Eike Ziller
7c3cfa166d Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/coreplugin/helpmanager.cpp

Change-Id: I2feb60ec0afb2f22f75dc137a01c3fa217b299d8
2018-02-23 10:56:52 +01:00
David Schulz
63cc5491f5 Core: cancel async documentation registration on shutdown
Change-Id: I46bc81cf6326e964309996e0e205fff011f596e7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-21 07:58:10 +00:00
Christian Stenger
075d636655 Core: Fix build without Qt Help library
Change-Id: I8067a8ea6ef6395085673ae08c2242dd4a894d55
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-21 07:19:55 +00:00
David Schulz
775b235f45 Core: register documentation asynchronously
Change-Id: I946ce394bc4e21a1c5746fb38dcc81acc1106ba4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-19 11:34:04 +00:00
Ulf Hermann
45744fa725 HelpManager: Cache the registered documentation namespaces
Querying the namespaces is expensive as it involves a complicated SQL
query. We shouldn't do this if we don't need to. In this case we only
need the initial list. After that, we know if we add something to it.

Change-Id: I0c45ae6d39da686fa29a968d815dac3d68890208
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-02-16 09:47:31 +00:00
David Schulz
193e3de80a Core: modernize HelpManager
Change-Id: Ia5468ee5113f85206d1a714f4580297d166fbafd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-24 11:17:46 +00:00
Jarek Kobus
3261e73b0c Apply current filter to search results
QHelpSearchIndexReaderDefault is run in a separate thread
in order to return the results of the search. It reads
the info about the current filter in order to filter out
the results. However, the main thread didn't
store the current filter in the qhc file, just in memory,
and the search thread reads the value of the current filter
from qhc file, so this goes out of sync.

This patch stores the current filter in the qhc file
whenever it is changed.

The current code resets the current filter
by the launch of creator anyway.

Task-number: QTCREATORBUG-17845
Change-Id: I7c8d2c93b319c94e1400a677ecee9e9b41b029c3
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-04 09:06:13 +00:00
hjk
46e4ecbd44 Make Creator compile without Qt tools in some configuration
Needing to compile Qt tools is a bit of a chore (and at some point a
diskspace issue) when building/starting Creator as sanity check for
comparing different compiler optimization settings.

This is not an officially supported configuration.

Change-Id: I628e33eb7137f09ecfebbd27453de548bac2fde5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-10 13:30:53 +00:00
Orgad Shaneh
5646480f27 Core: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I2dde14919d917816d02117338205f8f861d8af0a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-03 07:54:02 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
9007d2cb33 Help index filter optimizations
Move retrieval away from prepare search, and do some caching. Also split
the keyword search into individual chunks per help database that are
executed on the UI thread individually.

Change-Id: I0b8fe4abfc3cba46620985752d3d90638e10512f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-08 11:27:10 +01:00
Eike Ziller
877d482c85 Help: Clean up automatically registered documentation
It would keep documentation registered as long as the files are still
there, but that is actually not what is wanted. If you remove a Qt
version from Qt Creator, or switch between different Qt Creator
installations with different auto-detected Qt versions, the registered
documentation should be updated.
This also reduces the number of open files in these cases.

We keep a list of manually added documentation in the settings and treat
all other documentation as automatically managed.

Change-Id: I542f9aee0e62cab70db5afc5c6d6764d84cb253d
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2014-12-08 08:31:59 +01:00
Eike Ziller
f5933839ee HelpManager: Use QTC_ASSERT
We have many conditions where we return empty default values when the
help engine is not yet set up. These deserve a warning.

Change-Id: Ib7235d344f93ab7a6e2e0ee126c3593818b8a8b0
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-04 09:55:26 +01:00
Orgad Shaneh
7f34158041 Core: Cosmetics
* Remove redundant namespace qualifiers
* Qt5-ify some signal/slot connections
* Replace some using Core::Internal with explicit namespace scopes

Change-Id: Id1aae05e2c6fc2992c2716e1f8f9e985c6e56122
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-26 13:46:38 +01:00
hjk
a439483d70 Use QFileInfo::exist(f) instead of QFileInfo(f).exists() if possible
Faster.

Change-Id: I91aa67462e11ff3258600d7f158de79942d0dc81
Reviewed-by: Marc Reilly <marc.reilly@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-11-03 09:31:28 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Eike Ziller
8fc7035b18 Help: Open example documentation in extra window
Also remove the hack that HelpManager::handleHelpRequest looks
for ?view=split in the URL and use an enum instead.

Change-Id: I4ad74775381cf0b321181358266d8e89c6e277b5
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2014-06-24 11:22:20 +02:00
Nikita Baryshnikov
12103e0f67 Reinvent deprecated qSort as Utils::sort
Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-06-19 14:00:32 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
hjk
d66369e21d Core/Help: Clean up HelpManager interface and users
Change-Id: Ia6edf583f2a002d7c6f4878df670a78614ea087d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:34:39 +02:00
Nikolai Kosjar
ef018ddd9e Locator: Case sensitivity of input affects prioritizing
So far candidates were prefix matched case sensitive which led to
an unfavorable results order.

With this patch, if the input is lower case, the prioritizing happens by
a case insensitive prefix match. Otherwise the match happens case
sensitive (just like before).

Example:

    Search for e.g. "m cppmodelmanager"
    Top result before: AbstractEditorSupport (match at parameter type)
    Top result now: CppModelManager

Change-Id: Ic27042cfe717be812a2237a3437399597c98dd74
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-08-22 09:42:22 +02:00
Eike Ziller
2f8f083b40 Unify pattern used for privates and constructors
In the 'managers' from ICore

Change-Id: Iab98c9e0947b759843a62e3777ba46be3b304b06
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-07-01 11:52:35 +02:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Eike Ziller
ef91bd0505 Qt5: QUrl doesn't accept paths without leading slash anymore
Fixes e.g. opening help from the Locator help index filter

Change-Id: I3f7dae08aa83c36119a31d97232b9cdba0ba89fc
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2012-10-26 14:54:17 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
kh1
a031d5f686 Sort the search hits to match the actual search term.
The former unsorted list would not fully match the search term,
while searching for QString the actual top hit would be somewhere
in between other search results instead of position one. Make sure
to remove duplicates from the search hits.

Task-number: QTCREATORBUG-5167

Change-Id: I640c3e8d5a5498c5a13c083370a961f458576da5
Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
2012-06-04 12:15:46 +02:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Eike Ziller
de290e0341 Add "delayedInitialize" feature to plugin manager.
And use it for some of the plugins. It avoids the plugins to
do the timing on their own, and actually adds guarantees about
the order the delayed initialization is done.

Change-Id: I88ad9b46b24b82c91509774170fe0e7e99e88e4b
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-03 09:48:39 +01:00
Eike Ziller
0651e28d04 Delay setting up the help manager.
Change-Id: I86ba3734bd9a64b7d13ce7b7171a65eeb82dfa3d
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
2012-01-30 18:18:16 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
Friedemann Kleint
2892f13b8c CorePlugin: Compile with QT_NO_CAST_FROM_ASCII.
- Wrap literals in QLatin1String()/QLatin1Char().
- Extract some string constants avoiding repeated
  QString construction.
- Fix repeated invocation of Container.end() in loops.

Change-Id: If737735507aaf82e53063adda53f54c46418f42f
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-12-22 14:47:29 +01:00
Eike Ziller
3768dc02fd Use QStringList directly for setting.
For installed documentation. Instead of splitting a string at ';'.

Change-Id: I0e0ad0ece337bc8738501c008ff67412df1f18bb
Reviewed-by: Alexander Lenhardt <alexander.lenhardt@nokia.com>
2011-12-16 16:18:52 +01:00
Eike Ziller
3e6cd71fe2 Don't explicitly look in "install settings" for installed doc.
Not strictly necessary, and being able to specify that in user settings
makes things a bit easier for testing purposes.

Change-Id: Ie54c12cf65682892de09f0d811a8a1571137395c
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
2011-12-16 12:41:46 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
Eike Ziller
f2544fde4e Read from install-wide settings for registering documentation.
Installers can write a semicolon separated list of files and directories
to the install-wide settings for the key "Help/InstalledDocumentation".
Qt Creator will look for *.qch files in directories mentioned there
(*not* traversing subdirectories).

Change-Id: I0f9b92caee3e2c72b3876573b9a050f7aea24a1a
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
2011-11-10 09:31:32 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00