Commit Graph

4897 Commits

Author SHA1 Message Date
Ivan Donchevskii
c93e2815c7 AutoTests: Fix build after ClangStaticAnalyzer plugin rename
Change-Id: Ic34633f98e6c3c1b73389802429f3011e87b301e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-27 12:33:31 +00:00
Ivan Donchevskii
3fa8db13e9 ClangStaticAnalyzer: Rename plugin to ClangTools
ClangStaticAnalyzer is only one of the tools that
we can use and it will stay inside ClangTools plugin.

Change-Id: I74278e3fd12b792ab127d352db05d856c964968c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-03-26 06:18:12 +00:00
Marco Bubke
53454b0f79 Clang: Use PCHs for indexing
As generating the AST is quite expensive it would be very useful to cache
the not changed include. So we generate PCHs for include outside of a
project part. With this change this PCHs are used by the indexer.

For that they are save to the symbol database by the PCH manager and when
fetched by the symbol indexer.

Change-Id: I7a5b07cfb32d72d50dc52d2b108cd41727a7bfc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-22 13:26:24 +00:00
hjk
a8a23110bf Debugger: Fix enum dumper
Make the hex display work with LLDB, fix GDB and LLDB test.

Change-Id: I529b5cdc908dbcba7270bc4574fa59a012fcacad
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-22 08:45:57 +00:00
Marco Bubke
1f0562742e Clang: Add lastModified to the precompiled header
It is important to know then the PCH generation started, so we can compare
the header file time stamps against it.

Change-Id: Id8ee91e886c153d9d4a37cc0438c682f2098f7fa
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-20 14:04:00 +00:00
Eike Ziller
7ba225cb79 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: Ifd9524b0155067faf9d8a90858cc5f7da6b651bf
2018-03-19 13:13:31 +01:00
Joerg Bornemann
cabbeb1c54 Synchronize autotest defines in qmake and qbs build
Do not remove QT_USE_FAST_OPERATOR_PLUS and QT_USE_FAST_CONCATENATION
in QtcAutotest, but in the two tests that won't build with it.

In the qmake build the defines are not removed from json.pro, because
this file does not include qttest.pri.

Change-Id: I97d173528ca2a02bac1bfae30709a959e6b69375
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-19 11:50:38 +00:00
Eike Ziller
cb84ae1a21 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
	src/plugins/qmakeprojectmanager/wizards/testwizard.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/gettingstartedwelcomepage.cpp

Change-Id: I126823f5f60613509520c07f52be7bc9d4f4367c
2018-03-16 09:28:08 +01:00
Robert Loehning
fad75a3d56 Squish: Update tst_rename_file
Creator only selects the filename now, the
extension will be left unchanged by default.

Task-number: QTCREATORBUG-20057
Change-Id: I66bbbb5b95e1d487c2087efa596a87a240721e44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 14:09:50 +00:00
Tobias Hunger
3ef6f35cf6 PointerAlgorithm: Fix take and takeDefault
Fix take unit tests to actually test the correct template instance,
add more unit tests for takeDefault.

Change-Id: I51f5b17b6478a8c1388a91840edfb9c702697b28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-15 14:04:10 +00:00
Robert Loehning
24db24734d Squish: Open example from Qt 5.6 in tst_qml_editor
Change-Id: Ibd5bd516d8409fa5389da3e330d6723ba772f135
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 11:19:35 +00:00
Christian Stenger
1f3a106025 Tests: Fix Qbs build
Change-Id: I5bc5ec98994ce83137ac1599682251db35e26663
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-15 07:44:49 +00:00
Oswald Buddenhagen
60245e55d7 qmake: Change source identifier type in ProString
The strings remember in which file they were created/assigned.

However, this used a non-counting reference to a ProFile, which could
become dangling. If a subsequent ProFile re-used the exact same address,
a string's source would be mis-identified, which would be fatal in
conjunction with discard_from().

Since we actually need only a unique id for comparison, let's use an
integer for that.

