Commit Graph

7307 Commits

Author SHA1 Message Date
Ivan Donchevskii
391c68cddc Unit-tests: Fix compilation and failing tests
Change-Id: I061dbd01e3838721e259df619016be1fc66987b0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-11 10:25:47 +00:00
Robert Loehning
e0f8779168 Squish: Update suite_WELP
This is a follow-up to 744279.

Change-Id: I24485972b3a292952c653f2cfab1af198578fcc4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-11 09:25:15 +00:00
Robert Loehning
3bf887c2ad Squish: Update tst_CSUP01
The built-in code model also proposes "void_t".

Change-Id: I2462e47d5b1a69065f998244fc8372011e37a0c8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-09 09:53:55 +00:00
Robert Loehning
6a42d8bd74 Squish: Give code model more time to list refactorings
Change-Id: I944dfa306954cd16fdb24334db6e869702da282f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-09 09:53:44 +00:00
Robert Loehning
417a6db087 Tests: Add lines for testing editing and output of int
Change-Id: If31b5957fa55f5dd31205a0b4495491314fa87c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-03 09:22:08 +00:00
Robert Loehning
9e6fe45ad9 Squish: Fix for Qt 5.11
The items in the treeView look slightly different than
with Qt 5.10 and thus seem to lose the mouseclicks.

Change-Id: Ibee1abdbc9e9bfe622b45f76ed5e612e81fd1770
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-02 09:10:58 +00:00
Christian Stenger
2801372d46 Squish: Fix expected targets for widget app wizard
Reverts cd45ce5f39.

Change-Id: I6865e6c91fd961ac36da160a01c676f5274c40cc
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-29 05:17:55 +00:00
Christian Stenger
3f54c55e58 Squish: Handle more server side issues
If we get correct http responses that point to server side
issues handle them appropriate if possible to let the test
continue instead of crash.

Change-Id: I7d2e8848269600762e9c7fe980414c4f7106433c
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-06-29 05:16:30 +00:00
Christian Stenger
cd45ce5f39 Squish: Remove Qt4 from expected kits for widget application wizard
Change-Id: I747b47a5adb684f9ef3c245427707ead9ffba20a
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-06-26 14:21:19 +00:00
Christian Stenger
922c73ad67 Squish: Add VS2017 as expected compiler on Windows
Change-Id: If68d6a143f4c1f9b96fe7c561977ab481a31ecb4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-06-26 13:20:37 +00:00
Christian Stenger
dfdfff2148 Squish: Fix expected string
Capitalization has changed.

Change-Id: Icbfa295beab27c1cfb2ec1ae6198784f134563a6
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-06-22 10:50:17 +00:00
Robert Loehning
7a14654a2a Squish: Remove workaround for fixed bug
Task-number: QTCREATORBUG-20057
Change-Id: Id308fed4ec83c7aa89b822f00174a1e9ed2a0764
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-19 12:48:20 +00:00
Ulf Hermann
5f9f8f9f16 Tracing: Handle mouse events in FlameGraph QQuickItem
Having an additional MouseArea as child of a ScrollView or a Flickable
is not well defined and leads to inconsistent behavior on different
systems. We can easily catch the relevant events in the FlameGraph item
itself. Also, don't redirect the typeSelected() signals through the
model. They don't belong there.

Change-Id: I77c17977b5a51d57ccd2ef880d3d6c6a604b7f78
Task-number: QTCREATORBUG-20573
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-18 12:35:36 +00:00
Ivan Donchevskii
e1111d4570 Clang: Use built-in follow symbol for virtual methods
ClangCodeModel currently does not provide a list of overrides.
Therefore it makes sense to use ClangCodeModel result for
virtual method only if built-in code model does not find anything.

Task-number: QTCREATORBUG-20584
Change-Id: I5b4fac7974f990e741d3438ab61827670a8ce8d8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-15 12:15:22 +00:00
Orgad Shaneh
18edce07aa UnitTest: Fix build
This amends commit c62daf9cda.

Change-Id: Ia1d574f788f97a3d0bb3a7c6724659c2875e2c81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-12 05:42:19 +00:00
Nikolai Kosjar
cbd4d05423 Clang: Fix processing documents if multiple are opened at once
Reproducable with
 1. $ ./qtcreator a.cpp b.cpp
 2. Switch to a.cpp => no highlighting

Because ClangEditorDocumentProcessor does asynchronous processing, the
backend might receive a DocumentsOpenedMessage where the document is not
the current editor (happens for a.cpp in the example). When switching to
that document, the initial jobs were not processed as the document was
not dirty.

Address this case by also checking for documents that have a revision of
1 and are not dirty. Unify adding the annotations jobs to ensure that
not more than needed are run.

Change-Id: I14030260842f97d58280235e763c8d7490705f8d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-08 06:32:40 +00:00
Robert Loehning
c91dde79d5 Squish: Update object for tst_HELP05
Change-Id: I0a38ed35061000591b8078ef534c2996809aeb58
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-08 05:29:20 +00:00
Robert Loehning
9cb1700993 Squish: Use built-in code model in tst_APTW01
The warnings from ClangCodeModel confuse our build check.

