Commit Graph

5234 Commits

Author SHA1 Message Date
Christian Stenger
885be5524c Squish: Adapt to changed UI of debugger
Change-Id: I234ec55f69751f9fc9c543956fe5b9f058ef9633
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-10-16 10:40:41 +00:00
Ivan Donchevskii
78fbb0826b Clang: Fix fix-its positions calculation
Code completion does not save the unsaved file contents
in translation unit therefore we need to access unsaved
file directly to calculate the proper UTF-16 column.

Change-Id: I0f217b0d36e0ff94ebc483ed6bef94b55efd311a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-16 10:08:08 +00:00
Marco Bubke
2c885fa3d4 Clang: Split symbol storage
We need UsedMacros and source related statements in the PCH manager too,
so we have to split that class.

Task-number: QTCREATORBUG-21289
Change-Id: Ie27d4b518b3d6d9174e93fcb243fdb55a09ddf51
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-16 08:57:00 +00:00
Eike Ziller
511bd64f3f Merge remote-tracking branch 'origin/4.8'
Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
2018-10-16 07:11:57 +02:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Orgad Shaneh
1934d584c8 Merge remote-tracking branch 'origin/4.8' into master
Change-Id: I6ecd3732a147960681c6135e8752cbd046bad65b
2018-10-12 17:21:14 +03:00
hjk
03d525a3bc Debugger: Simplify 'short int' to 'short' in type displays
Change-Id: I63946a983c4dd47e31f26e5f70a4c3c9e31c92ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-12 14:07:56 +00:00
hjk
53228b8b0d Debugger: Add a note on LLDB 6.0/Linux type mis-reading
Code "QStaticStringData<1> sd;" ends up as "QStaticStringData<4>"
when read by LLDB. GDB is fine.

Change-Id: Ieef8d4a4c267d6e0bb45c96f8dc9c05a79b66381
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-12 11:34:53 +00:00
Marco Bubke
28007d9a1c ClangPchManager: Introduce UsedMacroAndSourcesCollector
It's a subset to thesymbols collecter so we try to share some code.

Change-Id: I058eee39289453e205f039b3850c1816f1d8ec1a
Task-number: QTCREATORBUG-21257
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-12 07:51:49 +00:00
Eike Ziller
7af8e9b3b4 Merge remote-tracking branch 'origin/4.8'
Change-Id: I8acb6582890fb2e103996cc4987f7543d22d7108
2018-10-11 10:41:25 +02:00
Marco Bubke
77b5907c57 Don't remove __cplusplus
For the indexing we need all tool chain macros. Originally it was a fix
because the C++ version of the project part and __cplusplus could be
different but now they should be the same. They will be now removed in the
compiler options builder.

Change-Id: I7ae8721a29632473e76ecedb411a6c9001e5e199
Task-number: QTCREATORBUG-21265
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-10 12:25:30 +00:00
Ivan Donchevskii
76fad7aad0 Unittest: Fix compileroptionsbuilder-test paths on Linux
Match paths partially not to construct the whole path.

Change-Id: I397ac930e2d74b8eba98d1b523aabd4ed92f2aee
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-09 12:25:14 +00:00
Nikolai Kosjar
6aa11eb75e CppTools/ProjectExplorer: Remove enum duplication
... between CppTools::ProjectPart and ProjectExplorer::ToolChain.

Change-Id: I8b448747e454adbed77547460383b8515462cc81
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-08 12:34:57 +00:00
Nikolai Kosjar
5900766ecb Toolchains: Detect unspecified language version
We checked the command line from the project manager for "-std=X" and
friends to figure out the language version to use. However, if such a
flag was not provided, we assumed the latest version we support. This
could conflict with the actual version of the compiler and its
predefined macros.

Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the
predefined macros of the toolchain. The MSVC compiler is an exception to
this, as it does not seem to properly set the value - check for
_MSVC_LANG if possible, otherwise simply assume some versions as before.

While at it, add also support for C17/C18 and the upcoming C++2a.

Task-number: QTCREATORBUG-20884
Task-number: QTCREATORBUG-21188
Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-08 09:07:56 +00:00
Marco Bubke
391cfab5d7 Clang: Add progress bars for creating PCHs and indexing
Task-number: QTCREATORBUG-21112
Change-Id: Ie0c00a58f479a2fe7cbc7322490808509733ff0f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-08 08:20:22 +00:00
Eike Ziller
8fa37a17c1 Merge remote-tracking branch 'origin/4.8'
Change-Id: I74268f767e2fc7dae5db390a0348095ef220abd2
2018-10-05 13:11:02 +02:00
Ivan Donchevskii
f6e5202b80 CompilerOptionsBuilder unit-tests
Bonus: minor compiler options builder issues fixed.

