Commit Graph

5172 Commits

Author SHA1 Message Date
Christian Stenger
8b4dbfb8e1 Debugger: Fix member offsets in QFile
Change-Id: I8d806aabcf2c744165553f087831ce899db24d80
Reviewed-by: hjk <hjk@qt.io>
2018-05-22 08:16:07 +00:00
Nikolai Kosjar
319daa2612 Clang: Require LLVM/Clang >= 6.0.0
Adapt versions and tests, remove code assuming clang < 6.0.

Switch also to our custom repositories instead of dealing with patch
files.

LLVM/Clang 6 was released on 09 Mar 2018.

Task-number: QTCREATORBUG-18535
Task-number: QTCREATORBUG-18552
Change-Id: I0ec2c2f56265e161ae7cbb5b03e7b8a182ba6cc6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-17 12:46:37 +00:00
Eike Ziller
e7123b140e Merge remote-tracking branch 'origin/4.7'
Change-Id: I9d433fa6ce4f60a2acfbdb21da9f727cac8d7526
2018-05-14 09:52:58 +02:00
Eike Ziller
2278ebed1e Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp

Change-Id: I873a2fa112321225e7b478739fc017b01d24ce18
2018-05-14 09:44:43 +02:00
Orgad Shaneh
f615c9aa42 QmlDesigner: Remove outdated Qt version conditions
Change-Id: I7fa3147afbdc07814f8710a44140072e7bbd8511
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-11 12:41:20 +00:00
Nikolai Kosjar
23df884f4a ClangTools: Remove clang static analyzer
...since it's superseded by the tidy integration.

Change-Id: Idafa5e1fb5129b1af8e42231a664684d4b90821f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:17:55 +00:00
Christian Stenger
9c1f47399e Squish: Stabilize selectFromLocator()
Calling it several times inside the same run results in
unexpected behavior. The list of items inside the Locator
gets filled asynchronously, so give it a chance to populate
before trying to click something.

Change-Id: I542a9fda37ae09e98e496d12a40d507a040bb247
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-05-09 08:51:15 +00:00
Robert Loehning
1ac527d8f6 Squish: Don't configure Windows firewall when we don't need to
Task-number: QTCREATORBUG-20316
Change-Id: Ibec253f15a39dc22ab8bd1693eab38b0ab7b44fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-09 08:46:39 +00:00
Nikolai Kosjar
2dde82112e Clang: Fix -Wswitch warning regarding OverloadedOperator
gtest-creator-printing.cpp:493:12: warning: enumeration value
   'OverloadedOperator' not handled in switch [-Wswitch]

Change-Id: Ic28dcbcc402a8f5c0f2bd284cc9b6fd560221208
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-08 11:32:20 +00:00
Robert Loehning
5a54a813d3 Squish: Remove code for querying information about Qt
Task-number: QTCREATORBUG-20337
Change-Id: Ib99d3bb45297b766ac1797a2a364350d96ce0056
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-08 09:06:02 +00:00
Robert Loehning
06c2e69301 Squish: Use Locator instead of menu hack
Change-Id: I4e84a52fb6ad4c93ef53bb1a17639fd8b263b987
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-08 09:05:25 +00:00
Ulf Hermann
734611131d Move Timeline and FlameGraph into a common "Tracing" library
This allows us to share code between the two, in particular the QML code
for the Details window, and the theme code. This way we can potentially
deduplicate some code.

Change-Id: I3a0d26b18488bd2a46b5b077b5b5d79ac2dfc5ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-04 14:08:47 +00:00
Hugo Holgersson
86aab16ea4 TextEditor: Highlight punctuators as Text
This change limits the set of tokens that fall under
Token::isOperator(). That allows cpphighlighter.cpp to
distinguish operator tokens from punctuator tokens
(without changing any logic in cpphighlighter.cpp).

