Commit Graph

5028 Commits

Author SHA1 Message Date
Marco Bubke
b5fdfe46c5 UnitTests: Cleanup Diagnostic test
Change-Id: Idf7d50ad15862508c2d57167f2147389e3bacba4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:18 +00:00
Marco Bubke
17080d70d4 UnitTests: Cleanup ClientServerOutsideProcess test
The data member could not be made constant. So it was quite propable that
the tests were order dependent.

Change-Id: I9e3792ea45434ad8318ef6325ca516a74ca222c2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:12 +00:00
Marco Bubke
409fecd3a0 UnitTests: Cleanup SupportiveTranslationUnitInitializer test
Change-Id: I0c43baeb13fe2a1004622267deb4e588f941d254
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:06 +00:00
Marco Bubke
872f3ee9c3 UnitTests: Cleanup ReferencesCollector test
Change-Id: I5c6d25e28116fb7e608044c2c187ff64bfcac9c9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:00 +00:00
Marco Bubke
d755986827 Clang: Cleanup ClangQueryProjectFindFilter test
Change-Id: I8e9246490c8501c71a5f0cc10aa45a0914fdda62
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:25:53 +00:00
Marco Bubke
cf4b2aec86 UnitTests: Cleanup FollowSymbol test
Change-Id: Idfacd3737b6a830a1e7c08f7b3745277ace3f756
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:25:47 +00:00
Marco Bubke
8dac5ff1c4 UnitTests: Remove heap allocations in the DocumentProcessor test
A fixture class is called for every test, so we don't need that setup
code.

Change-Id: I7fb2ee8248a161f701292a90eb6b8b88e9df08a7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:25:26 +00:00
Tobias Hunger
2c09424c13 Utils: Clean up Utils::findOr and Utils::findOrDefault
Change-Id: I638e68480d3985b6df9a18aa96a067ee68484b12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 14:41:15 +00:00
Tobias Hunger
b81d788793 Utils: Support more containers with Utils::transform
Support std::vector and similar classes as input and output.

Change-Id: I1d202d54c18e868ce0e71e4c2b6288565710baa8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 14:11:28 +00:00
Tobias Hunger
33fc20ab51 Utils: Improve Utils::contains
* Consistently use anyOf to implement contains.
* Support contains over an container of std::unique_ptr matching a pointer.

Change-Id: I0180f3ec3d5935d8afeeac67a745d4b38a01674d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:43 +00:00
Tobias Hunger
9b832f670d Utils: Implement more Utils::anyOf variations
Change-Id: I0cba5b58dde6003f5c5cb399142f985cbe83f0a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:37 +00:00
Robert Loehning
fcea6ceba6 Squish: Partial fix of tst_opencreator_qbs
Change-Id: Idaa228e4efcdac05e72932ed95c410af8a7bc80f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-01 10:22:06 +00:00
Robert Loehning
fe5249c401 Squish: Update expected line in tst_simple_debug
Project template changed again.

Change-Id: Ibd2767719e13e3de041e63e0977d838aa6c34f3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-01 10:20:43 +00:00
Robert Loehning
09f0d1a2ca Squish: Stabilize tst_HELP05
Change-Id: I9296dc577fac4ea06c7c8f482a44948ba327568f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-30 13:20:44 +00:00
Tobias Hunger
ee834b7e2f SettingsAccessor: Add setters to VersionUpgrader
Add setters to VersionUpgrader and use them. This shortens the
implementation classes a bit.

Change-Id: I5ffe6f085752bf39bbcb08c286844cc1088eeea5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-30 10:40:53 +00:00
Christian Stenger
e5fae9b914 Tests: Fix compile on Windows and Linux
Template code inside utils/algorithm.h is not correctly instantiated when
respective containers that shall use these functions are included after
the algorithm file.
Additionally there had been issues using nullptr as comparison inside
QCOMPARE().

Change-Id: I2bd6baf3890090c5f5bbbd6229afb9aeeb7617ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-30 09:21:51 +00:00
Marco Bubke
67767f9925 UnitTests: Add mockup for Core::ICore::userResourcePath()
Otherwise the unit tests does not linked any more.

