Commit Graph

44349 Commits

Author SHA1 Message Date
Orgad Shaneh
22b0d3b6aa Debugger: Search for kit also by display name
The Id is not visible to users. Allow to pass name instead (first match
will be used).

Change-Id: I6bcd7ce50297e373b5b4d8a553009a27ff43cd24
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-01-22 14:29:03 +00:00
Nikolai Kosjar
3ea921c216 CppTools: Move some decls from header to source
...as there is no client using them.

Change-Id: I2fbbe247e6f4bad537644a9574ddcc0606bfa13e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 14:25:33 +00:00
Nikolai Kosjar
30c95c937b Clang: Take over jobs if document gets new project part
We could loose jobs if e.g. the user switched to another parse context
or shuffled project files between targets/products/project-parts while
there were still jobs in the queue.

Previously, changing the project part id of a document was a two step
process:
  1) Unregister document with old project part id
  2) Register document with new project part id
On 1), we have thrown the document processors (and thus the job queue)
away. On 2), we have created a new document. Due to this separation the
backend could not take over jobs to the new document (processor) - it
could not know that these commands belong together.

Now, we avoid the explicit unregister command. On a register command the
backend has enough context to find out what to do, it can take over
relevant jobs.

Task-number: QTCREATORBUG-18856
Change-Id: Ib68a8e62140fcfdb2de58dcd2ae955b4c2e15166
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 14:00:03 +00:00
Christian Stenger
3e81fe628a QmlJSEditor: Avoid detaching of containers
Change-Id: I52bb5b073793c11cf157cb72244ba3552ca1ac72
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-01-22 13:58:57 +00:00
Marco Bubke
fb0b5d9d9b Clang: Make it more clear that the FilePathId.filePathId is not shared
The name fileNameId could imply that the id shared for the same file name
which is not the case.

Change-Id: I27310a8994c2d9e9bb0f0aed2094bd988309c710
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 13:22:30 +00:00
Marco Bubke
aefc8cd693 Clang: Add aliases FilePathViews and NativeFilePathViews
Change-Id: I6f32392693b286969a62d79c9c779e3a837f5cb4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 13:22:24 +00:00
Marco Bubke
19984076ff Utils: Derive FilePathView from SmallStringView
If FilePathView has derived publicity from SmallStringView it can be much
easier used in generic algorithms.

Change-Id: Icfaa5739ee46d9ff4419a73f87f84f2525e10ccf
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 13:22:17 +00:00
Marco Bubke
a572b2db6a Utils: Change SmallString::toView to SmallString::toStringView
This improves the readability of the code.

Change-Id: Ifccbaaa6003636848ea48e00d92abc44f5c2e0f1
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 13:22:00 +00:00
Marco Bubke
b3bed4c306 Utils: Introduce flexible constructor for SmallString and SmallStringView
If a class has a data method that returns a char pointer it can be 
used to construct a SmallString and a SmallStringView.

Change-Id: I02dcba50babb3074b58998e5f907799e84361ed7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 13:21:52 +00:00
Marco Bubke
05b86568d9 Clang: Derive FilePath from Utils::PathString
We don't want to implement all the methods again.

Change-Id: I2f89ea59607b59f5ca49e6790e8a868942e1f96f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 13:21:14 +00:00
Christian Gagneraud
e8d7a1f21e sdktool: Update README and convert it to markdown
Change-Id: I4ea36841e51138c4feed85d8146a07f8824ee853
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-01-22 13:18:37 +00:00
Eike Ziller
49ed91b205 Merge "Merge remote-tracking branch 'origin/4.5' into 4.6" into 4.6 2018-01-22 13:17:10 +00:00
Nikolai Kosjar
608e7ec245 Clang: Fix tooltips for constructors
Constructors were not handled yet, so the tooltip for e.g. the
"QString()" constructor was "void ()".

Also, since the help system has problems with overloads, show the
function signature as clang sees it and provide a help system query that
will show the documentation for the class instead of the wrong overload.

Change-Id: Idc0cf9dce6a50c323e6fd945f277c7816b0f9b34
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 12:33:21 +00:00
Nikolai Kosjar
4db7fd064f TextEditor: Avoid running hover handlers for same request
...in case the current run is not yet finished.