This change moves punctuators from "Operator"
to the "Text" style category where they belong.
Punctuators are not operators. Punctuators are
dumb text tokens.

Why don't we let the clang backend alone separate
these tokens for us?

1. Clang is slow on big files. Sometimes the
   highlighting dictated by clang is painted _seconds_
   after cpphighlighter.cpp runs. CppHighlighter is way
   faster so we use it to "prepaint" code while clang is
   busy in the background.

2. Secondly, clang cannot yet handle all operator types.
   In particular, none if its "operator cursors"
     CXCursor_UnaryOperator:
     CXCursor_BinaryOperator:
     CXCursor_CompoundAssignOperator:
     CXCursor_ConditionalOperator:
   includes the -> and . operators.
   We still need CppHighlighter to paint those tokens.

However, once clang has finished processing the file some
operator tokens will be repainted. We need clang to get
all operators' semantics. In particular, we need clang to
tell us if < is a "smaller than"-operator or part of a
template parameter like set<int>.

Task-number: QTCREATORBUG-19659
Change-Id: I952cb58f7c79134b3281e2a8221425cc1d0ad263
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-03 13:43:16 +00:00
Ivan Donchevskii
ce032552c0 Clang: Support old-style SIGNAL/SLOT macro
Color types and enable Ctrl+click for the functions
and types inside SIGNAL/SLOT macros.

Change-Id: Ic1c0b7372fe9a73c5607b1973d75a6656c75ef0e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-03 13:34:21 +00:00
Eike Ziller
4749a919a6 Merge remote-tracking branch 'origin/4.6'
Change-Id: I9927fdff4c7e73c703757852a3f3cf79444e3cb6
2018-05-02 15:22:16 +02:00
Robert Loehning
c5511de338 Squish: Remove hooking into subprocesses
It worked well but the maintenance burden turned out to be too much.

Task-number: QTCREATORBUG-20055
Change-Id: Ic8663f808c50ca9fb17d52b6bc6c72baf7503358
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-02 09:51:05 +00:00
Hugo Holgersson
142ae0cdf9 Clang: Add semantic C++ operator-token styling
We used to style overloaded operators in the same way
as C++'s built-in operators. There was no way to tell
if a + token would call a operator+() function or not.

Now, if an operator is overloaded (redefined),
we give it the "Overloaded Operator"-mixin so users
can style it differently.

Note: Calls to overloaded 'new' and 'delete' are not
highlighted by "Overloaded Operator". This is because
clang today always maps these to CXCursor_CXXNewExpr
and CXCursor_CXXDeleteExpr with cursor.spelling == ""
(empty string). So there is no (?) quick way for us
to tell if a new/delete-token was overloaded or not.

After follow-ups, follow symbol will work for operator
overload usages in current translation unit.
Commit is appended by Ivan Donchevskii.

Task-number: QTCREATORBUG-19659
Change-Id: I157855d482a61ad2059642a1ee982089fcb7d312
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-30 15:10:12 +00:00
Marco Benelli
9678ea5755 QmlJs: add test for code model
Change-Id: I3e60274dcce578a170e12d44533e6f83e77d448a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-04-27 08:27:03 +00:00
Christian Stenger
4533015c66 Tests: Fix include path
Change-Id: I4e05a306aa5947ef12854186b9d700de31fda170
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-04-27 06:22:34 +00:00
Ivan Donchevskii
219e23332e ClangTools: Add tool that runs clang-tidy and clazy
... over the whole project.
Generate and read serialized files to get diagnostics.

Change-Id: Iafc25fc70443107a040a995efc038aed35102bbf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-26 13:02:19 +00:00
Eike Ziller
c1bfc9d0a4 Merge "Merge remote-tracking branch 'origin/4.6'" 2018-04-26 12:28:00 +00:00
Ivan Donchevskii
7b2774dea1 Clang: Use current TranslationUnit follow symbol based on clang code model
It might be quite a safe replacement which can fix builtin
code model issues.

