Commit Graph

54564 Commits

Author SHA1 Message Date
hjk
73c72fa6a7 QmlPuppet: Remove unused static function
Change-Id: I8c439f87c30b4b4102f0839cc745120568e6f34f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-02-28 07:23:47 +00:00
David Schulz
9c091fedb1 TextEditor: comment smart pointer usage in proposal widget
Change-Id: I29fd72a99d55a9539d0319cb76bf616ec55abf9e
Reviewed-by: hjk <hjk@qt.io>
2018-02-27 12:33:10 +00:00
David Schulz
a4b5fc00a8 CodeAssist: use shared pointer to pass around proposal models
Task-number: QTCREATORBUG-17752
Change-Id: Ia41f169b86ead209830e6f15764062389ced2b67
Reviewed-by: hjk <hjk@qt.io>
2018-02-27 12:32:36 +00:00
Tobias Hunger
4598a78980 Fix build with journald support
Change-Id: Ieaf0463903898823bade3e9eb73be0005ac7db47
Reviewed-by: hjk <hjk@qt.io>
2018-02-26 12:05:35 +00:00
Christian Stenger
e8e3ade858 Core: Fix build without Qt Help library
Change-Id: If8229ad96fbe1aeb327bb77dd14bb55ec52d608e
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-26 06:45:29 +00:00
David Schulz
451567c31d Msvc: Check if future was canceled before accessing the result
Change-Id: I3029d665f64dd144e1e4010f0856537e7fb218f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-26 06:27:37 +00:00
Pawel Rutka
4aced20a21 Implement support for project file open after AddFile action
Change-Id: I5f5372498a34760976cea5b7d6f5f49dd04558db
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 15:15:22 +00:00
Pawel Rutka
5ea157f0b8 Support AddFiles same way as QMake project
Change-Id: Ib1b5e9ba201623b48144766048d3b404ff016131
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 15:15:12 +00:00
Pawel Rutka
b9bdacb27a Support basic behavior for AddFile in CMake project
Change-Id: Ib9c764908abc7daa9a3c614b93da98bc4e674862
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 15:14:48 +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
Christian Stenger
39dd8ebc6e AutoTest: Adapt to changed handling of CppTools
b276de576f fixed an issue with
mixing handling/not handling of carriage return characters.
The AutoTest plugin uses similar functionality and relies on
the code model (and its snapshot / working copy).

Adapt the respective part here as well.

Task-number: QTCREATORBUG-19897
Change-Id: If9183bfa020a1c4c6efdc5dee404c1a1e0ce41a6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-23 13:59:56 +00:00
Ivan Donchevskii
b276de576f CppTools: Replace "\r\n" with "\n" in cpp file content
When we get the file working copy it never contains "\r\n"
line endings. Let's provide the same behavior when we have
no working copy and read the file from disk.

Task-number: QTCREATORBUG-19905
Change-Id: I720d62426860dcdcdd8520db5430d9f4f5900ab6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 13:09:20 +00:00
David Schulz
bde42d755f ProjectExplorer: fix async loading of MSVC toolchain
Change-Id: Ie69f89fbe3f9b659ead4de5f570d4c00469855f1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 13:00:00 +00:00
David Schulz
f4b0274f4e Utils: add != operator to environment items
Change-Id: Ib31fc09553a54290202329be1d54e6a955c65f77
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 12:59:55 +00:00
David Schulz
3c94b4cb6b Utils: Add variant converter for EnvironmentItem(List)
Simplify saving environment items to creator settings by providing
converter to QVariant.

Change-Id: I65ef3b33964ba0af97bbd46e18a13ae316d7ecee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 12:25:44 +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
Christian Kandeler
09a7247bfc Update qbs submodule
To HEAD of 1.11 branch.

Change-Id: I42415f3b3b478dc5cb4e098bbeac1da54d547d9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-02-23 09:39:29 +00: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
Ivan Donchevskii
1a47df0a93 Clang: Fix code completion for connect()
Clang built with this patch properly handles
not only normal methods but also templated ones
which fixes code completion for QObject::connect.

Change-Id: If1c4c0f5fda29c1aff106d8ed7065ff502a26328
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-23 08:41:29 +00:00
Ivan Donchevskii
66fe088ab8 Clang: Do not call processEvents call in local renaming
Use QFutureWatcher and lambda instead.

Task-number: QTCREATORBUG-19799
Change-Id: I00e9439d46609902cbfb02906280c0c96b8c884e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-23 08:40:54 +00:00
Ivan Donchevskii
34fec1cad2 Clang: Make Q_PROPERTY replacement simpler
The infrastructure around Q_PROPERTY extraction
allows to make it static assert and still find
it's parent.
This way makes it easier for Clang to parse
and does not provide unexisting functions for class.

Change-Id: I1c40550c72d214c2448169094a46c6f793132f23
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-23 08:40:33 +00:00
Marco Benelli
336ab17614 qmljs: autocompletion for Qt3D modules importing
Task-number: QTCREATORBUG-19885
Change-Id: Ie2153186199cac45b5cb273d7f7cf088beb689f4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-02-23 08:17:31 +00:00
hjk
38d15ebe2f RunConfiguration: Avoid unneeded calls to availableCreators()
It has been used twice on each Target::updateDefaultRunConfigurations():
Once to help filter out potentially interesting factories, and then
to actually retrieve the creators from the interesting factories.

The same result can be obtained with less effort and less code.