Change-Id: Id78db576ad8fad10af6b21c73e5b47b49d58d26b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 12:33:12 +00:00
David Schulz
f9c959cee2 QmlJSEditor: Move ownership of QmlJSTextMarks to document
Task-number: QTCREATORBUG-19607
Change-Id: I65fa11b43dcbe3c28ab100a1636ad592cfff5a4d
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-22 12:10:02 +00:00
Marco Bubke
0b71c41c6b Utils: Add equals operator to Utils::LineColumn
Change-Id: Iace2b192cadf94cb8228332165af8c8b75ea3a6c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 11:56:07 +00:00
Robert Loehning
63e47f903f Improve translated strings and make them consistent
Change-Id: I88a6e6ceaa44b22539449037faa788caa9f349fc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-01-22 11:56:01 +00:00
Tobias Hunger
034f0209b0 ProjectTree: Fix crash working with resources
Fix the notification of subtree changes to keep the project in
the loop, so that it can adjust its list of known files.

Ignoring that will cause crashes, e.g. when the ResourceEditor
updates its subtree of the project.

Task-number: QTCREATORBUG-19613
Change-Id: Ib7bb9afe48eb248cdf675ba2093b266fd728d7b2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-22 11:51:47 +00:00
Eike Ziller
8921888ce3 Merge remote-tracking branch 'origin/4.5' into 4.6
Conflicts:
	src/shared/qbs

Change-Id: I5314559cbf188e4c339de44052c6e0c89d3c2aa6
2018-01-22 12:46:10 +01:00
Nikolai Kosjar
cf94a15379 Clang: Fix warning in switch()
clangjobrequest.cpp:176:12: warning: enumeration value ‘RequestToolTip’
  not handled in switch [-Wswitch]

Change-Id: I09080548ba45ef99bc0c9e08b06d2ea3268b5662
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 08:02:57 +00:00
Nikolai Kosjar
764925eb3a Clang: Send less data on unregisterTranslationUnit
For unregisterTranslationUnit only the file path and the project part id
is needed.

Change-Id: I882d2fe07af094c07ea42413d6874539535a48ea
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-19 14:54:27 +00:00
Nikolai Kosjar
4875e07efb Clang: Add 'override' to related destructors
Change-Id: I763ec2d3462f9a3d1a1afc4270c5f1015bee758f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-19 14:54:19 +00:00
Nikolai Kosjar
9f4c55528d CppTools: Remove unused signals/functions
Change-Id: I00420f98eb49acfbcbb7f719b0d3a867a8882d31
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-19 14:54:13 +00:00
Nikolai Kosjar
43a3ea1d22 CppTools: Remove pointless loop
Change-Id: Ie6c597421f81529973351a6363c0110435e42c29
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-19 14:54:08 +00:00
Ivan Donchevskii
bb782f64ba Clang: Add clazy argument to ignore included files
ignore-include-files flag  does not improve performance
currently. But if we decide to use -I for some of our
include paths than this parameter will continue to skip
them for clazy diagnostics.

Change-Id: I8ff02edf224f680f88f1b178098787c0e2a629cb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-01-19 14:43:53 +00:00
Christian Kandeler
fdb95299c6 Update qbs submodule
To HEAD of 1.10 branch.

Change-Id: Ia43e86a65cb9eb50712414fe522c851197d2e049
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-01-19 14:37:48 +00:00
Nikolai Kosjar
56157f739d Clang: Cancel tooltip future on backend restart
Change-Id: Icbc461aa765c47ae0dd708a731b4d132bfa0f7d8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-19 14:19:55 +00:00
Nikolai Kosjar
97c2bcf8d2 Clang: Fix comment
Change-Id: Ib69d0696ed7cc810990e61c62a1af236f54f09ca
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-19 14:11:23 +00:00
Nikolai Kosjar
9fd9bd25ab TextEditor: Let BaseHoverHandler handle help id callbacks
...to support asynchronous hover handlers like ClangHoverHandler.

