Commit Graph

5172 Commits

Author SHA1 Message Date
Nikolai Kosjar
5f8ac59ef8 Clang: Fix tests without any ASSERTs
Change-Id: I3148cb85271ab021832caa5bd09dedb6aeeef49f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-08 15:21:23 +00:00
Nikolai Kosjar
e3b1259004 Clang: Introduce DocumentParsed as job requirement
This is in prepration for a follow-up change, which introduces a state
where the Document is not yet parsed (it was reset) but the queue has
jobs.

All jobs get this requirement except those that generate an AST.

Change-Id: Ifcbb704e54108b40797180514c5ad3f3768ef10b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-08 13:18:54 +00:00
Nikolai Kosjar
063b327097 Clang: Clean up clangjobqueue-test.cpp
Change-Id: If10deb858bbf0ec725c029d5e914c5109de7b5ee
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-08 13:18:47 +00:00
Nikolai Kosjar
5972e27169 Clang: Ensure to clear all affected translation units on project part change
The ones that were already dirty were not taken into the account and
used the old project configuration.

Change-Id: I949d1ca8c23bbdb18eec78e5a708199beff6f735
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-05 15:27:44 +00:00
hjk
0cce7a82fe Debugger: Add some simple dumper for std::function
Linux/gdb only, pretty print the cases of default constructed objects
and real function pointers.

Task-number: QTCREATORBUG-19410
Change-Id: I08332af649bda861d9f53c0e0feb1f37db72b875
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-05 07:20:26 +00:00
Marco Bubke
ab60cfd3a4 Clang: Clear SymbolCollector before updating new project parts
Change-Id: I82e9bb4f66a7597bb911fbc97d6022ff3fdb0b35
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-03 14:45:17 +00:00
Marco Bubke
3c43e5d7ec Clang: Collect source files
Change-Id: If0183cafd00ed7e42bacbdb72a1d65624dc03cee
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-03 14:45:04 +00:00
Robert Loehning
dbfbe1d65d Squish: Rename project while this triggers bug
Task-number: QTCREATORBUG-19523
Change-Id: I468c5fe0af07b1875b45de8a1fd32da23208f6a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-03 10:16:37 +00:00
Robert Loehning
bada98379d Squish: Remove outdated workaround
Task-number: QTCREATORBUG-18290
Change-Id: Iddf51cc9655d24c866d3887afc4be6291768087d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-03 10:15:50 +00:00
Oswald Buddenhagen
777ca8e655 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp

Change-Id: I94647f59d7a9df48168ac066555afe80f5f9b91f
2017-12-21 13:20:24 +01:00
Christian Stenger
3006a13869 Tests: Fix compile
Broke with 21c66ce5.

Change-Id: Iea3447a8226300333eacf8fa0df587d8ef197e8f
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2017-12-20 10:12:50 +00:00
Eike Ziller
8944ba0391 Utils::transform: Add support for various map types as result
Add support for output as std::map/unordered_map/set and QMap and QHash,
when giving the full result type as template argument. For std::
(unordered_)map, the function must return a std::pair<Key,Value>, for
QMap and QHash it can also be QPair<Key,Value>.

Change-Id: If3dff17ab6aa5d1b11abc244813fd885d10c75a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-20 09:58:50 +00:00
Eike Ziller
f62b24c475 Utils::transform: Support containers without reserve()
Support containers without reserve() as result container, for example
std::set/deque/list

Change-Id: Ia96b834c67d5ee74bfb9de2cf6b86639f6b3d5d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-20 09:58:27 +00:00
Marco Bubke
91e40e12db Utils: Converter to raw pointer and references
Sometimes you want to get raw pointer container from smart pointer
container and reference container from value container.

