Commit Graph

5172 Commits

Author SHA1 Message Date
hjk
88fd4043d8 Valgrind: Merge MemCheckRunner and ValgrindRunner base
It's mostly the xml/log handling, which can be re-used in other tools.

The change is purely mechanical, including some style fixes and
some modernization.

Change-Id: I6b44ae71451e8d3e26df40b9af9b4ec70038a92d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-23 09:41:28 +00:00
Christian Stenger
bd259129b5 Tests: Fix compile
Broke with 4e96f2ce.

Change-Id: I7c467cc92cc8444bd3b1ef41eebff089668a0f31
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-21 13:34:36 +00:00
Orgad Shaneh
687466ac47 Merge remote-tracking branch 'origin/4.3'
Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
2017-06-20 11:32:02 +03:00
Nikolai Kosjar
4a6057357b Clang: Do not gray out e.g. #endif
Task-number: QTCREATORBUG-18389
Change-Id: I8b0067f3860a0e0e09360da5989011e69adddce0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-19 13:27:00 +00:00
Nikolai Kosjar
b869f02f72 Clang: Introduce headers for client/server messages
This reduces the overhead when a new message needs to be added.

Change-Id: I5bb2833af2f06f2a8e101cfb03f75ffc2927bf68
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-19 11:08:39 +00:00
hjk
b129cebccc Debugger: Fix manual splitting of complex template parameter types
Parsing has to stop at the first < (coming from the end).
foo::span<int>::bar<double> has a parameter 'double', not 'intdouble'.

Change-Id: Ied142d5e75a7587d6c0efd3b51608b199b999e93
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 09:24:38 +00:00
Nikolai Kosjar
1623af0da5 Clang: Add a disabled test for highlighting
In the example below, "var" is highlighted as a function, but it should
be highlighted as a local variable.

  struct OtherOperator { void operator()(int); };
  void g(OtherOperator o, int var)
  {
      o(var);
  }

This is due to a libclang bug.

Change-Id: I7c9fcad6f16c25191d31fc330e969ebd282d4869
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-16 06:09:19 +00:00
Nikolai Kosjar
cde8738269 Clang: Remove pointless call in tests
It was added only for debugging.

Change-Id: I7ea80d8d472f319cdcac548d3abf602e0f304fc9
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-16 06:08:58 +00:00
Robert Loehning
8016c56268 Squish: Stabilize tst_generic_highlighter
Starting a download while another is still running will open
a message box which causes an error when trying to click.

Change-Id: I4f26e07ba70181d009dfa71318783725adad3227
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-15 13:09:58 +00:00
Nikolai Kosjar
a570614f3c Clang: Fix test file name
Change-Id: I27b25e4b8521aabab804812c4cc27cd41c23b46e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-15 08:00:34 +00:00
Nikolai Kosjar
f9f10a1e32 Clang: Fix conversion warning in tests
mock-matchers.h:204:60: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
   bool operator()(const A& a, const B& b) const { return a == b; }
                                                             ~~^~~~

Change-Id: I58883118e1eb42f2e0129b760cdce07daf4ac8d3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2017-06-14 14:16:12 +00:00
Marco Bubke
ae485ac551 Clang: Return ClangString instead of Utf8String
Utf8String is allocating memory but for many compares it is not needed.
In an inner loop this can be expensive.

Change-Id: I6320823ab7e086008447eea255e52859a7faaad7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 14:04:49 +00:00
Ivan Donchevskii
33a2288c7d Clang: Fix extra space before left paren
Do not add space before left paren in function
because it must not be there

Task-number: QTCREATORBUG-14878
Change-Id: I0fd0e650aeeee59af7bbc157c2fae652109763bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 13:06:47 +00:00
Nikolai Kosjar
ca72c29462 Clang: Provide highlighting for identifier under cursor
Change-Id: I80ffe23cbcc84ab7323124581d9dd6afbe974fd0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:49:05 +00:00
Nikolai Kosjar
cd6bd3c4d8 Clang: Move completion test
Change-Id: I61cd72c131407415732ed1231a4614be57c1454b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 12:24:52 +00:00
Nikolai Kosjar
de5cbacae5 Clang: Rename JobRequest::Requirements to ExpirationsReasons
...to avoid ambiguity in regard to a new enum in a follow-up change.

Change-Id: I4f732b5200ed674b6708510ac8de0a795afe52da
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 11:48:54 +00:00
Marco Bubke
43d6726c70 Clang: Add equal operators for ClangString
Converting them in a Utf8String in an inner loop can be quite heavy.

