Commit Graph

4400 Commits

Author SHA1 Message Date
Eike Ziller
d18d7eaef6 Merge remote-tracking branch 'origin/3.6'
Change-Id: I4e1ec4054d7364057c63e63e293a246e64afdddb
2016-01-25 13:21:18 +01:00
Nikolai Kosjar
e79a7d47dc ClangStaticAnalyzer: Tests: Skip if there is no clang in PATH
Change-Id: Ibd082ac26ccd1476148131e2f3a9528f7b0048b9
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-01-22 09:56:50 +00:00
Nikolai Kosjar
c705cfca8c ClangStaticAnalyzer: Move non-plugin tests into tests/auto
Change-Id: I014ef6fd125393b69ec242219c0833efde0c216b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-01-22 09:56:40 +00:00
Robert Loehning
76773763e6 Squish: Update tst_qml_editor to use Qt 5
Change-Id: I1f2c8b9212ab2b1eec07a4587495aaf02d201523
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-21 16:48:00 +00:00
Robert Loehning
62fae6b6c2 Squish: Test clicking on unknown git commit id
Task-number: QTCREATORBUG-15051
Change-Id: I9046fe8279a661a5ba28bd14747a9ee9915c3416
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-21 12:42:25 +00:00
Christian Kandeler
b37884a439 RunExtensions autotest: Fix qbs build.
Change-Id: If5f116261353d9625de26b3c927c6cc6e34e9c39
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-20 13:53:34 +00:00
Robert Loehning
03e5392ac9 Squish: Don't expect parsers to understand invalid C++
Change-Id: Icfe466540b7193c6f55014a68f1399debb0a17c3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-20 10:19:06 +00:00
Tobias Hunger
954569387c Update License according to agreement with Free Qt Foundation
* Update license information in tests directory

Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 16:01:06 +00:00
Eike Ziller
98257617e9 Merge remote-tracking branch 'origin/3.6'
Conflicts:
	src/plugins/clangcodemodel/clangassistproposalmodel.cpp
	src/plugins/clangcodemodel/clangassistproposalmodel.h

Change-Id: Iba30d2f4d95fa0f551afe58890d15f5835dfb715
2016-01-19 16:41:17 +01:00
Nikolai Kosjar
5691156b35 Clang: Fix inserting "::" after namespace
The extra "::" is showed in the tooltip right to the completion list
item, but it was not inserted.

Change-Id: I0ad2b816c56b8e3b5ccf0643f2c1a4f2a20b8818
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-01-19 13:37:10 +00:00
Nikolai Kosjar
2324db9d41 Clang: Fix html code in completion list item
E.g. "dynamic_cast&lt&gt;()" showed up as item.

Let CompletionChunksToTextConverter default to plain text format and
explicitly request HTML where needed.

Change-Id: Iebce85cb888a5bd697ffdce364118b6dc65a435d
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-01-19 13:37:06 +00:00
Nikolai Kosjar
a071e52b94 Clang: Extract duplicate code
Change-Id: I476916f825ab475f77f918127217dfc33eb4f388
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-01-19 13:27:55 +00:00
Nikolai Kosjar
8d6549fa74 Clang: Correct member access operator if possible
1 struct Foo { int member; };
 2 void f(Foo *foo)
 3 {
 4     foo.<REQUEST COMPLETION> // correct '.' to '->' and provide results
 5 }

The preferred approach would be to check if "foo" in line 4 is of
pointer type, but there is no suitable cursor (only CompoundStmt) at
that position since the code is usually not yet parsed and thus invalid.

Thus, just run the completion as is. If there are not any results for a
dot completion, re-run the completion with "." exchanged by "->". This
approach is inherently slower than the preferred approach implemented in
the built-in code model.

The following rare cases are not handled:

 1) Requesting completion after white space:
      Works: foo.<COMPLETE HERE>
      Fails: foo. <COMPLETE HERE>

 2) Opening a file and requesting completion (ctrl+space) without prior
    editing. No editing before triggering completion means that no
    unsaved file is generated on the backend side, which is a
    requirement for the correction.

Task-number: QTCREATORBUG-11581
Change-Id: I6bc8e8594778774ab342755fdb01a8a3e5c52ba0
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-01-19 13:20:35 +00:00
Eike Ziller
6513fc88b3 runAsync: Allow calling member functions
Change-Id: Ide09b5585730fb3dcb4a18718a02a4d8351ef91e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-19 06:07:43 +00:00
Eike Ziller
4b077921e2 runAsync: Allow function references, and non-const parameters.
Change-Id: I258259da7767087a8319d6a4489aa4d6c3b32c6f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-19 06:07:33 +00:00
Eike Ziller
e90ef40336 Add auto tests for Utils::runAsync
Change-Id: I59494d410ec529fd9689c64fea299ada6f6a472b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-01-19 06:07:23 +00:00
Orgad Shaneh
5be49c5187 C++: Match const/volatile/signed/unsigned for FullySpecifiedType
Changing a function signature from const to non-const is not recognized as a
changed, and doesn't trigger the "Apply Function Signature Changes" quickfix.