Change-Id: Ic83423bbbc172c842ec5a55fcd6ad83106e268aa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-23 07:09:41 +00:00
hjk
39b66f2cb8 Introduce and use IRunConfiguration::addSupportedTargetDeviceType
In line with addSupportedProjectType, saves a few cycles due to the
non-use of the temporary list, and in theory more flexible than the
existing set...(QList<Id>) as it potentially allows dependent plugin
to declare support for already existing configurations instead of
re-implementing their own.

Change-Id: I2b83e90de49daa9bfce6f780c5f51c2e971eb7d1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-23 07:08:55 +00:00
Christian Stenger
092d5068bd ClangRefactoring: Fix compile for Qt < 5.8
Change-Id: I61a848c9a7bad42697dd6de4f5b002cc655381c6
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-23 06:24:17 +00:00
Nikita Baryshnikov
f369048d41 Clang: Suppress a compiler warning in fulltokeninfo.cpp
Change-Id: I75fadf3c38b2a75cb8791da0271bf6e100505708
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-22 15:13:34 +00:00
David Schulz
dc358dc841 TextEditor: update scrollbar after adding annotation between lines
Emit documentSizeChanged after resizing the block boundaries because of
an annotation between lines.

Task-number: QTCREATORBUG-19790
Change-Id: If468ec003a43f37fdcb182344992e4094b269c92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-22 13:40:04 +00:00
Ivan Donchevskii
1d2b27081a C++: Fix unit-tests for MatchingText
BackwardScanner required more investigation and this is
the better fix than 413c66ec.

Change-Id: I651a7b416b549cc4a0e086873262d04409a7448e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-22 13:21:38 +00:00
hjk
4286a4d507 QmlDesigner: Fix NavigationWidgetFactory retrieval
They aren't in the global object pool anymore.

Change-Id: I4f0ae69ebabe33f0276dbfd7137a4f8adbaad489
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-22 12:53:09 +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
49bdde2ab0 Clang: Fix formatting
Change-Id: I77fb233f101f7046d5cfab71933c413ae15835d4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-22 10:24:23 +00:00
Marco Bubke
157c74e1f1 Clang: Use C++ condition instead of preprocessor
It is now possible to refactor the code. This pattern is favorable to the
preprocessor.

Change-Id: Ic85db43e23e16412d938a47892f1812b5883d949
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-22 10:24:16 +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
Christian Stenger
e7663d0cce QmlJSEditor: Fix crash when triggering context menu
Regression introduced with 3da9c89981.

Change-Id: Ia0ede1b46b7bc8cbce8b55335b3a548e7f8d384d
Reviewed-by: hjk <hjk@qt.io>
2018-02-22 09:05:55 +00:00
Eike Ziller
912d4616f5 File system view: Fix that bread crumbs could hide selected top item
If the current item is at the top, and the bread crumbs widget needs
more space, we may not just scroll, because that would scroll the
current item under the larger bread crumbs widget. We have to do the
delayed layouting in that case.

Task-number: QTCREATORBUG-19800
Change-Id: I93072c1932099501e99963220efdd975c255f586
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-22 07:04:49 +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
Alessandro Portale
84e17dd0f8 Core: Modernize FancyToolButton and FancyTabWidget
I got much help from clang-tidy, clazy and clang-format.

In preparation of QTCREATORBUG-18845

Change-Id: Ie881efd5093d86dc8a345e0a5badd93a6ccecbb9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-21 14:58:46 +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
Friedemann Kleint
766162c23b qdoc2tasks.pl: Print messages continued over several lines
For example:

qtandroidextras/src/androidextras/android/qandroidfunctions.cpp:301: (qdoc) warning: clang found diagnostics parsing \fn bool QtAndroid::bindService(const QAndroidIntent &serviceIntent, const QAndroidServiceConnection &serviceConnection, BindFlags flags = BindFlag::None)
    error: use of undeclared identifier 'QtAndroid'
    error: unknown type name 'QAndroidIntent'
    error: unknown type name 'QAndroidServiceConnection'
    error: unknown type name 'BindFlags'
    error: use of undeclared identifier 'BindFlag'

Change-Id: Ie9a9accf97cdd639b8a8a9ff908a73588fc15ff5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-21 13:22:49 +00:00
Friedemann Kleint
6854f0580d Add sphinx2tasks.pl for converting sphinx warning logs into .tasks files
Task-number: PYSIDE-363
Change-Id: Ic3935d579cf4b13b46f339e273aad5f5dd30bd6c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-21 13:22:41 +00:00
Tobias Hunger
980fd54ea1 Fix warnings about unused lambda captures
Change-Id: Ib9bcf180fd8ceffbf88836a62fc9532e6f7fc656
Reviewed-by: hjk <hjk@qt.io>
2018-02-21 13:06:08 +00:00
David Schulz
9b5f4a41b9 Clang: fix qbs build
Change-Id: I969b1f3053421c7222fc04c7ba1e8324983506f0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-21 11:41:07 +00:00
hjk
d7348e0ccf QmakeProjectManager: Pimpl and remove uses of global object pool
Change-Id: I801a3b6b880e1113d12ece0cf70a882b9696811f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-21 11:29:58 +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
hjk
6b7db0bae8 Debugger: Remove use of addAutoReleasedObject
Change-Id: I9a435448e05f56521eaca7f6ba2ac7780950fa18
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-21 08:21:14 +00:00
hjk
7945ba7923 TaskList: Pimpl and avoid using the global object pool
Use the pattern that's currently being established.

Change-Id: Icfb1472cc394f0e371056d5cb23fd22d291dbdaa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-21 08:14:35 +00:00