Commit Graph

8014 Commits

Author SHA1 Message Date
Marco Bubke
b196368785 Clang: Add disabled test case for HighlightingMarks
Constructors are not recognized by libClang as callable expressions.

Task-number: QTCREATORBUG-17101
Change-Id: I40eb46c07475e3b2e48bc8117de073732005f8b9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-23 14:47:33 +00:00
Tim Jenssen
6fe90532dc Utils: Add offset to search results
Offset are better to compute the length of a text range. The only problem
is that we get them for utf8 because that is the text representation of
source file. QTextDocument is Utf16 based, so it can not binary represent
the source file. Actually I do not see a simple performing workaround for
it.

Change-Id: Id615e1ee6a6e85c6ecc4f8044e275142409d9b46
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:33:34 +00:00
Tim Jenssen
7f757884c5 Clang: Extend clang query
It's a first step to introduce clang query.

Change-Id: I4d001a8883f56066765ce6bc561fa3f49611c0a4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 12:16:04 +00:00
Nikolai Kosjar
c4d9f6ac3f Clang: Fix updating dependencies
...if the registered document comes with unsaved content.

This can easily happen if the document is opened and modified by a
refactoring action.

Task-number: QTCREATORBUG-17295
Change-Id: I3a95fb495b6122248ceaa80985e838851ba2c0e5
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-23 11:50:44 +00:00
hjk
e9f0f37070 Debugger: Robustify QRegExp dumper
The capturesTexts cache may or may not be warm, and
we may or may not be able to warm it. Make the dumper
work in as much cases as possible.

Change-Id: I9d9e0ec0c6a1bcf7288352c2834fedd42071d068
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-23 11:23:04 +00:00
Robert Loehning
4e947e713b QmlDesigner: Add warning about expected error to testfile
Change-Id: Idb6d26f01e1a4be70fa30ec8175b6b4e509bbaf7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2016-11-23 07:31:30 +00:00
Robert Loehning
7fb9108489 QmlDesigner: Fix ambiguous ids
Change-Id: I28b0dc2ff0fa919ca99c468c9648ab105c7e38c5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2016-11-23 07:31:20 +00:00
hjk
584a8c2afe Debugger: Remove some old and unused test code
The functionality tested is used in other tested places.

Change-Id: I62883e81dab9f26ac63e1f45f039571ca1f6a32e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 13:44:20 +00:00
Orgad Shaneh
6d1d1a4416 Merge remote-tracking branch 'origin/4.2'
Change-Id: I957c22020fbacb2f631220b0cdc7fa16a782798b
2016-11-21 10:25:45 +02:00
hjk
ba87a5dace Debugger: Make QFiniteStack dumper work on macOS
qfinitestack_p.h is not self-contained, #include <stdlib.h>
manually to get access to malloc().

Change-Id: I628e5e2a872d361bb7b246ec7333efb3c94dae98
Reviewed-by: hjk <hjk@qt.io>
2016-11-18 16:30:30 +00:00
hjk
96b907a1e8 Debugger: Fix QFiniteStack dumper and add missing auto test
Change-Id: If5f242f8d5184a0f2c62f6211f2ba89cda0cac07
Reviewed-by: hjk <hjk@qt.io>
2016-11-18 13:32:05 +00:00
Nikolai Kosjar
da54b1e6a9 Clang: Tests: Fix compilation
refactoringclient-test.cpp:126:76: error: no matching function for call to
'ClangRefactoring::RefactoringCompilerOptionsBuilder::build(CppTools::ProjectPart*,
CppTools::ProjectFile::Kind&)'

Broke with:

    commit 36d4d01cd3
    Clang: Take precompiled headers into account when parsing source files

Change-Id: I7c5a2edec0859584ea2b33e144178060788cd4d9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-11-17 15:35:22 +00:00
Marco Bubke
19a00f418f Utils: Add const reverse iterators to SmallString
Change-Id: Iefd9d6abafbe38dcb7d3ed9ea200ac3244902433
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 15:06:46 +00:00
Marco Bubke
8a16151601 UnitTests: Add QByteArray printer
Change-Id: I1461db8b5337e6e6aa387edc4da72ca3379d8b73
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 15:06:31 +00:00
Eike Ziller
4026864f38 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	src/plugins/clangrefactoring/refactoringengine.cpp
	src/tools/clangrefactoringbackend/source/symbolfinder.cpp

Change-Id: I7c1c87f3b8ade43a07f6668565501042e967fa8b
2016-11-16 16:04:59 +01:00
hjk
82818cb90b Debugger: Improve QAtomicPointer dumper
More compact display and arbitrary inner types.