For example:
void func(Foo &var);
void func(Foo &var) {} // Add const before Foo, quickfix is not triggered

Change-Id: I71ae41765d66df69204abd085fdfcfcb2d605f4c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-15 14:05:22 +00:00
Andre Hartmann
369b1f7f38 Lexer: Support Microsoft suffix (u)i64
MSVC2010 supports all combinations of upper- and lowercase U/I.

Task-number: QTCREATORBUG-15554
Change-Id: I0106e6b5038a62aebe5a6c1eb0467d693befb4b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-12 05:56:50 +00:00
Orgad Shaneh
9e0631ea79 C++: Add a missing newline in CheckSymbols test
Change-Id: I4c6843b5bae06f09e4b3e41eabb1b3e0e9a8b6a2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-11 09:45:08 +00:00
Christian Stenger
b17fbfcd75 Tests: Fix compilation
Introduced with 33ad0f1031.

Change-Id: Icbee16c3e4e771a81e885d3daa3a5386960ecbd8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-07 15:57:18 +00:00
Eike Ziller
ad6c0f9bc6 Merge remote-tracking branch 'origin/3.6'
Change-Id: I8f034f91de04e319dd5ba24b8837f1daca54d918
2016-01-07 11:01:14 +01:00
hjk
7de7eb6bca Debugger: Work on WatchModel performance
Don't instantiate repeating boilerplate item data in some
cases (such as large arrays).

This makes it necessary to access parent WatchItems in
a lot more cases than before and needs another separation of
WatchItem/WatchModel code to keep the dumper autotests
in a functional state.

For a plain std::vector<int> with 1 mio items this reduces
 extraction time from more than 2 minutes to about 3 seconds.

Change-Id: I175c5f6ee90434a6e85342d8bb71bd10a04dd271
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-01-06 09:59:11 +00:00
Robert Loehning
ef39a087c7 Squish: Remove workaround for fixed bug.
This completes the revert of
commit 89d8693107.

Change-Id: I359ce87b0d29dc242c9ee9d7c04e025859ff5b31
Task-number: QTCREATORBUG-15456
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-05 15:36:58 +00:00
hjk
31eb7c203d Debugger: Add dumpers for some of libc++'s std::{set,map,multimap}
At least for simple key/values (int etc)

Change-Id: Ib60017347a9f28f1994f7db78c0607f3fdbfac2e
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-05 15:20:51 +00:00
Robert Loehning
a9ffcbcf89 Squish: Update project tree for qtcreator.qbs
Change-Id: I94ba5523fbbd715e44b228f2936148825ad43c94
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-04 15:46:13 +00:00
Oswald Buddenhagen
5a7d3e78db Merge remote-tracking branch 'origin/3.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: Ifbe181e86c161e082cc9a69a4bc7bd399f34ff47
2016-01-04 14:11:07 +01:00
Orgad Shaneh
e9cffc1b74 Clang: Fix auto-detection of gtest/gmock on debian family
The source files are in /usr/src/g{test,mock}, the includes in /usr/include

They were also swapped.

Change-Id: I2a9ad84f8d29a0873a4e568f4b21a198c70d948c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-04 10:53:50 +00:00
Orgad Shaneh
1e5d6115f0 Clang: Fix GCC 5.3 warnings in unit tests
signed/unsigned comparisons.

Change-Id: I04c7fc82e23736ab07432a09f4063872e4405735
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-04 10:07:39 +00:00
hjk
6a71c63186 Debugger: Make display of QObject names optional
... and switch it off by default. The feature has indeterministic
performance impact and lost quite a bit of its utility since GDB
learned to extract dynamic object types most of the times.

Change-Id: I22cccb03ba67f9ff6ad757bbc06eb372d84bbffe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-17 14:58:23 +00:00
Nikolai Kosjar
c0e1b1581b Clang: Fix displaying template parameters II
...in the function call completion tooltip.

Task-number: QTCREATORBUG-15286
Change-Id: Ie24576f98ee4ba8f954de394f3596093323a2c35
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-16 15:38:36 +00:00
Nikolai Kosjar
4382274ba4 Clang: Fix emphasizing current parameter in function signature tooltip
...when completing function calls.

Task-number: QTCREATORBUG-15108
Change-Id: If55effe117774f3ec5debb03a9c7889981ea27d2
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-16 15:36:47 +00:00
Marco Bubke
18fa35c152 Clang: Fix highlighting for using a namespaced type
using NameSpace::StructInNameSpace;