comment on cherry-pick: this is actually a lot more than a cherry-pick,
because the file ids need to be aware of the dual VFS which was
concurrently introduced on the qtc side.

Started-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a
(cherry picked from qtbase/190aa94be7f5e146bef44862b974d733755cec85)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:01 +00:00
Robert Loehning
139d64615e Squish: Revert workarounds for fixed bug
This reverts commits 47355608db
and 6cc61be23b.

Task-number: QTCREATORBUG-19717
Change-Id: I052ff84ab33a5c483c11b66eaf55a175cc34c28d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-14 10:47:03 +00:00
Robert Loehning
38326b1811 Squish: Skip tst_opencreator_qbs
Change-Id: I0935a52f5b58c444bd6dd66cc9d93301444f0157
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-14 10:46:42 +00:00
Eike Ziller
0b10ecc718 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/ios/iosrunfactories.cpp
	src/plugins/nim/project/nimproject.h
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprojectmanager/qmlproject.h
	src/plugins/qnx/qnxrunconfigurationfactory.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/winrt/winrtrunfactories.cpp

Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
2018-03-13 11:25:38 +01:00
Christian Stenger
f1985df55d Tests: Fix compile for older compiler / Qt
Change-Id: I96e48c446ebd397c75dc0b47f9aaef1717b5e5af
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-13 07:43:32 +00:00
Tobias Hunger
0bc100911d Utils: Add pointeralgorithm.h
Change-Id: I3e81bdbf22808efbe1fb5fab13bef24c8f73f404
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-12 14:14:10 +00:00
Tobias Hunger
831b84a6fd Utils: Add take
Add a new algorithmn to take the first match in a container out of the container.

It takes a pointer to something and will try to match against a smart pointer
stored in the container. Besides that it also accepts the usual like a predicate,
member variable or member function.

Change-Id: I4aabd4d43aa076a534da6488d0f9c3695ba79c09
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-12 14:14:01 +00:00
Orgad Shaneh
27063168ad QmlDesigner: void static -> static void
That's the order everywhere in the codebase.

Change-Id: I62e57f2ddddd6e4fac0dc26d81b05839cf80a9db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-12 06:35:58 +00:00
Christian Stenger
32188f448a QmlDesigner: Fix compile before Qt5.10
QString::back() was introduced in Qt5.10.
Beside this fix the signature change of void checkNode().

Change-Id: I4945e618274e1a67fc36d33e875c14284a4b160c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-09 06:33:06 +00:00
Thomas Hartmann
cf82b8e685 QmlDesigner: Allow annotations in comments
This patch allows to store the auxiliary data of model nodes
as meta data in the QML file.
The meta data is encoded in a comment at the end of the QML file.
By default such meta data is attached to the clipboard.

Change-Id: I794d2c1297d270c5c1099c6c1be98b6b7a7f650b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-03-08 11:19:01 +00:00
Eike Ziller
124e4499eb Merge remote-tracking branch 'origin/4.6'
Change-Id: I421af2d62994436782dab6d37e97622bd055ed44
2018-03-05 09:28:34 +01:00
Andre Hartmann
fa9dcf67d6 Test: Fix compile after removing getObjects() from ExtensionSystem
The test for getObjects is therefore no longer needed.

Amends 72585ef3f1

Change-Id: I09f0e4a3a044263f971e3054c136fe82695a83a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-05 05:45:45 +00:00
Robert Loehning
0c11cee246 Squish: Use example from Qt5 in suite_CSUP
Change-Id: Ib983af58c9797b8598f3e115112ebcb18dee0276
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-02 10:03:24 +00:00
hjk
3ea4b0156c FakeVim: Experiment with hand-written signals
Change-Id: If76c68d3abb42240a279c15cf4b3d4b9e04460bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-03-02 09:07:33 +00:00
Eike Ziller
205c930592 Merge remote-tracking branch 'origin/4.6'
Change-Id: I63f8aebb201936f671b1486ff9420f67e5e3fafc
2018-03-01 15:46:37 +01:00
Christian Stenger
23781b3abc Debugger: Fix detection of gdb on older SUSE
Broke with e8a8003b16.