Change-Id: I68bc1f5cc88f51e993e6e8a91556d9d745a2574a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-16 13:34:04 +00:00
hjk
f0115b6664 Debugger: Disable some of the LLDB inheritance dumper
Both LLDB 3.8/Linux and 360.x/Mac cannot display the contents
of a virtual base class when accessed to a 'secondary' path.
The problem is with LLDB itself, so don't expect Creator tests
to pass in those cases.

Change-Id: I25b005d66fa9f64766a4cc0aaaa2c865b6df8c5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-16 10:05:42 +00:00
hjk
5b058ebb34 Debugger: Make QRegExp dumper test pass on Mac
We need DYLD_IMAGE_SUFFIX=_debug for the captures()
cache warming call to succeed even if the actual access
is by offset only.

Change-Id: I24a90b4c4187459904f14a664b992a5bba9a20eb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-16 08:37:18 +00:00
Tim Jenssen
9c7ff5199f Clang: Add clang query
Clang query is mechanism to use AST matcher to search for code. Think
about regular expression but in the context of AST. So you get a semantic
search tool for C++.

Change-Id: I72e882c5b53a0c52f352a3664847c4c3e4f6fc2e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-15 15:30:33 +00:00
Eike Ziller
37076e8c33 Reduce thread priority for test parsing
Adding API for that to the parallel map/reduce functions

Change-Id: Ic7987d899c124dcb04c1ca110b09fc97576873fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-15 15:00:18 +00:00
hjk
8f2f614f22 Debugger: Force #include <boost/version.hpp> in boost dumper tests
We might end up with undefined boost version otherwise.

Change-Id: Ibcdc70cbce8aad42947ce4760df0208d5ebe83f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-14 11:15:04 +00:00
Kai Koehne
e5becbdfb9 Replace WIN32 define with _WIN32
Only MinGW gcc defines WIN32, MSVC compiler does not. It's
also defined by qmake (msvc-desktop.conf), but not by qbs ...

Let's just use _WIN32, that's defined everywhere.

Change-Id: I8342a70498be54a965dcf7fae63eaf406aaa3c04
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-14 10:36:31 +00:00
Orgad Shaneh
9c09ca9e42 Merge remote-tracking branch 'origin/4.2'
Change-Id: Ia98031eb87f1859c3736faa0cdd8b655e8a50689
2016-11-14 11:17:13 +02:00
Christian Stenger
be9c7d6929 Squish: Fix triggering items listed under "Recent Files"
UI has changed again, so adapt the test to reflect this.

Change-Id: I5d6bcf2b48b8b625f6086f5a1101041a73d7e329
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-11-14 06:53:31 +00:00
Christian Stenger
701ccc5e3b Squish: Fix property of projects kit view
Change-Id: If36d2b0879cf8c8276d68e5a1f1425b6f47fc5dd
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-11-11 16:33:01 +00:00
Christian Stenger
43b376a738 Squish: Handle wizard check for Quick Controls 2 Application
This wizard needs a Qt5.7 which we are not providing yet.

Change-Id: I03ba5c86835de40a44530753502f87a46554d6b3
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-11-11 11:31:49 +00:00
hjk
9040c4081e Debugger: Use less GDB inferior calls in normal field extraction
They are not usable in core files.

Change-Id: I2134b61f27c27862c12a679d0acf7bebc9fcc7a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2016-11-10 16:20:37 +00:00
Ulf Hermann
a5e11066ab Timeline: Fix tests involving TimelineModel::color()
Change-Id: Id2043721f99b67d986829b60ea604e0b1b3c7458
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-10 08:55:23 +00:00
hjk
77bd581f49 Debugger: Re-enable access to dumper.Value by integral index
Task-number: QTCREATORBUG-17220
Change-Id: I63632a90e2518151b3bf20b1241c24f9808ec39c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-10 07:02:58 +00:00
Christian Stenger
9b09bf62bd Squish: Fix tst_default_settings
QC now supports C compilers as well, adjust the test to reflect this.

Change-Id: I20f2264b31c1f21384b463beccbc27ab1073083c
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-11-07 10:12:52 +00:00
hjk
5276f35ae3 Debugger: Move base class numbering to generic code
Change-Id: I046a587f9fbf2a6345f3c0432a1b5937069a9304
Reviewed-by: hjk <hjk@qt.io>
2016-11-04 20:47:09 +00:00
Orgad Shaneh
410211e090 Merge remote-tracking branch 'origin/4.2'
Change-Id: Ibb932efece05a5f5613823fbc79c5b7601c73905
2016-11-02 16:52:58 +02:00
hjk
8bf8b5f61f Debugger: Make dumpers work for Qt 4 again
Change-Id: I78ac75161508eb6889d1a8a5d04df2860804b907
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-02 13:01:47 +00:00
Tim Jenssen
7b70c30750 Utils: fix that utils can be used in tests
Change-Id: I1f530f3f63e22719de6faed7f55c66282d4044e8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-11-02 12:25:20 +00:00
Orgad Shaneh
2ef3a44fdc Revert "Tests: add utils dependency"
It breaks compilation (at least on linux).