Change-Id: I8dc7189db37ec3a923cf493b8957c59ec9be447c
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-19 13:58:07 +00:00
Nikolai Kosjar
0a4073ef90 TextEditor: Return hover handler priority by callback
...to get rid of the asynchronous code path.

Change-Id: I56377510440631b0be712333b2a4018717c86389
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-19 13:57:57 +00:00
Nikolai Kosjar
2d7f1d6c8c Clang: Take over jobs if document's project changes
On registerProjectPartsForEditor() we recreated the affected
DocumentProcessors, but did not take care of the jobs that were in the
queue, which effectively could led to lost jobs. Catch up on this.

Task-number: QTCREATORBUG-18856
Change-Id: I4184e5dc6480667953f2d2081ccf39a28c092186
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-19 13:16:07 +00:00
Eike Ziller
0837f974da Merge remote-tracking branch 'origin/4.6'
Conflicts:
	qtcreator.pri

Change-Id: I7dcd8e067b7597144eb3b27d917cb7fe0279aad4
2018-01-19 12:05:11 +01:00
hjk
052f8ae98a ProjectExplorer: Don't add plugin to object pool
The addObject/removeObject there was part of the initial commit, it
does not seem to be used or needed anymore.

Change-Id: I6f359da34a63a94aa8312f15c3a9b3f92fd8ee2a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-19 10:10:43 +00:00
hjk
673aacc67c Nim: Move a few factories to their product's compilation units
There's several hundred kBytes extra for the separate .o in a
debug build, this doesn't scale well for a handful lines of code.

As the Nim plugin is a nice template for others elsewise, it would
be nice to use scalable patterns only.

Change-Id: I78e473d28a6a63d458dcbe06a77d93221867417f
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-01-19 07:11:39 +00:00
Nikolai Kosjar
dd06a4188d Core: Return context help id by callback
...to support asynchronous providers.

Change-Id: I483489c74e7886d5bc2bf00b65540c3d2c7afee0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-18 13:54:02 +00:00
hjk
8320ae06f7 FakeVim: Use a more standard pattern to add option pages
Change-Id: I4167f98b29226ed9ae8eb630ea9d544db149da2c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-18 13:21:03 +00:00
Nikolai Kosjar
7ac1964f2b Clang: Fix left-over qWarnings()
Change-Id: Ife685ca7e9e567b832434ba492607b3819d14d48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-18 09:46:30 +00:00
Christian Stenger
8177a3c219 CppTools: Fix compile for gcc 4.9
Seems gcc 4.9 cannot handle forward declared classes in uniqe_ptr
correctly. Broke with 7666db896d.

Change-Id: Ib7e7d9d22e5b0a1d50a107202108ec2937e0a284
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-18 09:39:33 +00:00
Orgad Shaneh
956e6f3a97 Clang: Fix MSVC build
Link error:
clangpchmanagerbackendmain.obj : error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: __cdecl ClangBackEnd::ClangPathWatcher<class QFileSystemWatcher,class QTimer>::ClangPathWatcher<class QFileSystemWatcher,class QTimer>(
        class ClangBackEnd::FilePathCachingInterface &,class ClangBackEnd::ClangPathWatcherNotifier *)"
    (__imp_??0?$ClangPathWatcher@VQFileSystemWatcher@@VQTimer@@@ClangBackEnd@@QEAA@AEAVFilePathCachingInterface@1@PEAVClangPathWatcherNotifier@1@@Z) referenced in function main

Looks like MSVC looks for import even for inline template functions.

Another alternative is to revert 351f355b69
and either ignore or suppress the GCC warning.

Change-Id: I040d4e3924af7f4d1f4424276329c6095e6ff6bd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-18 08:07:49 +00:00
Nikolai Kosjar
f15646622a GLSL: Limit recovery attempts
"switch(" was recovered with number, ), ), ), ...

Task-number: QTCREATORBUG-18967
Change-Id: I12ccea0925fb2956de7405d9c8afea5dddeaf4f9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-01-18 08:05:15 +00:00
hjk
4d3364591f Ios: Do not report AuxTemplates as availableBuildTarget
This is different from all other target platforms, and was part of
the initial ios code without anyone being around who knows why.