Change-Id: I1d756b8bef18d65174a8924a15995cc179af61f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-29 13:04:13 +00:00
Eike Ziller
c1aa745813 Add missing include to algorithm test
Change-Id: Ia7302723a0ec41456ca99704b7f8c680f6893c5d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 12:09:49 +00:00
Eike Ziller
c90e5b50dc Algorithm: Support std::vector<std::unique_ptr> with contains and findOr
Change-Id: I01cb71c06b405f071498ed8752f9acac44d2b223
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 08:59:52 +00:00
Eike Ziller
e2baa116ca Merge remote-tracking branch 'origin/4.5'
Change-Id: I86852d289c22210a0439e8e297819dc7276a96de
2017-11-29 09:56:22 +01:00
Marco Bubke
f70bf3d2d1 Clang: Move QLocalServer in ConnectionClient
Before the QLocalServer was in the ConnectionServer so more than one
client could connect to the server. But we never used that possibility
which made the hand shaking much more difficult. It is now moved
in the client, so that there is always a QLocalServer.

Change-Id: Ifa357074b0c0809434c49d23b1cee38496f72f43
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-28 15:08:58 +00:00
Hugo Holgersson
bf3c67e0d0 TextEditor: Implement highlighting of function definitions
This allows users to style function names at their definitions.

Once set, the XML-style token "FunctionDefinition" will
highlight all function definitions: the style option is a
mixin to Function and Virtual Function.

TEST=Default themes and locally hacked themes that lack Function,
FunctionDefinition, Declaration-styling look as they did before
this patch.

Requires Clang.

Task-number: QTCREATORBUG-16625
Change-Id: I49d8e401211bdf28ff74699feac16fe98f6d64ce
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-28 12:54:29 +00:00
Christian Stenger
eaf4b67461 Tests: Fix compile on Linux and Windows
Change-Id: Ie8db68769a2419c9ad8700d9eef1d4093c209d9b
Reviewed-by: hjk <hjk@qt.io>
2017-11-28 08:47:39 +00:00
Tobias Hunger
566b118a87 Utils: Make algorithms take more containers
Change-Id: I05bd1052bbc2c6481fdec8a3763d9ae4f3dc8f44
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-27 15:00:16 +00:00
Alessandro Portale
8895ef1ddb Utils: Add a manual test for Utils::CrumblePath
Using a small test app for testing the CrumblePath is less clumsy than
doing that in Qt Quick Designer.

Change-Id: I4a1d739aa303adfd799df33eb00fb8cd513304c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-27 14:07:40 +00:00
Christian Stenger
1914481a30 Tests: Disable test for LLDB
Change-Id: I1f7a576d3b8feb527013e3b679fc60c4e663f2eb
Reviewed-by: hjk <hjk@qt.io>
2017-11-27 12:48:42 +00:00
Marco Bubke
3f12a33bcb UnitTests: Remove duplicate
Change-Id: I5c409cce070a9f02515750139fd87b44d734979f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-23 12:45:31 +00:00
Marco Bubke
a15250051d Clang: Handle native file in the file cache
Different types are introduced for normalized and native file path. So the
compiler is warning you if you try the wrong format.

Change-Id: I1da0686b142cbf9bb7578468c2b50f90a94cebf9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-23 11:55:15 +00:00
Ivan Donchevskii
7fb80595b9 ClangRefactoring: use sourceUsagesAt instead of locationsAt
Change-Id: I085b243b6e0ea4b786ce5c5f5a6894345f9d87eb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-23 07:17:57 +00:00
Christian Stenger
c2e92d3925 Tests: Fix compile with Qt5.6 + gcc4.9
Change-Id: Ic8d6c660cf4d5d185642dcad52753b4da9e70120
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-22 13:39:40 +00:00
Tobias Hunger
2e62690dcd SettingsAccessor: Do not hard-code document type
Change-Id: Ied886eac9fcb4a9c58f088c32ee5ba0646b94fbc
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 12:28:19 +00:00
Tobias Hunger
1aaed7477e SettingsAccessor: Add tests to save/load values
Change-Id: I08870a91c725eb6c5344545d8d829fc98a3231bc
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 12:28:13 +00:00
Tobias Hunger
0a202e4c29 SettingsAccessor: Use optional as return value of findIssues
Change-Id: Ib7ef8ec408f812a71735939514d98cf8755d292b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:59:08 +00:00
Tobias Hunger
6044b84e14 SettingsAccessor: Add tests for findIssues
Change-Id: Ib78c2c93dc9404087efe485fdaaad69595aa0125
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:59:02 +00:00
Tobias Hunger
b8f2d746d0 SettingsAccessor: Add methods to upgrade to a specific version
Change-Id: If368f4a35d3702dbf680b1306ca6311070aa9bb5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:58:56 +00:00
Tobias Hunger
5d6c2ca159 SettingsAccessor: Do not change data on invalid upgrade attempts
Make sure that the input data is returned unchanged if an invalid update
attempt is attempted.