Change-Id: I0e9662bc8fb4115de0c63d07c82de78ef73004a5
Reviewed-by: hjk <hjk@qt.io>
2018-03-01 08:10:11 +00:00
Robert Loehning
47355608db Squish: Add workaround for opening qmlprojects
Task-number: QTCREATORBUG-19717
Change-Id: I3e3b11785154d5c2c20b68ca0091510d1a77ae04
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-28 14:25:53 +00:00
Robert Loehning
2c89829de4 Squish: Update suite_WELP
Change-Id: Icc3169a8af007fb1d42aa44acfd97b02e0d01220
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-28 12:41:55 +00:00
Ivan Donchevskii
d0273f83f9 Clang: Fix unit-tests build for MSVC 2015
Change-Id: If81ad5d8ea704a2714d3088024d701202e9854f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-23 14:40:33 +00:00
Eike Ziller
7c3cfa166d Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/coreplugin/helpmanager.cpp

Change-Id: I2feb60ec0afb2f22f75dc137a01c3fa217b299d8
2018-02-23 10:56:52 +01:00
hjk
31a55b0247 ExtensionSystem: Remove per-plugin object pools
Remove now-unused IPlugin::addAutoReleasedObject and IPlugin::
{add,remove}Object convenience functions that were only forwarding
to the global pool.

Adjust all related tests.

All previous users of these convenience functions are gone, and we do
not want to encourage the use of object pool anymore.

Plugins that wish to share objects to implement weak dependencies
can use the global object pool via  ExtensionSystem::PluginManager::
{add,remove}Object directly.

Change-Id: Ic668ad5504af76963f6d4c69ae160438efc70db5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-23 08:57:49 +00:00
Marco Bubke
73963cc9c7 Clang: Add time stamp based filtering for project parts
The source ids are now filtered by the modified time. If the modified time
in the database is older than the modified time of the file it will be
parsed. If it is not newer it will be not parsed.

Change-Id: I4ade3443dd66573ac88053a2cafa600e54cfe973
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-22 10:24:59 +00:00
Marco Bubke
a6f47e872f Clang: Add isInPrecompiledHeader to the file status table
It will useful to find out if we have to wait for an updated precompiled
header.

Change-Id: I6a314f278485965571cc6e46982bbd6f5523c581
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-22 10:24:31 +00:00
Marco Bubke
1a4c51d15f Clang: Prevent segmentation fault in WriteMessageBlock
There could be already messages send before the backend is available. In
that case we now record that messages and send them if the socket is set.

Task-number: QTCREATORBUG-19761
Change-Id: I7c8d6fdb4fcc043bcdbb9e9aeb5752f89c24fdab
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-22 10:23:51 +00:00
Marco Bubke
6922f549d5 Clang: Check if the include search path has changed
If the include search paths and the compiler macros have not changed it is
save to assume that we don't need to update the symbol database. This saves
us from executing a very expensive task. Later we have to test the
modification time of the files too.

Change-Id: I6b958075024a811c2abd3d7918263fd74bba090b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-22 10:23:39 +00:00
Orgad Shaneh
f9deab1140 Tests: Initialize some local variables
Clang warns about those (-Wconditional-uninitialized).

Change-Id: I993b6267208a5ec0a443ddcb1ebac52aea2c92f0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-21 16:26:04 +00:00
Marco Bubke
0172631b48 Clang: Don't reparse if the macros haven't changed
We have to extend that to include paths too, which will be happen in a
follow up patch.

Change-Id: I7f8ac663ae8588e647fc6a6b5d689a629a28ef65
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-21 14:17:19 +00:00
Marco Bubke
b5c3d5a40d Clang: Improve ProjectPartArtefact
Empty strings were only handled by accident and wrongly formatted ones
were never handled. Now we do nothing for empty strings and throw an
exception from wrongly formatted strings. The exceptions are very helpful
in the test code because the show errors the the testing data.