Change-Id: I8be4094b89deb32275fc08b3c1560d7d5610ea28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-18 07:52:36 +00:00
Orgad Shaneh
d3096f0f73 QmlProfiler: Fix build
Resolves a build conflict between e1ad7a1784
and cfd54505eb.

Change-Id: I70baec1ca2f388bc699866a134c9cb6f64203fdb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-01-17 19:44:58 +00:00
Alexandru Croitor
b23dab3ba2 Avoid double deletion of HelpWidget when quitting application via Dock
HelpWidgets that are created to be shown in an external window, had
two different places where they were deleted:
1) When the widget was closed (due to Qt::WA_DeleteOnClose)
2) In HelpPlugin::aboutToShutdown via manual delete call

In certain circumstances (when the WebEngine backend was used)
this caused a double delete. Specifically, after opening an external
help window, and closing the MainWindow, the application did not quit
due to QTBUG-62596.

Now if the help window were left open, and the application was quit
via the macOS Dock, this caused a crash.

When the application quits, it calls the HelpPlugin::aboutToShutdown,
which deletes the HelpWidget. This in turn destroys the WebEngine
view, which destroys the underlying QQuickWidget, which destroys
a QQuickRenderControl, which calls
QQuickRenderControlPrivate::windowDestroyed, which handles all
posted QEvent::DeferredDelete events, which in turn triggers the
deletion of the same HelpWidget due to the
Qt::WA_DeleteOnClose attribute.

The solution is to remove the Qt::WA_DeleteOnClose attribute, and only
delete the external HelpWidget on shutdown, and not on CloseEvent.

Task-number: QTBUG-63945
Task-number: QTCREATORBUG-19582
Change-Id: I5b73ff7fe52e7e1259a8aa98c97c9dbedd5e3c20
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-17 16:24:43 +00:00
Eike Ziller
47ad489b97 Merge remote-tracking branch 'origin/4.5' into 4.6
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I52986bd2557490431bae48f9db86c848a95592d2
2018-01-17 16:28:18 +01:00
Marco Benelli
a68a545ce2 qmljs: update qmljs parser
Change-Id: I418c3f8c77f36274864edd71d8f86d37587cb3a7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-01-17 15:19:51 +00:00
Ulf Hermann
cfd54505eb QmlProfiler: Improve robustness of QmlProfilerTool test
The QmlProfilerClientManager will only report connectionClosed() if the
connection was open before it dropped. If the connection never opens,
that is the hello message never arrives, it will retry a few times,
triggering the QTRY_VERIFY timeout.

We don't want the retries to succeed, so close the server after the
first connection. Furthermore we want the hello message to be
transferred before dropping the connection, so check for isConnected().

Change-Id: Ie96c48b2aaf2748d082c4bef3efe85c261ca4812
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-17 14:31:09 +00:00
Ulf Hermann
5555b7137b QmlProfiler: Defer chained state changes
If the state is changed again from a signal handler before all handlers
for the signal have been processed, we can get confusing results. Defer
those calls.

Change-Id: I73f7b8faa48ee00c17fdedb4140823d7a1b13435
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-17 14:27:29 +00:00
Friedemann Kleint
9cf8ab3b3d Fix mime type detection for Qt 5.11
Add an #ifdef for the changed path to the QtCore resource
following qtbase/7a5644d6481a3c1a7416772998ca4e60c977bfbd.

Task-number: QTCREATORBUG-19600
Change-Id: I8fa8bbf9a7ec91ca569f65671eaab1798b129981
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-17 13:50:34 +00:00
Marco Bubke
e0ea602f6c Clang: Use LineColumn instead of explicit integers for line and column
With OptionalLineColumn we don't need any bool return parameter any more.

Change-Id: I6f57f221c1bfdf08a92a87a7d71ea0eecf83dbcf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-17 12:22:30 +00:00
Ivan Donchevskii
7666db896d CppTools: move locators ownership to ModelManager
Move locator and find filters ownership and initialization
to ModelManager. Initialize builtin filters by default and
provide methods to set them from plugins.

Change-Id: I4cc82ecff3415329a5f97b1be9dcc45e6103bf5a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-01-17 11:33:24 +00:00