Anyway, HostOsInfo::isWindowsHost is header-only, and should not require
this dependency.

This reverts commit e3a2f3c796.

Change-Id: I8bd86d978742bdb7db3d9f8d429a4803be22a779
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-02 11:16:33 +00:00
David Schulz
15de32d1cd Debugger: Replace "__int64" with "int64" when looking up types
Change-Id: I110dc294cbe414b770166d9574f53812113d9821
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-02 09:43:35 +00:00
Oswald Buddenhagen
424639ecac make resource file handling able to deal with QMakeProject's VFS
resources.prf may create virtual qrc files when RESOURCES contains
non-qrc files.

Change-Id: If591de9b32b775059d67e94bc3cb06d23ee44b08
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:34:55 +00:00
Oswald Buddenhagen
1589ce3ce8 chuck sysroot handling out of ProFileEvaluator
qmake doesn't do anything with sysroots at this level, so this code
plain does not belong here.

sysrootification is used when resolving INCLUDEPATH, which is emulating
compiler behavior. this is done by higher-level code.

Task-number: QTCREATORBUG-11944
Change-Id: Ia25f0b6ef713e9809d974e3f3e49ba308b8c933f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:34:29 +00:00
hjk
8c9856d3d1 Debugger: Make rvalue dumper pass
Depending on whether DWARF-2 or DWARF-4 is used, compilers encode
rvalue references as lvalue reference or rvalue references.

GDB doesn't understand rvalues, and there's no workaround, so restrict
the test to compiler version that use DWARF-2 by default.
(see https://sourceware.org/bugzilla/show_bug.cgi?id=14441)

Change-Id: I98ed73844571a07e81003cf99c6d7e0be37722b5
Reviewed-by: hjk <hjk@qt.io>
2016-11-01 15:12:35 +00:00
David Schulz
69db1653c2 Debugger: Adjust dumper test to cdb python dumper
Change-Id: Ide744edad545f0eeb2152f0d47bd8bace26d698d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-01 14:26:49 +00:00
Tim Jenssen
cb3064a09e Clang: use a pri file to set clang defines
Change-Id: I52167ab3ce480c795cb0f0bcd749f97b34db86d3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-11-01 14:14:40 +00:00
Tim Jenssen
e3a2f3c796 Tests: add utils dependency
Broke ConnectionClient compile which is using
isWindowsHost of utils.

Change-Id: I376efd5234a86de07764495af9a772b0810aaee7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-11-01 13:25:47 +00:00
hjk
4452e85710 Debugger: Split error messages in debugger output tests
Having one per line makes them easier to read.

Change-Id: I4f4288ac26415cf9930c8b377972c391bd223ee4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-01 11:27:40 +00:00
Eike Ziller
30f71eddf8 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I245212bd45104636b1c9737b36d3db3e4af23092
2016-11-01 09:30:49 +01:00
hjk
4f7821a71f Debugger: Disable Nim dumper auto test
Needs manual testing in the common case that the
intended crash does not occur.

Change-Id: I99de4f466df9e3a470a6bcb98b819d15da3a7067
Reviewed-by: hjk <hjk@qt.io>
2016-11-01 08:14:10 +00:00
Marco Bubke
aa97e29920 Clang: Add ostream for clang::StringRef
Change-Id: Ibafb1c179fcc49f1df330537ad6dc9addba5618d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-31 14:23:44 +00:00
Eike Ziller
f1d3e7c8e7 runextensions: Add convenience method for result handler
Change-Id: Ibe7e62049f165276fdedcd04d8311324f6bc5d19
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-31 09:31:02 +00:00
hjk
bd2653fbaa Debugger: Introduce and use type ids instead of type in dumpers
Change-Id: I569d13d4f5d66cf1606b2b5d047b415659de539b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-28 08:11:38 +00:00
hjk
0bf4bfcade Debugger: Don't optimize dumper tests
Better finish a slow build than waiting forever for a potentially
faster one.

Change-Id: Idec49294ec10f8dee41b061b3eeb7bf1e696d2a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-10-27 06:49:25 +00:00
Thomas Hartmann
e9b4cab807 QmlDesigner: Adding manual test for cpp mockups
This is a typical test case for mocking cpp types.

Change-Id: Ibd76429c3d1190c46a223062d77d676f728fec77
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-25 13:36:27 +00:00