If clang code model fails to follow symbol or does not find
a definition when it's required we fall back to the built-in
code model to proceed with project-wide follow symbol.

To make it almost a full replacement tweak include paths underline
on cursor hover to match what we have in built-in code model.

SIGNAL/SLOTS macros are not yet supported but can be handled
in follow up patch.

Task-number: QTCREATORBUG-19477
Change-Id: Id1611511d661a8aaf3e93502b4e03e1792c7c1d3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-26 10:27:42 +00:00
Eike Ziller
62050437c3 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp

Change-Id: Ia723411f4b5c9c90f9786223ac6a7346d7ab9b99
2018-04-26 10:16:32 +02:00
Robert Loehning
da47a92611 Squish: Update Options dialog
Change-Id: Id0133ac1a52ae46add284252fe024075a79575c8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-24 08:56:14 +00:00
Ivan Donchevskii
ef660d8bd0 Clang: Simplify name and type in FullTokenInfo for functions
Take Cursor displayName instead of token name.
From now on type spelling can serve the return type
role for functions because together with 'token' member
they form the full type.

Change-Id: Ic8eec533f4a11458f99f070b6a6aa80714097b4d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-23 07:59:40 +00:00
Robert Loehning
1e31683b7d Squish: Update expected tree after removing WebEngine
Change-Id: I097dce55361027acc459070ac750610ec80fa6c9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-20 12:27:44 +00:00
Robert Loehning
db9922a5bf Squish: Fix expected compile error message
Change-Id: I37d9ea1cdbe21151f8f06cb53851143bbd2c3d6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-20 08:45:49 +00:00
Robert Loehning
64b6cb88b0 Squish: Flip bool to its correct meaning
Change-Id: I8de704ca3086789a7c8bcb787e678ba10c42ca9d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-20 08:45:31 +00:00
Robert Loehning
038e214f90 Squish: Fix timing issue in tst_HELP04
Change-Id: Ib69429f9288fb767186c61e913a29fc75ddc4498
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-20 08:44:07 +00:00
Robert Loehning
356a2fd855 Squish: Update tst_HELP04 for current Qt versions
Change-Id: I944f824807d47bcfaf9cabd2b15b678d858db15f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-19 14:06:34 +00:00
Robert Loehning
0e216fda3e Squish: Don't expect WebEngine or WebKit
Change-Id: Ib44d0c7671b016c27e33ffd66e4797be37523ca3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-19 14:06:03 +00:00
Robert Loehning
d57ab7f6b9 Squish: Update tst_HELP04 for hidden "Search" button
Task-number: QTCREATORBUG-20295
Change-Id: Idada7f86088946ecddd69c0ac10656c202d4f566
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-19 11:36:45 +00:00
Eike Ziller
7099f21586 Merge remote-tracking branch 'origin/4.6'
Change-Id: I959428882b9da427c6bf522145646048141888c6
2018-04-19 09:25:04 +02:00
Christian Stenger
cc0c7f2ccd Squish: Fix provided test settings for macOS
Change-Id: Idec36e178d448015efa6d0ff73a4d17eba6ba76e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-04-18 11:57:20 +00:00
Robert Loehning
bb0358cc68 Squish: Add expected error message for MSVC2015
Change-Id: Id1ace17486af21c4c0786859178c3a82d6e05145
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-18 05:49:28 +00:00
Ulf Hermann
780d4c6a43 Timeline: Move modelId generation into aggregator
The way the notes model works requires every timeline model to have a
different ID. Conversely no other kind of model actually needs an ID.
Therefore it makes sense to have the TimelineModelAggregator manage the
IDs as every timeline model will sooner or later be associated with an
aggregator.

Change-Id: Ib8b2c88ed883351d4e3e156dd13e1dd113c21808
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-17 14:11:51 +00:00
Robert Loehning
3eeaf965e8 Squish: Fix property name in tst_WELP03
Squish 6.2 still accepts both property
names but Squish 6.3 is more strict.

