Commit Graph

6441 Commits

Author SHA1 Message Date
Eike Ziller
74cdce071f Merge remote-tracking branch 'origin/3.6'
Conflicts:
	src/shared/qbs
	tests/manual/proparser/main.cpp

Change-Id: I13654bf10c14eb6b1d6805fe86b67ac73b2e4d75
2016-02-24 10:08:37 +01:00
Orgad Shaneh
d7a43eaa18 Tests: Build clang unit tests when clang is enabled
Change-Id: Ia3a07f73bd39304bb4bf1b67cb662499792fa2ca
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-22 15:57:41 +00:00
Orgad Shaneh
0c575700cb Clang: Fix highlighting of variables in lambda capture
void func() {
    const int var = 42;
    auto lambda = [var](int input) { // var is not highlighted
        return var + input;
    };
}

Change-Id: I95a5732ab8391e1232894e419b081c729e2d1ba1
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-22 15:38:42 +00:00
Marco Bubke
0f61908ab0 Utils: Add sized array
Sometimes you need a very small array which has a size and max size.
QVarLengthArray is simular but has some size and run time overhead and it
has no max size. It will instead malloc. So this array is for very small
collections under 256 values which never allocate and have only a size
overhead of a byte.

Change-Id: Ia392c750d566c4accc6077c3dc4d9d4ae501e599
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-22 14:53:12 +00:00
Thomas Hartmann
0642c10512 QmlDesigner: Adding manual test for dummy data
This is a small project that tests the dummydata feature.

Change-Id: I710ec6ac8ebf86c85a155a812e581cca88845666
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-02-22 13:39:03 +00:00
Marco Bubke
7912213894 UnitTests: Use fno-omit-frame-pointer for profiles
Perf is not producing reliable stack traces without.

Change-Id: I5f594d45b06a66d91b0c687937dd948d6c724c62
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-22 13:33:43 +00:00
Thomas Hartmann
8aaf3a0922 QmlDesigner: Adding manual test for dummydata context property
This manual tests shows how to add a simple context
properties for the Qt Quick Designer.

Change-Id: Ied47bc6acbab32d782f6827cf849711aed600821
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-22 10:33:04 +00:00
Robert Loehning
e71cb3ae62 Squish: Update expected sizes of project tree in tst_session_handling
Directories in resource files are now displayed as
separate items, adding two more entries to the tree.

Change-Id: I398469bfe7680c73ab0440fdb9dc6f75e101f2f4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-22 10:21:11 +00:00
Christian Stenger
bad4cb4896 Tests: Fix wrong license header
Introduced with b278dc87ca.

Change-Id: I595384b35e9e5f2f319ec4e9c1ad92f7fc4bdcd4
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-22 07:22:36 +00:00
Marco Bubke
1eb0c94f81 Utils: Add SmallString
SmallString is a very simple utf8 string class. It's purpose is performance.
It uses a short string opimization which provides 31 bytes of heap free
memory to save a 30 bytes long string plus null terminator. If the string
gets larger heap is allocated. The grow strategy is 1.5 to improve reuse
of allocated memory.

It uses optionally constexpr to provide string literals.

Change-Id: I7757fb51abfeca200d074cbfce2f1d99edc0ecb0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-17 15:07:01 +00:00
Marco Bubke
7984e928d1 UnitTests: Rename CLANGBACKEND_TESTS in UNIT_TESTS
Change-Id: I26635a0c85edcc90cdffb93d3f9ae4ad4c8cb98e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-17 14:57:53 +00:00
Robert Loehning
122f896548 Squish: Update addHelpDocumentation()
Change-Id: I8b26f1e5efbc51058306ea7183c0b37bcbc49179
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-17 14:52:04 +00:00
Marco Bubke
f8884501c2 Clang: Add Google Benchmark unit tests
Change-Id: I5d137aebd3e94f5d2f867d8ec007973a827491ec
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-17 10:35:34 +00:00
Marco Bubke
b11c14808d Clang: Fix broken windows build
Change-Id: I51b696cbb04e50058ace92a3ead04e3655b0a2f6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-16 18:27:44 +00:00
Robert Loehning
7aa8dc38e9 Squish: override startApplication in startCreatorTryingClang()
Change-Id: I6cb16c2a93ca46503f056c558eb8a6a2b33153d7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-16 13:16:00 +00:00
Robert Loehning
9d8e4aa922 Squish: Test overwriting of files when adding class
Change-Id: I86ed9a3749f692fe9ead13c31e0ba62c2baa3020
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-16 13:14:35 +00:00
Kevin Funk
0d079062d9 proparser: Make compile
Change-Id: Ifb96fd11f542f9622ea3867c3bf877e722120136
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-15 17:44:14 +00:00
Robert Loehning
692261564f Squish: Include binary editor in tests
Change-Id: I0b4fc4e0cb18dcbd569ebdba201bfb9e2596ba5b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-15 10:44:47 +00:00
Robert Loehning
901d74121a Squish: Use existing tools for finding executables
Change-Id: Ic3e7f5db6d12e37f908df3290893768a5be4fa56
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-15 10:43:11 +00:00
Robert Loehning
6f7c4249ad Squish: Stabilize tst_CSUP06
Change-Id: I52f4c858f178cb3018e57461e2350564fbf78024
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-15 10:40:54 +00:00
Nikolai Kosjar
b064b06759 Clang: Display also child diagnostics in tooltips
...by introducing a custom tooltip widget for diagnostics.

Locations and fixits of child diagnostics are presented as clickable
links, leading to that position in the editor or to the execution of
that fix it.

