Commit Graph

4400 Commits

Author SHA1 Message Date
hjk
db098732f5 Debugger: include <qglobal.h> in tests
Needed to check QT_VERSION later.

Change-Id: If0ee987102ddd3ac737a61a2a5e91825270568c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 13:08:08 +00:00
Francois Ferrand
7b2c09a118 C++: Disable C++ keywords in C files
In some (legacy) C files, new and delete may be used for regular identifier.

There are some limitations:
* Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the
other files in the project.
* QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue.

Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-23 12:35:04 +00:00
hjk
aa1eab65f0 Debugger: Also check value in SSE dumper autotest
This works nowadays.

Change-Id: I7ee85d125308bba7772a55e42ee0e983c300980c
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 05:44:41 +00:00
hjk
bbede15fe0 Debugger: Use shorter QList in automatic dumper test
Easier to handle when reproducing issues manually.

Change-Id: Ide48475fe2c488aabb939564b8e516be58a6fdc3
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-23 05:44:22 +00:00
Eike Ziller
841778ed69 Merge remote-tracking branch 'origin/4.1'
Change-Id: I80f96f100046625f24b6ab5d13fdb05660365abc
2016-08-22 16:30:56 +02:00
Marco Bubke
68aeff4b9f UnitTest: Break the dependency to LLVM
If you have no LLVM installed it was impossible to compile the unit test.
But some unit test don't depend on LLVM. With this change it is now
possible to compile them.

Change-Id: Iac0c1b3cdf6c317e6ba4755acd5f8458db5a7451
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 09:12:56 +00:00
Marco Bubke
d23c4985cb Utils: Fix unittest
Prevent operator selection to be ambiguous.

Change-Id: I1ff0d6aad8fe5ce24b0d1038c1b6121a595800fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 09:12:35 +00:00
Nikolai Kosjar
4372514e6b Clang: Remove unused arguments
Change-Id: I72e6df2e0e5b94addbca79bbca6bf2aa7cff2042
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-08-22 07:02:26 +00:00
Orgad Shaneh
e7eac98c7e C++: Support pretty printing of template enclosing scope
Change-Id: Ib228184e1259585eeac61b9196195c39a9550cb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-19 13:34:44 +00:00
Marco Bubke
678e6e4ddf Clang: Fix CodeCompletionsExtractor test crash
CXCodeComplete_IncludeBriefComments has to used if the translation unit
is using it too. Otherwise an assert is triggered.

Change-Id: Ia252ffd9c440144f21c2354c6885f7ae73de4b29
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-18 13:06:17 +00:00
Ulf Hermann
a8adff6afb Timeline: fix autotest
The emptyChanged() signal was renamed.

Change-Id: I172a9b9a9565bb44460131df7a2982b7eff39bba
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-18 12:05:17 +00:00
Robert Loehning
585cc0703c Squish: Remove unused declaration of global variable
Should have been done in
39103dee4f and
e2adf9b7bb respectively.

Change-Id: I4e16abf8820ed4f1e287505259d71d15e739e996
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-17 13:35:29 +00:00
Christian Stenger
5f5d23c389 Squish: Fix triggering "Recent ..." menu items
These items nowadays have a leading number and colon.

Change-Id: Ib274a7bc601cd06cf7b226f43b011c2b105cc12b
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-08-17 12:22:33 +00:00
Christian Stenger
4144757331 Squish: Fix object properties
Change-Id: I77e90a09e5b2a35618ad92a22b720c77d82c5613
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-08-16 12:50:35 +00:00
Eike Ziller
112bdc0f88 Merge remote-tracking branch 'origin/4.1'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: Id3be48ea1d00fadbec9a56d721688732118aab28
2016-08-15 14:42:47 +02:00
Ulf Hermann
6789f50018 Timeline: Unify TimelineModel's emptyChanged and labelsChanged signals
It doesn't make sense to distinguish between them. When the content
changes, the labels, the number of items, and the "empty" state
change.

Change-Id: I65f77f65828626fd76bfd968abf67b608b6e267b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-15 09:49:43 +00:00
Orgad Shaneh
c9956b9e05 Revert required C++ version to 11
It was bumped to 14 in merge commit 1853f01a, due to a conflict in
unittest.pro which I confused with qtcreator.pri.