Update tests accordingly.

Change-Id: If5c410bf1a757f984593bda871763af64d8dd972
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:58:50 +00:00
Tobias Hunger
9246a77a2f SettingsAccessor: Add tests for version upgrading
Change-Id: Ie41433b507bdd68b834a6fc1879f3f1b71f7b4ff
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:58:41 +00:00
Tobias Hunger
0269503dd8 SettingsAccessor: Improve SettingsAccessor::isBetterMatch
Improve the behavior of isBetterMatch, so that it now handles
invalid versions as well as invalid ids. Simplify code where possible.

Change-Id: I2e65c0cc01d32fa77df8b5ec0d62b765e6c458f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 10:16:25 +00:00
Tobias Hunger
cacab453f7 SettingsAccessor: Add test for version upgrader registration
Change-Id: I04195b84b551333ef34f0f193d5c2237ad1c86c6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 08:59:48 +00:00
Ulf Hermann
5e0639542f Add some sanity to the clang detection code for qmake build
llvm-config can usually be found in PATH on systems which have standard
paths at all. There is no need to specify LLVM_INSTALL_DIR then.
Furthermore, llvm-config has an option --bindir which will tell us the
directory where clang can be found (if installed). No need to apply
strange heuristics based on LLVM_INSTALL_DIR. Finally, we can check
within each .pro file for the conditions to be met using qmake's
require() function. This way we don't need to fiddle with
LLVM_INSTALL_DIR in unrelated places.

Change-Id: I1a6ab092b06de40dfbfa4a9e7053451360fd24c8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 08:47:05 +00:00
Nikolai Kosjar
cbc9b61f19 Fix qbs build due to duplicated product names
Change-Id: I053a9c43ecdba5c447ca0ac664a3038698486b09
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-21 11:09:02 +00:00
Tobias Hunger
eda0daec81 SettingsAccessor: Add test
Change-Id: I872dffb6489ba5dbb766e9a9a924eb199254b0cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 15:10:34 +00:00
Marco Bubke
9678c86e40 Sqlite: Fix double throwing for reset
We do want prevent throwing again for reset if we already have thrown an
exception but we want to throw if there was no exception.

Change-Id: Iaf9fffb872ccd579a8ccde02381b5e5d30d5c4cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-13 15:45:41 +00:00
Orgad Shaneh
d9cb19b229 Merge remote-tracking branch 'origin/4.5'
Change-Id: I60fca091b2eac67259580acba5ae934c16d74a83
2017-11-11 19:54:32 +02:00
hjk
0965b9752d Debugger: Add one more enum dumper autotest
I cannot reproduce the issue from the bug report anymore, but
having a test for it should not hurt.

Task-number: QTCREATORBUG-18529
Change-Id: If7464e45c14bbe316bf7ed1c68ea1f2692093005
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-10 11:36:55 +00:00
hjk
7194500d57 Debugger: Fix autotests with Qt 5.10
QTemporaryDir changed behavior, possibly by 3d6cbe3 in qtbase:
QTemporaryDir("ABC").path() in produces
    - in 5.6: something like ABCzDcwHP
    - in 5.10: something like /working/dir/ABC.HAZrEm

Change-Id: Ic51f30f54e1b8f9a8ca302b1b43640a45074ab0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-10 11:30:19 +00:00
Robert Loehning
f9c0069903 Squish: Update test for sorting
Change-Id: I79a68377425b3596ec25c98e12c46ed59d439249
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-09 15:49:32 +00:00
Eike Ziller
b05637131c Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I726babe61e28db14d06a6a1a5c570e148745b458
2017-11-09 14:32:00 +01:00
Robert Loehning
84c0390bdc Squish: Update Creator's sources to v4.4.1
Change-Id: I95ba4de5ec0148b602d91b684dabc09e954d52ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-08 16:47:39 +00:00
Christian Stenger
1305068375 Test: Fix typo
Change-Id: I0e7ca842f550cbb0853221c9b843192c2675bc73
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-08 10:48:25 +00:00