Change-Id: Ia018d572ac0a7bf742f3937dc38ee30670a3ca73
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-20 09:58:17 +00:00
Robert Loehning
b64c1a96b8 Squish: Update WatchTreeView object
Change-Id: If999647727155dccc087d9d22f3b68d2b1661351
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-19 14:08:45 +00:00
Christian Stenger
0fcbe60cd6 Tests: Fix qml import check
Change-Id: I7fcf4a3b718c3b2124171187cdb06493c84ff7b8
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-12-19 13:51:35 +00:00
Eike Ziller
e0a23664aa Utils::transform: Allow usage with non-const source containers
Makes it possible to e.g. transform to list of reference_wrappers.

Change-Id: Ib608034fc3f296824c289edd27563bc7a196ac6d
Reviewed-by: hjk <hjk@qt.io>
2017-12-19 07:35:38 +00:00
Christian Stenger
8187c6a146 Squish: Assign custom name to distinguish main tabbar from others
If the settings dialog contains more than one visible tabbar when
trying to access its tabs Squish fails to distinguish them.
Assign a unique name for the main tabbar of a category inside
the settings dialog.

Change-Id: I349b480871306784b5adc9858984933dc26d7958
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-12-15 13:53:45 +00:00
Alessandro Portale
6e802988e7 QmlDesigner: Add manual test for pixel perfect formeditor overlays
We have a few off-by-ones in the visualization of selection, boundary,
etc. Also, there are differences between low and high DPI, aswell as
different platforms.

This manual test is supposed to enable proper analysis whether the
visualizations are correct or not.

Change-Id: Iee407d37a2c6f2f272e11a4d9774532343463bc1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-12-15 09:35:13 +00:00
Robert Loehning
7ded6bef30 Squish: Skip "Extract Function" with clang on Windows
Change-Id: Id98d630babff10fe0def36aa895f70587852036b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-14 14:52:21 +00:00
Ivan Donchevskii
7a7123b1bc Clang: add globalFollowSymbol to RefactoringEngine
Allows to follow outside of current TU.

Change-Id: Ieea2fd72bfdf6d60a988b40efcf2f41c5a71d045
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-14 14:25:14 +00:00
Marco Bubke
bb62fd3e56 Clang: Move printing functions in clang support to unit tests
The printing functions are only used by the unit tests and they use an
external API. So we can easily move them to the printing functions in
the unit test project. We have to move the TokenInfo print functions too
because the depend on other print functions. The rest of the print
functions will be moved in other patches.

Change-Id: I87c452f8ca40687ec47de675ba6bee13efa5655b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-13 17:24:59 +00:00
Marco Bubke
8cce4daa80 UnitTests: Make fake function inline
Change-Id: I8e0927a80d0bdcde7bd0e91c749d015636d07388
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-13 17:23:28 +00:00
Robert Loehning
bd8027d232 Revert "Squish: Update expected line in tst_simple_debug"
...because the project template was changed once again.

This reverts commit fe5249c401.

Change-Id: Ie7940c4dfa98ed71d8c1e937c087918f9157cbfd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-13 14:36:42 +00:00
David Schulz
800aa7466f Debugger: improve symbol lookup times for cdb
Task-number: QTCREATORBUG-18613
Change-Id: If8dac096fa4d0d8afc6fb8f7bbffd090a5dc6e19
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-13 13:59:01 +00:00
Christian Stenger
299d0f0e4f Tests: Fix compile with MSVC2015
Change-Id: Ic9a1839325febeb6bde0b656dce88342f3955c53
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-13 13:44:03 +00:00
Eike Ziller
6b48beeeb0 Support specifying complete result type in Utils::transform
Can come in handy when the function or member does not directly return
the right value type for the result list, but is implicitly convertable
to it. For example from pointer to class to pointer to superclass, or
from int to double.

const auto result
    = Utils::transform<QVector<double>>(v, &ValueType::intMember)