Change-Id: Ie25f8fad6729339de05f2bf9b614ceac873e2634
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-10-04 10:24:13 +00:00
Eike Ziller
f8ffe14b82 Merge remote-tracking branch 'origin/4.8'
Change-Id: Ife02e25f89a601e066851cddf0e000ac9491fc35
2018-10-04 09:39:10 +02:00
Ivan Donchevskii
efc39304a1 Clang: Move the majority of completion items sorting to ClangBackend
With this change ClangCodeModel only needs to sort completions by prefix.

Also some other optimization have become possible and are implemented here:
1. Getting completions after '{' for constructor overloads by replacing
   it with '(' inside usaved file.
2. Checking for all overloads requires only previous item check because
   all Class completions are already sorted to go before all CXXConstructor
   completions. Since they are not mixed no extra search is required.

Change-Id: Ie0187ad96a20857a63c1d71ddec74606b803f572
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-02 12:29:23 +00:00
Eike Ziller
7348d3965c Merge remote-tracking branch 'origin/4.8'
Change-Id: I2ebb6de6a5777a5a756e5765bd397323f84971ce
2018-10-01 14:34:21 +02:00
Robert Loehning
1785b0f561 Squish: Use TestSections in tst_create_proj_wizard
Change-Id: Ib097f629a1815e9f372e4bdf91faa14b3a7b9042
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-01 11:57:17 +00:00
Christian Stenger
c5d961fe01 Squish: Let startQC() return applicationContext
Change-Id: I56aff938095948031ff7b4e5fd522654208e4f6b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-10-01 11:32:27 +00:00
Orgad Shaneh
c268ec8465 Merge remote-tracking branch 'origin/4.8'
Change-Id: I8044614199102217b6bfa5e47dac108ce7641185
2018-09-28 12:46:29 +03:00
Ivan Donchevskii
65ea6f8e83 Clang: Introduce Token class to work with CXToken pointers
Make tokenization and tokens annotation simpler.

Task-number: QTCREATORBUG-21143
Task-number: QTCREATORBUG-21144
Change-Id: I580091b7b63dd973228fd2e21cf2e74c7d0e7df2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-09-26 11:46:18 +00:00
Nikolai Kosjar
aa290912b8 Clang: Remove project tracking on clangbackend side
...as it is not needed. Just provide the compilation arguments as part
of the Document.

As a side effect, re-initializing the backend after a crash is cheaper
and will not freeze the UI anymore (referenced bug).

Task-number: QTCREATORBUG-21097
Change-Id: I866e25ef1fd5e4d318df16612a7564469e6baa11
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-26 10:45:41 +00:00
Marco Bubke
bca41fa9f6 ClangRefactoring: Initialize sqlite database only once
Initializing the database is not cheap so it is better to initializing it
only once. We simply check if the database file already exists and then
skip the initializing step.

Task-number: QTCREATORBUG-21174
Change-Id: I151090c5081c009f7913a30517065be2833791d8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-26 10:38:01 +00:00
Christian Stenger
6f14b6f399 Tests: Fix compile
Amends 4b42789bda.

Change-Id: Ibd4d024ad836accf4fdda880eb342c61a6c32219
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-26 10:05:18 +00:00
Eike Ziller
cc1e03a649 Merge remote-tracking branch 'origin/master' into 4.8
Change-Id: Ic7fc44a9533d5d5abd384ff1185ec10811912314
2018-09-25 13:23:13 +02:00
Orgad Shaneh
015a19ac97 Tests: Remove use of deprecated QDateTime::toTime_t
Change-Id: I7d9f4e13deb8f375840f9da0c84b165a1dd744ee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-25 10:17:07 +00:00
Marco Bubke
4e6d09d8e1 Clang: Reuse thread based pipeline for pch creation
The pch creation so far used signal and slots but there was no explicit
pipeline. This patch is introducing the same architecture like the
refactoring plugin. It is filtering out older project parts from the
pipeline.

Change-Id: Iaa6bd2ca1272231b97ebe1f5f7b2ce8e43bc590c
Task-number: QTCREATORBUG-21111
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-24 14:33:05 +00:00
Christian Stenger
3e4dc83a95 Tests: Fix compile for boost > 1.64
Change-Id: Idf5d68e4528fd49023b21912a48a3cc109a1bbfa
Reviewed-by: hjk <hjk@qt.io>
2018-09-24 09:58:57 +00:00
Orgad Shaneh
41dee83bec TextEditor: Modernize
override, auto, nullptr, member initializers.

Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-20 08:48:49 +00:00
Nikolai Kosjar
9dea4c0743 Tests: Fix generichighlighter/highlighterengine test
highlighter.cpp: In member function ‘void TextEditor::Highlighter::applyFormat(...)
highlighter.cpp:572:22: error: ‘fontSettings’ was not declared in this scope

Broken by 6ea686faa9.

Fix by adapting the mock/fake header.