Task-number: QTCREATORBUG-15271
Change-Id: I17a3ad1e1eed7a820ed7dead5d15a3de760c135f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-16 15:28:27 +00:00
Nikolai Kosjar
86f3194cc1 Clang: Add disabled test ArgumentToUserDefinedIndexOperator
It looks like there is no way to mark a test as expected to fail, so
disable it.

Task-number: QTCREATORBUG-15473
Change-Id: Ic6cb2c00a64cf647cb499492064d451d0dd08075
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-16 15:21:21 +00:00
Marco Bubke
8d6c10b241 Clang: Flatten code completion chunks
Avoid the sub vector for performance reason and use an flag for every
optional argument because there can be no recursion.

Change-Id: Iae1eaa1f164e4129e30358a1719582e5231f0385
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-16 12:16:08 +00:00
Eike Ziller
ff60bf37c9 Merge remote-tracking branch 'origin/3.6'
Change-Id: I8223551aec66539dd8c55262e5000c1621410334
2015-12-15 12:21:58 +01:00
Orgad Shaneh
ebf26ca125 C++: Support negative enum values
Change-Id: I93dac08a62be467918dbc9f72239d34191a81fd6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-15 09:45:26 +00:00
Robert Loehning
ba4fa17a67 Squish: Ignore known issue in clang code model
Change-Id: Ie57bf820fc2aa318ecf16cac0a2f4cb2f0ffe43a
Task-number: QTCREATORBUG-15483
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-10 13:04:50 +00:00
Robert Loehning
8a650b8c23 Squish: Remove workaround for fixed bug
Change-Id: Id639f455b41e3b96d6867dbeb0b7af5c614cffc7
Task-number: QTCREATORBUG-15457
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-10 13:04:17 +00:00
Robert Loehning
b2321e04f1 Squish: Finish update for tst_qml_js_console
Change-Id: I5efd9e93a22beed24e770c2015e7239576be6438
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-10 11:37:56 +00:00
hjk
33651877d8 Move QmlConsole to Debugger
Now it is closer to its only user and possibly reusable for no-QML uses
there.  We also drop the QML/JS syntax checker. The application being
debugged can already tell us about syntax errors. There is no need to
duplicate that functionality.

Change-Id: I2ba151f9f4c854c6119ba5462c21be40bddcebf9
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-09 12:06:26 +00:00
Nikolai Kosjar
0af0bd8e36 Clang: Show type icon for usings/typedefs
...in the completion widget.

Task-number: QTCREATORBUG-15078
Change-Id: I1309b628e1f060fa68bdcf13838037728207b035
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-08 13:05:02 +00:00
Robert Loehning
60e26abca0 Squish: Fix qt4Classes()
Change-Id: I43d8e7f6006c96276f069d95cc35cbbba62fc356
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-08 09:45:36 +00:00
Robert Loehning
ce3edb5621 Tests: Disable testQThread by default
Change-Id: I1ece1bd56a7d2806fa13afeb295fd9c76049e07b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-08 09:45:35 +00:00
Nikolai Kosjar
0985e67858 Clang: Reparse editor document on project change
Change-Id: If7dcdc370fd50fded996df80ab6c893b4ec1ad55
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-07 15:49:33 +00:00
Marco Bubke
d7a0268610 Clang: Show Enumeration as Type
Change-Id: Icb3fbaad68802276faa4a2c50d18c2415e17d26b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-07 15:32:29 +00:00
Robert Loehning
89d8693107 Squish: Work around bugs in tst_cli_output_console
Change-Id: Ief5f731b3ff84dcbd34f4200acbe2646847c0f1c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-07 13:41:20 +00:00
hjk
7c08f5a9b0 Debugger: Further improve base class dumping with LLDB
... in the presence of empty base classes. This now actually makes
the Inheritance dumper test pass.

Change-Id: I92ada5da46accb6e7eaff58ce5dc329484ef0909
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-07 12:38:50 +00:00
Marco Bubke
19d9dc0ce3 Clang: Use line and column instead of offset for diagnostics
Offsets can be get wrong because of the utf8 <-> utf16 differences. Line
and columns are not that sensitive to it.

Change-Id: I2e3e8c000621b6d694a4ada6df176f29427794f5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-07 11:10:05 +00:00
Robert Loehning
a4231de01c Squish: Update tst_qml_editor
Change-Id: I403b64fc60e3d4f1ad0635ce86190ea89ab49de5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-07 10:21:24 +00:00
Robert Loehning
4d4eb4da22 Squish: Remove pointless tabs from tested code
Change-Id: I030aeff529c24730a13087fd9554d1f60a0e7462
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-07 10:20:22 +00:00