Change-Id: I0e1914d70bb2580b91098dd37e85a31ca14b0ae6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-12-12 14:44:15 +00:00
Eike Ziller
469edcdde3 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: Ic1ab71d0d40fa6c90e337c8ee9d9558e8f103eaa
2017-12-12 10:53:51 +01:00
Robert Loehning
aaa65375f9 Squish: Remove some more expected lines from tst_opencreator_qbs
Change-Id: I2b56b24044e0c057dbe5aff1b7f9a1fdcfdeb6c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-12 09:19:24 +00:00
Robert Loehning
5ca3f52b4b Squish: Fix property name
...to the correct capitalization. Squish < 6.3 could
handle both, whereas Squish >= 6.3 is more strict.

Change-Id: I9864518e21d3f2ed44fe7527f75aa958dc0081de
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-12 09:19:02 +00:00
Ivan Donchevskii
11d002968e Clang: add more data to TokenInfo class
Add token name, usr, isDefinition and isDeclaration.

Change-Id: If67bf78c999cb9edd397d0b553b33e5f5f378f8a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-11 15:18:52 +00:00
Ivan Donchevskii
affc652b7b Clang: Rename HighlightingMark to TokenInfo
Before adding additional members into that class it
makes sense to rename it to better represent its content.

Other classes serving the same purpose are also renamed
to keep the names consistent.

Change-Id: I3c8517e42aae29779d71ec9c85b713cff581a473
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-11 15:00:24 +00:00
Marco Bubke
b1bb6d9641 UnitTests: Fix ODR problem for print functions
You have to include them for all translationunits because otherwise default
print function are generated. So you get to different implementations for
the same symbol.

Change-Id: I732d2e1f1774f72acdbb49cbe1848d31ca3f5c98
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-11 11:56:21 +00:00
Eike Ziller
fb4f7e7420 Simplify transform and add support for more input container types
Change-Id: Ib75cfcc7741be686c0117fbb27df869e14db4f69
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-07 09:55:42 +00:00
Eike Ziller
a2739f55ed Merge remote-tracking branch 'origin/4.5'
Change-Id: Ic7c16091268083c0426cf29f0691a7ee458f2bd9
2017-12-07 09:16:01 +01:00
Robert Loehning
2427f1267f Squish: Update combos for creating projects
Change-Id: Ibbabacc7a5e357ac765ef8629e74ca2e05505078
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-06 13:21:15 +00:00
hjk
2b18af321a Debugger: Add test for new Debian gdb version string
Change-Id: I006fb9ae57610d2be65c1d6b83fa38660a5326aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-06 10:48:46 +00:00
Robert Loehning
1f6d2e067e Welcome: Use https-links
Change-Id: I6eec438e5c881da8e6946b3d167e1e71f49ba574
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-06 10:02:00 +00:00
Marco Bubke
76807c134a Clang: Merge FilePathView and NativeFilePathView
Change-Id: Ib07b16bf60c56027814cc5f0d7be1cacd15e96bb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-12-05 17:08:56 +00:00
Christian Stenger
2c93654e58 Squish: Improve testing of Welcome page
Verification of URLs used for "link labels" on the Welcome page
is now possible again.

Change-Id: Id48ab40201a9c2a60dc3c991052f45bee93707bc
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-12-05 11:08:09 +00:00
Marco Bubke
b045705115 UnitTests: Cleanup SymbolQuery test
Change-Id: Ieb4fe43c7b5cd27cc270f3c5d269c2d4812a0131
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:47 +00:00
Marco Bubke
21ce7386e9 UnitTests: Cleanup SourceRange test
Change-Id: Icd9ef74385bb35a4fe1f2f8142b4bf677eb7d389
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:39 +00:00
Marco Bubke
f3164c5a91 UnitTests: Cleanup SourceLocation test
Change-Id: Ia18fb69584087c38c464444b4385a9b2ddb78179
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:31 +00:00
Marco Bubke
40a8c56b5f UnitTests: Cleanup FixIt test
Change-Id: Iaf5616156c5d712c19661529ff6a444a6d20b937
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-12-05 10:26:24 +00:00
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