Change-Id: I87d1678eda7502fdc3f74f51fad491803d28582b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-21 14:17:09 +00:00
hjk
3b58153750 Revert "Utils: Add a ObjectPool convenience class template"
This reverts commit f6715fe52b
which introduced this.

It was prepering infrastructure for having ownership of
sets of objects handled separately from the global pool,
but that's not wanted and needed anymore.

Change-Id: I7368da624ea99bb70a6a1cce04677257322dc605
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-21 10:45:32 +00:00
hjk
aac8a2c6d4 Tests: Add a benchmark for Qt signals vs plain callback
While a plain lambda callback lacks a lot of the features of a real
Qt signal/slot connection, there are plenty situations where the
plain callback is all that's needed. Have some benchmark for more
educated guesses on timings.

Change-Id: I0c1fdfd2fd352d75c2af66fd713806bf3dd2d135
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-21 09:53:17 +00:00
Ivan Donchevskii
8ffae6a08c Clang: Add cursor range to extra token information
Change-Id: Id410c94c79d61b8f4d5b53f937827356272b9f65
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-21 06:55:39 +00:00
Robert Loehning
6cc61be23b Squish: Update tst_quick_creation3
Qt 5.3.1 used to be selected automatically which was wrong when the minimum Qt
version is 5.6. Now, because of QTCREATORBUG-19717, this does not happen
anymore.

The kit using Qt 5.6 should be selected automatically, but since we explicitly
do this, the end result is correct. When QTCREATORBUG-19717 is fixed, we
should not need to select a kit ourselves anymore.

Change-Id: I446b2843cd6e545905ce3a6616f7f8d3204bbafe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-20 18:20:19 +00:00
Ivan Donchevskii
dacfc611c5 Clang: Add highlighting types for ObjectiveC
Builtin code model supports ObjectiveC classes,
properties, etc. We can easily get the same
information from clang.

Change-Id: Iede5e177d4932f404e4ccb81ae356eee8faffb71
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-20 13:34:37 +00:00
Ivan Donchevskii
66c7629814 Clang: Properly handle Q_PROPERTY in TokenInfo
Transform Q_PROPERTY into unique AST node.
Mark different parts with types and search for parent
in FullTokenInfos.

Change-Id: Iaa1ec0c73d34773edf5605d3682bd6a290d195de
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-20 06:49:47 +00:00
Tobias Hunger
4786c5928a SettingsAccessor: Rename BasicSettingsAccessor to SettingsAccessor
Rename BasicSettingsAccessor to SettingsAccessor, now that the name
is available again.

Change-Id: I49473f0c701976f992209f06d48decf047ab19de
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-15 13:14:32 +00:00
Marco Bubke
56f79feebf Clang: Introduce CompilerMacro
We want not only the name but the value of the macro too. So we can
compare if anything has changed.

Change-Id: Ie59caf8cbf54d108f9e15299d25306a406b5c40d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-15 09:58:53 +00:00
Marco Bubke
29a4419c07 Clang: Update symbol database if file has changed
The code in the symbol indexer is quite similar, but still different
enough to prevent easy reuse of the function.

Change-Id: I47907d90066da922eafe8ff3cce124ea47ea4a0a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-14 15:06:58 +00:00
Marco Bubke
dfb9e4355f Sqlite: Transaction catch exception in destructor
Fixes coverity warning. We want to throw an exception in the destructor
in this case, which is save because it is a RAII pattern and holds
only trivial values. Actually this is the only way to communicate that
rollback was failing. It is quite rare that it will be happen without an
exception is already thrown.

There is a non throwing variant too if you want to use it as a class
member.

Change-Id: Ie71ead19678619465c6ad9334d36ee666225dce7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-14 15:03:22 +00:00