Change-Id: I1ec15d9d20d90c38849eea799a724f4c85fe36b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-15 09:45:46 +00:00
Orgad Shaneh
98a0c816f7 Tests: Do not use deprecated Qt algorithms
Change-Id: I3ca177b69df3540729a98d8d3b6287df36a47ea0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-15 07:22:59 +00:00
Christian Stenger
c8e40f5b56 Squish: Adapt to changed Projects view
Change-Id: I9728a04864cdef7ae609f6a983cd92aa3c79e4f5
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-08-12 14:10:14 +00:00
Orgad Shaneh
a6c17fc537 Remove all QT_VERSION_CHECK
We only support Qt 5.6 now.

Change-Id: If94864400545b057623e3af0743c55ea1e84e33b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-12 13:29:58 +00:00
Christian Stenger
991498845a Squish: Fix object properties
Change-Id: I7f19c970cc46f074b76b13633dbc9e57771ed2b4
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-08-12 12:31:25 +00:00
Robert Loehning
68e38b89e3 Squish: Update suite_QMLS
Project template was changed in
b18e084fc0

Change-Id: I89bf518756cd7d7859ffc6e9a56f1aed2e7e435f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-12 10:34:59 +00:00
Robert Loehning
5dd44e0a7b Squish: Update testdata for tst_simple_analyze
Project template was changed in
b18e084fc0

Change-Id: Ib37b1e5c5c30f75bac302d605403755c8f450fbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-12 09:50:02 +00:00
Robert Loehning
aa29fcf1fb Squish: Update tst_SCOM02
Project template was changed in
b18e084fc0

Change-Id: I4959c15a452cf713cad86af10b81376b59b816b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-12 09:49:52 +00:00
Ulf Hermann
51e074b0b7 Timeline: Remove TimelineModel ctor with private object
Change-Id: Ie4e50c08f77cd710f067f1c5e33a1656878e0640
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-11 12:32:19 +00:00
Eike Ziller
c3ee2d06ba Algorithm: Allow sorting container of pointers with member (function)
Change-Id: I2928081750f86b66e969ec2f7ade9e67ce19a825
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-08-09 13:17:43 +00:00
Orgad Shaneh
a23e0692b4 Utils: Introduce sort variants for member and member function
Change-Id: Iff29f2c55a08e85de7f0ff4e431f326e351e5305
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-09 10:51:28 +00:00
Marco Bubke
092df2edaa Clang: Smallstring should not depend on std::ostream
We move the io operators in an extra header file because if we would
include ostream in smallstring.h we would blow the compile time.

Change-Id: Iea61ceedbbbcdd2adc6dc149794dab6e743084f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-08 15:01:53 +00:00
Marco Bubke
f56ec53fa1 Clang: Test for file path RequestSourceLocationsForRenamingMessage
Change-Id: Ia384deb60e644d8894d7c56f81b3deb8b7706c11
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-08 14:19:02 +00:00
Marco Bubke
98a167c0d5 Clang: Fix template renaming
Change-Id: I8040fe8dfc99d66e242ce2ff8589aa914838bfc9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-08 13:50:25 +00:00
Marco Bubke
ec06fd0e84 Clang: Use std::replace instead of std::transform
Change-Id: I60e42577631dee5cf05b1129a49ea36c391e8923
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-08 13:27:38 +00:00
Orgad Shaneh
1853f01a5b Merge remote-tracking branch 'origin/4.1'
Change-Id: Ia442f30f387fe9292217582260bbe79e54608810
2016-08-05 11:40:07 +02:00
Marco Bubke
4cdb5bab15 Clang: Add clang refactoring
Change-Id: I2e3f36f810276da3f8dc7dcc587b06f8edb586d3
GPush-Base: d02f51b48fc752fddcdef6dcb32b3f7f6c0195a3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-04 14:37:19 +00:00
Orgad Shaneh
dddf0d2b3f Tests: Remove Utils dependency in algorithm test
It depends on header-only implementation.

Change-Id: Ib0a1dc92789b2d3e527f1d3cd1a4393f92e161e1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-04 11:27:44 +00:00
Christian Stenger
3e7707148e Tests: Fix missing reference to algorithm test
Change-Id: I7323995c01e1633b4a84fd24b2a3b99d663e5d13
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-08-04 11:27:16 +00:00
Christian Stenger
c87d0d7b58 Squish: Stabilize test for removal of break points
Change-Id: I1fdfc654e18a4cb219624b65e5d812faa479eb66
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-08-03 10:16:48 +00:00
hjk
def8ca8ba1 TreeModel: Move some base TreeItem code out-of-line
Avoid code explosion.

Change-Id: I7d239a4560e90b68cc4991341adf940a98776254
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-03 09:23:46 +00:00
Oswald Buddenhagen
48687c0fa1 adjust to changed QMakeParser API
amends b7706cdfeb.