Change-Id: Ic6b82bb304387f447bdf8eb0b2fd02dd2f250fb2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 09:08:47 +00:00
Robert Loehning
35eabd7d40 Squish: Explicitly disable ClangCodeModel for testing built-in
The ClangCodeModel is the default now.

Change-Id: Id432cc9d27dcf7327c0b7efeba7004521d25fee5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 09:08:20 +00:00
Robert Loehning
2fb270c77f Squish: Update tst_simple_analyze
Change-Id: I2cbe39a225760f53d70487e105e2b45fd4e16d33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-04 11:24:10 +00:00
Robert Loehning
149a77a01d Squish: Handle third kit state
Change-Id: I3442cf7676b7f316a60344b9c7dfc2d777529785
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-04 11:23:51 +00:00
Christian Stenger
a926909010 Tests: Fix compile on macOS
Change-Id: Ic987e41c79cae531aa94ded8fa9fa87bce55c936
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-04 10:07:22 +00:00
Nikolai Kosjar
c9a3d2bea1 RunExtensions: Support specifying thread stack size
...with runAsync().

The stack size cannot be changed after starting a thread, so specifying
the stack size with a pool does not make sense. However, starting
with Qt 5.10 a stack size can be specified for the whole thread pool, if
needed.

Change-Id: I09eded606321388c779f762b77de6223081609fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-04 09:56:50 +00:00
Nikolai Kosjar
f01fbcb789 Clang: Clean up some IPC names
This is long overdue since some names were simply wrong and/or
misleading. Also, some of the old names were long enough to almost get
crazy.

The renaming starts from ClangCodeModelServerInterface and
ClangCodeModelClientInterface and affects usages and related functions.

For the ClangCodeModelServerInterface, categorize the messages in
 - messages that require a response (request*)
 - notification messages (the remaining ones)

Change-Id: I5342ed8e0d87404ee72f3c3766fd8ef7505defb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-04 09:54:01 +00:00
Ivan Donchevskii
4e4bd4909a Clang: Use follow symbol result from clang when global fails
When built-in code model fails to follow symbol under cursor
fall back to the clang result even if it only follows
to the decalration.

Change-Id: I22d8c5fee6ab7594b1d1b7ce8104414db28383c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-04 08:48:33 +00:00
Christian Stenger
f1881ac2fc Tests: Fix defining path to sdktool
Replace backslashes with normal slashes as Qt handles them
inside paths correctly itself. Otherwise we might end up
using unknown escape sequences which leads to not executing
anything and a passing test.
Escaping the blanks is not necessary as they are handled
correctly automatically.

Change-Id: Ib1a81949c54d41b7864e30a1371de2e148f96bb8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-04 04:52:27 +00:00
Oswald Buddenhagen
c065ea9326 Merge branch '4.6' into 4.7
Change-Id: Ieddac600af64f3b278340c4e3555cee0f4190bcf
2018-06-01 12:30:28 +02:00
Robert Loehning
2a3bfea8a9 Squish: Update for changed Options dialog
Change-Id: I823e88e80a00079dbf0a2cbdfd72973d44001063
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-01 09:25:16 +00:00
Robert Loehning
c908a52628 Squish: Update to re-uploaded text
This should not expire after another year.

Change-Id: I86ed49d491f619509e6bd32fc2624df2a1c24f5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-29 11:43:58 +00:00
Eike Ziller
c1c57f0c38 Merge remote-tracking branch 'origin/4.6' into 4.7
Change-Id: Ifddceb06f377ea428300fa8a48908cfc44b98705
2018-05-28 16:07:00 +02:00
Nikolai Kosjar
69dec8a9f8 Clang: Create preamble on first parse
...now that parsing and creating the preamble is faster due to the
skipped function bodies.

As a consequence, we can remove all the extra jobs that were needed to
get an initial AST faster.

Change-Id: I79a66b8a0e8a180850af6daf353d9a679089bbb1
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-24 12:33:55 +00:00
Robert Loehning
3fa66ca6e0 Squish: Remove outdated code
Creator requires Qt >= 5.9

Change-Id: If63c12b354d8b89de3f70e8be924428812d3b2bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-24 10:04:48 +00:00
Robert Loehning
e8586c8d12 Squish: Configure Qt Creator projects on Qt 5.10
Task-number: QTCREATORBUG-20056
Change-Id: I0d12747ac9510fbab2cbe1e751d3613608a07053
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-24 10:01:56 +00:00
Ivan Donchevskii
e92b46073e Clang: Fix unit-test failures caused by Clang update
Failing tests:
TokenProcessor.TemplateFunctionCall
TokenProcessor.TemplateClassDeclaration

Do not introduce fatal error in test source file.
Otherwise template function is not recognized anymore.

Such template calls were also broken before but could
provide a valid Cursor kind. So it's a minor regression
in Clang but does not change anything for Qt Creator user.
Bug is reported: https://bugs.llvm.org/show_bug.cgi?id=37550

Change-Id: I788e8d9f88141cfefc6bbde77f36c459d91aff0b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-24 09:44:30 +00:00
Ivan Donchevskii
da2e6b982b Unit tests: Fix undefined behavior in NativeFilePathView tests
Do not counstruct NativeFilePathView from temporary object.

Change-Id: Ifcd6bc4878f6949e98de44089a2c2b3feca4795a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-22 09:23:31 +00:00
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