Change-Id: I4f2ccde47a6e3ca08ed054462eb7772ded9e55c9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 10:14:07 +00:00
Nikolai Kosjar
e6bf399003 Clang: Stop highlighting keywords in preprocessor directives
Task-number: QTCREATORBUG-15516
Change-Id: I30046ae7c1a73144985639800227012bf5a4e357
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-06-14 10:00:02 +00:00
Robert Loehning
6c6c4c72c6 Squish: Add expected project tree for cmake >= 3.7
Change-Id: I5a47e5c3da4bfd9db531957212b0f29815b1eb1a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-12 12:16:40 +00:00
Orgad Shaneh
a9145e67ba Debugger: Prettify values for enum bitfields
Change-Id: I55329bba1864c9ebbbcb3b3bf1b940346507f8cd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-12 10:40:46 +00:00
Orgad Shaneh
6b0e1bc5f8 Merge remote-tracking branch 'origin/4.3' into master
Change-Id: I83af635dcac98e4fd78b21d8dd9dc3a27a4fdf94
2017-06-12 10:01:16 +03:00
Robert Loehning
78ab3c61f5 Squish: Don't try building with cmake < 3.7
Task-number: QTCREATORBUG-18290
Change-Id: I5b14d781e7e5382605d7e931d0461efa1b317397
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-09 10:18:34 +00:00
Ivan Donchevskii
9a0eca15c5 Clang: fix completion after forward-declared class
Do not complete -> and . with global completions if
foo is a ptr/ref to forward-declared class.

Change-Id: I41e6745ffb07be1d973fe6a8132824f1b3bf7fb1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-09 07:05:25 +00:00
Ivan Donchevskii
78db7d7ed2 Clang: turn off delayed template parsing
Fix templates highlight and completion on Windows
Add UI to turn on/off delayed parsing (off by default)

Task-number: QTCREATORBUG-17222
Change-Id: I0cd5e0bcfff2789cd938e4096829f777ff15957a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-08 10:53:31 +00:00
Robert Loehning
7a068e494e Squish: Update speedcrunch's tree in tst_openqt_creator
Change-Id: I8f834a807f2dd10bed87829bf41c02e40913cd74
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-08 10:48:29 +00:00
Robert Loehning
600dd3a585 Squish: Update expected project trees when opening qtcreator
- Update Creator's sources to v4.2.2
- Update project trees to what Creator 4.3 shows

If needed, two separate changes are in codereview.

Change-Id: I16ee341653c8b916b15208f16699c0d4cbf6df05
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-07 13:27:24 +00:00
Robert Loehning
feaff29b78 Squish: Use cdb with Creator's bitness
Normal builds of Creator can only use cdb with the same bitness.
In the official packages this is being solved by sharing
qtcreatorcdbextXX between 32- and 64-bit builds.

Change-Id: Ib31e4d71789065bef908bf13569de4284ae20de9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-07 10:20:57 +00:00
Orgad Shaneh
89057b552b Merge remote-tracking branch 'origin/4.3'
Change-Id: I56004e3ec9dc9d92d33bdae438c4f7e069eccc45
2017-06-02 15:13:51 +03:00
Nikolai Kosjar
a3a62e78f7 Clang: Fix highlighting of function in using declaration
Change-Id: I0f646ce22cdc95e5932650a3fb2fe34b8d4a89a3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-01 13:33:07 +00:00
Nikolai Kosjar
e6c8fbfd92 Clang: Fix highlighting for partial specialization
Change-Id: I53f6a87064d45a3a68394d1b3bc0d767b91a9d11
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-06-01 13:33:00 +00:00
Robert Loehning
84907a7d65 Squish: Fix __handeColorTips__ for Qt >= 5.8
Explicitly selecting the right overloading for setNamedColor

Change-Id: Id5aad47ec84b672d70f393456054d4cd779b7a21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 09:09:36 +00:00
Robert Loehning
5ceb390b60 Squish: Update window title
Change-Id: Idff71e0d250b31436a59e10c6ab00f7d459ab89d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 09:09:17 +00:00
David Schulz
2e203e868f Debugger: fix regex matching local enum type in dumper test
Change-Id: I2a0002be23bca2d0dc29273428772b38189f18d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 05:33:39 +00:00
Orgad Shaneh
ac2b2d6139 Debugger: Add a test for enum bitfield
Change-Id: I5e11dd39941b5b4fe7d27e329b5268a23e7a72b1
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-31 18:13:05 +00:00
hjk
c34ff88c5a Debugger: Add an auto test for typedefs with unnamed enums
Change-Id: I7ed68c954265d4f25aec98d2d833df01a9ef9153
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-30 10:38:02 +00:00
David Schulz
2317d06a80 Debugger: Add DumperOptions to the cdb fetch command
Change-Id: Ibe05f82997b57cfffb26bfb5c67681be24419139
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-30 08:40:33 +00:00
Orgad Shaneh
8430da3bf7 Merge remote-tracking branch 'origin/4.3' into master
Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
2017-05-23 23:41:40 +03:00
Nikolai Kosjar
1a9808d393 Clang: Remove unused functions
Change-Id: I66e990dfce5196da48cdf158cf7e5a4050565670
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 10:52:41 +00:00
Eike Ziller
db11c01df8 Clang: Fix highlighting of primitive types
libClang categorizes these as keywords, so we need to check
if a keyword is actually a primitive type, and use that.