Change-Id: I83e801e22d0421dd29275e333e5dd91587885cf1
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-12 11:54:09 +00:00
Nikolai Kosjar
9a4284d666 Clang: Use CppHoverHandler for diagnostic tooltips
We used to call QTextCharFormat::setToolTip from the ExtraSelection to
install the diagnostic tooltip. Since this allows to set only text
tooltips and we would like to introduce a custom tooltip widget for
diagnostics, make use of CppHoverHandler, which is more flexible.

Change-Id: Ia1b2c3c50810596ce4a3a025002e6e4efd8789db
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-12 11:20:27 +00:00
Eike Ziller
72af6b7834 runAsync: Remove ResultType template parameter.
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.

Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-10 10:58:55 +00:00
Marco Bubke
974070d2c8 Clang: Use MessageEnvelop instead of QVariant
QVariant has unwanted dependencies so we provided our own simpler solution.
We want to support move only types and calling the copy constructor as you
move the value in and outside. This copying is adding unwanted overhead
too.

Change-Id: I2e27a7924868efe81e8b8ff3415499c9fa22c2bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-08 14:11:44 +00:00
Christian Stenger
5f69a505ec ClangStaticAnalyzer: Fix flaky tests
The same problems we had on Windows (started() emitted before
QSignalSpy::wait() called) occur also on OS X.

Get rid of the QSignalSpys completely and watch out for the signal
emissions manually.

Change-Id: I092126c6605b046f250999b8ff04d11e685297c2
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-02-08 09:06:53 +00:00
Eike Ziller
d362abf1e2 runAsync: Support functions without QFutureInterface parameter.
Change-Id: I8e387d683eceab642ddd3fac90a2a5f407a868dc
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-05 08:57:49 +00:00
Eike Ziller
41d4fabf34 runAsync: Allow thread priority without thread pool
Change-Id: I6d4ee8fa1bf45c7a24ff6a004b3c69007c645547
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-04 10:13:20 +00:00
Eike Ziller
b19cac022e runAsync: Add test for move-only types
Excludes MSVC2013 which doesn't really support moving.

Change-Id: I2bffa546f2c90946b4d99e0eee292741b900a386
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-03 14:08:36 +00:00
Robert Loehning
cb7b24be15 Squish: Try to stabilize tst_qml_js_console
Change-Id: I9de2d7784954ebe658530505ba64e816a95d411c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-03 13:53:36 +00:00
Eike Ziller
b1b118821b Merge remote-tracking branch 'origin/3.6'
Change-Id: Iba662995e76f1b6ec135d64072a36a2498b2b5bb
2016-02-03 10:55:48 +01:00
hjk
dcfb622126 Valgrind: Simplify device setup and handling
Make isLocal() less intrusively used and correct.  Use the stored device
more often, also handle errors more quickly.

Change-Id: I146d1f5788ea79d0a9d7b058c81908d451cf00d0
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-02-02 14:14:02 +00:00
Robert Loehning
8c13f2437e Squish: Increase timeout in tst_git_first_commit
Change-Id: Id65b729cd200bb37ad132b4071a263ab61bb3ed8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-02 10:19:12 +00:00
Nikolai Kosjar
db8b9f9463 Clang: Fix variable name in test
Change-Id: Ief210920c62710786cf75fd6aea04897f4e2965e
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-01 15:17:11 +00:00
Eike Ziller
5952165cf9 Merge remote-tracking branch 'origin/3.6'
Change-Id: Ic4d3d94feaaa588c6244509bb3dd14c5cb646fe7
2016-02-01 16:15:48 +01:00
Nikolai Kosjar
57877cc14d Clang: Workaround dot detection for arrow correction
...by explicitly checking for the dot in the source.

Task-number: QTCREATORBUG-15654
Change-Id: I4172e88a7fbb3015ef391daf13ded1f0002aab9c
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-01 12:20:58 +00:00
Nikolai Kosjar
da27ea4d42 Clang: Introduce UnsavedFile wrapper
This simplifies UnsavedFiles and makes TemporaryModifiedUnsavedFiles
useless.

Change-Id: I1896f971215ed22ce7aa7bf21b16381862b7469d
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-01 12:20:53 +00:00
Robert Loehning
7114ee9149 Squish: Run tst_CSUP01 on clang code model, too
Change-Id: Ic2424cc9d962feff06baadc23a5fdf121bf2a11d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-01 11:38:49 +00:00
Eike Ziller
4a954c296e runAsync: Fix unexpected behavior for using singleShot/timers etc
Timers/singleShot etc can only be used in QThreads (they require the
event dispatcher). So we have to use QThreads instead of std::threads to
nicely interoperate with Qt features.

Task-number: QTCREATORBUG-15681
Change-Id: I851e2f102e15ccd3347d455cc9d8b7df935c2d5e
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-28 14:18:09 +00:00
Eike Ziller
349b49caaa RunExtensions: Allow running functions on arbitrary thread pools
Change-Id: Icf642e7365535e4b2ca6fa4dee90a7033eb39af7
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2016-01-28 12:41:37 +00:00
Nikolai Kosjar
bfa292cdc9 ClangStaticAnalyzer: Tests: Fix failing runner tests on Windows
Both runner tests fail on Windows at

	QVERIFY(st.expectStartedSignal());

because QProcess::started() is emitted before ClangStaticAnalyzerRunner::run()
returns and thus before QSignalSpy::wait() is reached.

Watch out for the signal manually before calling run().

Change-Id: Ia786bfc6c859a4a4b420aeccc7e7f7bb0b4c47c0
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-01-27 09:47:07 +00:00
hjk
50499079dc Valgrind: Fix test compilation
Change-Id: I1b64cab7326830cec86b9b5154e9efb6d0ea8569
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-26 15:20:41 +00:00
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