Change-Id: I390af974425242d1f766853b80870dcb1948ef92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-17 11:57:39 +00:00
Christian Stenger
d21c508b0a Squish: Remove dead code
Change-Id: Ic24c9db0b923409026d92b87b246694dde8968db
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-04-17 11:52:48 +00:00
Eike Ziller
185fe0c705 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/android/androidrunnable.h
	src/plugins/android/androidrunner.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunconfiguration.cpp
	src/plugins/qmakeprojectmanager/qmakeproject.cpp
	src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp

Change-Id: I68093d44cfd672347eab82459ff70c21a32297ce
2018-04-17 10:09:35 +02:00
Christian Stenger
8771054060 Squish: Check also for expected clang on macOS
Change-Id: I32d7f5ebf02a559ca854553536874c6ec68f0ec5
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-04-17 04:55:48 +00:00
Robert Loehning
fdc4ac41d9 Squish: Replace Qt 5.3 kit with Qt 5.10
This patch just changes the minimum for replacing the kits while
keeping the tests running. Further updates to the tests should
be done in separate patches.

Task-number: QTCREATORBUG-19440
Change-Id: I25ce60ad0a47678dba4352a4b2601ca1cdd4741d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-16 14:15:11 +00:00
Ivan Donchevskii
e9c462391e ClangTools: Split generic part from static analyzer tool
To reuse it for other clang-based tools.

Change-Id: I6c0d8e9eee543fa08faf3bf93c9fac33e43c6820
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-13 12:34:53 +00:00
Robert Loehning
6a62717271 Squish: Update tst_designer_goto_slot for Qt>=5.10
Change-Id: I29b3788f2daed5ca27069cc8ab9d972bdcee3c02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-13 11:44:42 +00:00
Eike Ziller
428fcb476b Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/libs/utils/settingsaccessor.cpp
	src/plugins/autotest/autotestplugin.cpp
	src/plugins/git/gitclient.cpp
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qbsprojectmanager/qbsrunconfiguration.h

Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
2018-04-13 10:54:42 +02:00
Marco Bubke
438b5736d5 UnitTests: fix spelling
Change-Id: Ib6a94c0fac5fe6ead62a440dbe8c6368cfd7dd57
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-12 14:38:51 +00:00
Marco Bubke
4b0bcbdcb6 Clang: Locator filter for the symbol database
There are no symbol queries for the locator filters. The signature
generation is still not implemented but for simple cases it should work.

Change-Id: Ic6b04fbe1e7e057892f194ac139615c47d6ec33f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-12 13:12:24 +00:00
Marco Bubke
ee85cf4518 Clang: Store the symbol kind in the database
It is cleaning up some other stuff too.

Change-Id: I75274356fd35f2ee8c84aedf8839c67506ab2355
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-12 13:12:08 +00:00
Marco Bubke
b0fd6c30ce Clang: Distinguish between Enum and Records
Creator is distinguishing enumerations and records, so we should do too.

Change-Id: I114cfd207464abd9afd96c26c7504cf8a3a1cb8c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-12 13:11:51 +00:00
Ivan Donchevskii
f9d95c9205 Clang: Optimize clang overview model
Build the tree in only one loop.

clangbackend generates tokens almost as fast as it
did before (about 10% slower in general).
Broken documents are more affected and take much more
time (about 300%) but it's better to have this time spent
on backend side then in QtC itself.

Task-number: QTCREATORBUG-20205
Change-Id: I34c58bca30c4494005a029abd82c7e612ecd6fb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-12 09:15:12 +00:00
Ivan Donchevskii
84b983617f Clang: Support anonymous types in tokens
Add extra data to Keyword tokens.
Does not affect highlighting.

Change-Id: I206499ea35ee4ece5fe442665c904090cf5d90fc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-12 06:51:07 +00:00