Task-number: QTCREATORBUG-17867
Change-Id: I354bb0422505ed7732a0799d9c86d3acfdeb0785
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-05-23 08:41:42 +00:00
Eike Ziller
f51fbd68e1 SyntaxHighligher: Remove the need to specify format for spaces
It has all means to know itself.

Change-Id: I464c195c5ee47e5fc58414a280c166e4a332c588
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 08:34:53 +00:00
Eike Ziller
cf57965ebc Simplify text format handling in syntax highlighters
Pass the mapping from custom enum to text style in form of a function,
which then can use a switch which is checked by compilers, and
avoids the need to lookup a different enum somewhere else to find
out what the mapping actually is.
That mapping is cached to keep performance as before.

Also, most highlighters created an enum just for the purpose of mapping
to text styles, basically creating duplicated subsets of text style like
enums everywhere. Instead provide a default, identity mapping from text
styles to text styles.

Change-Id: I2ea1ca702b99e36b8742dfda510b1b2753f0a1c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 07:47:22 +00:00
Eike Ziller
4e35cc2ea8 Fix that raw string literals that close on same line were not terminated
With the built-in model, which affects basic highlighting.

Task-number: QTCREATORBUG-17720
Change-Id: I7369d7288d9c2c8e5ef36fc27549121014527e58
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-05-19 13:50:42 +00:00
Robert Loehning
ae4be183fd Squish: Tune tst_codepasting to working cases
Change-Id: Iaa7ebcbc20f096d1776be13c62978d6851707d39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-18 12:35:42 +00:00
Robert Loehning
d9e1c77c01 Squish: Shorten object names
Change-Id: Ic57dce86bccae23a2edeee42207a872793feffa0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-18 12:26:18 +00:00
Orgad Shaneh
6d6c0c81ed Tests: Minor cleanup in debugger/simple_test_app
* Replace double casts with ll suffix, which resolves the warning.
* Replace recurring shifts by using a local variable.

Change-Id: I344fab50619dc27e68a151abb2f3061543c36662
Reviewed-by: hjk <hjk@qt.io>
2017-05-16 14:18:49 +00:00
hjk
99ac955664 Debugger: Fix display of pointers as arrays
Task-number: QTCREATORBUG-18204
Task-number: QTCREATORBUG-17803
Change-Id: I4efe359c206b53ef773127cf29107d3cce720819
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-16 11:55:58 +00:00
Eike Ziller
83b8c8fc15 Reduce CPU load of test parsing
Use a thread pool with reduced max thread count.

Task-number: QTCREATORBUG-18185
Change-Id: I18bd3de82365edaf21d8dcf9c89035da1ac74756
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-16 10:46:13 +00:00
Eike Ziller
64b19af7dd Merge remote-tracking branch 'origin/4.3'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6d89ea588de955f5d878500b59285d3adde6c77d
2017-05-15 15:31:55 +02:00
Robert Loehning
47198b44e4 Squish: Exclude HTML when reading version from dialog
Change-Id: I2e73a27aaa3b8c28cdce93576a8cdfc861e37b8d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-12 11:30:14 +00:00
Nikolai Kosjar
64ec695566 Clang: Show function signature hint for constructors and functors
For "foo(|" [1] we requested a completion from libclang with the cursor
position just before "foo" and then filtered the function declarations
for functions matching the name "foo". This worked fine for ordinary
functions, but obviously not for constructors and functors.

Recent versions of libclang support proper function call completion with
XCursor_OverloadCandidate, so make use of that.

[1] '|' represents the cursor position

Task-number: QTCREATORBUG-14882
Task-number: QTCREATORBUG-14884
Change-Id: I9d31b3960ccff6a8b9440dbcb7ff9f5ca9f61266
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 11:54:09 +00:00