Change-Id: I700a7ed4573c44f04ead5a2e6f2df198edaaebb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-20 06:12:33 +00:00
hjk
83a8b8bf8f Debugger: Do not count not matching test as failed
Change-Id: I37a109915426d17b65ab0782e90f238a5da94a1c
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-18 06:13:43 +00:00
Ivan Donchevskii
0bd095aa45 ProjectExplorer: Rename compiler includes from System to BuiltIn
System include are those used with -isystem keyword, built-in
includes on the other hand come from compiler and always
follow in the end of the include list (after system includes).

Change-Id: I95c2fec36d2e5b43f014fe0a88d59c6769edfa1f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-17 11:24:32 +00:00
hjk
e507abf6a6 Debugger: Use new CheckSet infrastructure in AnonymousStruct test
Change-Id: Ib3e2ea2ab8a70ebfe94d80a0b0bf4b57fdb9027a
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-17 09:22:23 +00:00
Orgad Shaneh
cc1693c4ce Tests: Fix build
This amends commit 11245564da.

Change-Id: I1ca887a69d85064c4e1a3cfdfc618070615f00c3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-14 11:36:54 +00:00
Eike Ziller
4c914c6b43 Merge remote-tracking branch 'origin/4.7'
Change-Id: I562b0b8afb98940e03b67cbd7d7c3e756b77d736
2018-09-14 09:59:48 +02:00
Tobias Hunger
1df553a683 ProjectExplorer: Rename IncludePathType to HeaderPathType
It is the type used by the HeaderPath class, so reflect that in
the name.

I also considered to rename HeaderPath to IncludePath, but
that name is reflected in a lot of users, which would also need
to be adjusted for consistency. That would blow up the patch size
for little value IMHO.

Change-Id: I51421dbd3ab8b2874dc32fc82dc394c9b93ce5e9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-13 11:32:31 +00:00
Ivan Donchevskii
50e5aacb02 Highlighting: Add highlighting style for punctuation
Currently only operators have their own style but not
punctuation tokens. Make possible to highlight both.

Task-number: QTCREATORBUG-20666
Change-Id: I9533e0f1bef65b86c4e4f5c9756571103584124b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-09-13 11:15:05 +00:00
Marco Bubke
b173c3d83f Clang: Add generated files support for pch manager
Change-Id: I69aae62dd1091a1958d4b0f23a37758c9f58c97b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-12 15:08:46 +00:00
Marco Bubke
e0b7a28333 Clang: Add refactoring project updater
The project parts are now first used by the pch manager and then notified
by the pch manager to the refactoring plugin.

Change-Id: I88074d8891cd0de9721497bbafee0deffc0b6339
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-12 14:32:34 +00:00
Marco Bubke
75c95d4b73 ClangRefactoring: Fix project part id
We used display name which is part of project part id instead of the id
getter.

Change-Id: I97aa343c4380f9eb8c8e6a4400156eeac1f40863
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-12 10:35:12 +00:00
Marco Bubke
0aced361bf Clang: Cleanup symbol indexer
Change-Id: I1a7bcc807bf222ae0d8f622bca512c47489bfb79
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-12 10:34:46 +00:00
Ulf Hermann
2b582ed455 QmlJS: Fix reformatter test
Apparently the reformatting truncates any sequence of multiple empty
lines into one. That seems to be by design. Therefore, remove one of the
two adjacent empty lines from commments.qml. Also, don't invert the
actual and expected values in the test code.

Change-Id: Id87c6fa0b2c7a03884d42d109b7d55f5040a927a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-12 08:09:51 +00:00
Ulf Hermann
88074a4aa8 QmlJSEditor: Remove disabled qmllookup test
This test has been disabled since Qt4 times and is unfixable. In order
to test lookup of QML types, we need to write a new test.

Change-Id: I13909c277d0b9552c158b74529c350cb28fb3794
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 11:59:41 +00:00
Ulf Hermann
51adb199ab QmlJS: Fix and enable remaining pieces of importscheck test
Change-Id: Idaaf19cee1a0a971b9c3bf5ad3371a68ebd81f40
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 11:13:29 +00:00
Ulf Hermann
b6195f3de7 QmlJS: Fix case-fallthrough.qml test
The warning about strange interactions between QtQuick1 and QtQuick2
doesn't exist anymore, and I don't see why it would show up in that case
anyway. QmlJS::StaticAnalysis::Type used to have a member 324, and the
comment references that.

Change-Id: I4f0a256588919a146068b8771954bcabf0468dbc
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-09-11 10:31:31 +00:00
Marco Bubke
3abaf647d0 Add system include path to HeaderPath and merge ProjectPartHeaderPath
System include paths are appended after other includes by the compiler. So
we should set them as system includes and not as normal includes. Otherwise
we change the include order. Headers in system include paths are not
cluttering the screen with unwanted warning and by the way improve
performance too.

ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them.

Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 09:31:32 +00:00
Eike Ziller
eccc24e5c9 Merge "Merge remote-tracking branch 'origin/4.7'" 2018-09-07 13:27:01 +00:00