Change-Id: I83fc5d2b1c660d3c6f9c456b0f54c0fd2d669140
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-03 04:35:46 +00:00
Marco Bubke
0549c6af97 Utils: Add std::string conversion constructor and operator to small string
Change-Id: Ia76d7647fc8d2c9b72bc5bce2e7a6e2c3fcc18cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-02 13:38:23 +00:00
Marco Bubke
390e2d164c Utils: Add iterator constructors to small string
Change-Id: Ib8fcacd5dc520842cf5cee73ea21c021221158ca
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-02 13:38:19 +00:00
Marco Bubke
7610e48716 Utils: Fix smallstring
Change-Id: I681df8c3fd9aa84f14d5d581633894605f56b71a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-02 13:38:14 +00:00
Oswald Buddenhagen
45b854dbd5 enable c++11 really globally
... and remove all instances that became redundant now.
this excludes everything that comes from outside qtc, or looks like it
could "leave" it.

Change-Id: Idc8baad17cd1ffdc5e160ec48ea3292d633a2562
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-02 07:52:38 +00:00
Robert Loehning
81bae84411 Squish: Stabilize tst_simple_analyze
...by giving the Quick app more time to finish.

Change-Id: I788715bcfa0949ee1873295eb869fb4e04fd00b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 16:21:39 +00:00
Orgad Shaneh
35d7352b3e Merge remote-tracking branch 'origin/4.1'
Change-Id: Ie96fa53a88bcd06fa688a579c1d84aaf6f5e905f
2016-07-29 16:13:18 +03:00
Thomas Hartmann
3bd9dbf5b2 QmlDesigner: Adding testproject for directory imports
Change-Id: Ib9f4feb745722dc1e43c6651ed1cfc4a017818e7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-29 12:04:17 +00:00
Nikolai Kosjar
38f72855b6 Clang: Process distinct documents concurrently
Speed ups the typical use cases that can profit from this:
 * Change a header file and switch then to source file
 * Open documents one after the other (Follow Symbol)
 * Change documents visible in splits (e.g. by refactoring action)
 * Restore a session with multiple splits

Fixes the test ClangIpcServer.GetCodeCompletionDependingOnArgumets.

Change-Id: Ia575bd59780df14146dfc091a4d48794e4a0543d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:31 +00:00
Nikolai Kosjar
90f94363db Clang: Extract TranslationUnitCore and (re)parse explicitly
Extract TranslationUnitCore, which is the API for the high-level
operations we need. TranslationUnit does not call any clang_* functions
anymore, except the one needed for disposing the CXTranslationUnit - for
now, we keep TranslationUnit the owner of TranslationUnitCore.

TranslationUnitCore will be passed on to the worker threads.

With this, the current "TranslationUnit" looses its meaning. We will
rename it to "Document" in a follow-up change.

                            ***

TranslationUnit::cxTranslationUnit does not implicitly
creates/parses/reparses anymore. We use more verbose update operations
now.

The test ClangIpcServer.GetCodeCompletionDependingOnArgumets fails now
because of this - CodeCompleter::completeHelper() does not recreate the
translation unit anymore, thus working on the old data.

This will be addressed in a follow-up change.

Change-Id: I6213d6f1609cd3c9a54666c84cb8b623b2fefe1c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:24 +00:00
Nikolai Kosjar
dc734f45fd Clang: Extract TranslationUnitUpdater
...in preparation for concurrent processing of documents.

Parsing and reparsing is handled by TranslationUnit. Since we will do
this in a different thread, extract the core logic into the new class
TranslationUnitUpdater, so that we can prepare the necessary data for
the run and then later incorporate the results of the parse/reparse.

Change-Id: Ic9d936d193ee6795a755f0cfc38c0b2a7bd402cc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:18 +00:00
Nikolai Kosjar
606d41187c Clang: Prepare for multi-threading
* Make the necessary data implicitly shared since it might get
  accessed/modified from two different threads with follow-up changes.
  This applies for UnsavedFiles/UnsavedFile and ProjectPart::arguments().

* Avoid returning references.

Change-Id: I98842c1cb90ae0d344a15c63b72cbc89568722d3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-28 09:42:14 +00:00
Oswald Buddenhagen
034cff4693 Merge remote-tracking branch 'origin/4.0' into 4.1
Change-Id: I71d3064a5f65ec658a7ecf248bdce0a3aeea89f4
2016-07-27 12:45:54 +02:00