Commit Graph

2118 Commits

Author SHA1 Message Date
Ulf Hermann
c679b3202a Tracing: Simplify TimelineModel signals
Instead of laborously calculating which properties have changed under
which circumstances, we can just connect the signals of dependent
properties. This will give us a few false positive signals at a greatly
reduced risk of missing some actual change. Also, the number of expanded
and collapsed rows will always be determined by the content of the
model. We don't need separate signals for those.

Change-Id: Id8495ee525a91405b039fd032509afa125f96412
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:03:30 +00:00
Ulf Hermann
5f9f8f9f16 Tracing: Handle mouse events in FlameGraph QQuickItem
Having an additional MouseArea as child of a ScrollView or a Flickable
is not well defined and leads to inconsistent behavior on different
systems. We can easily catch the relevant events in the FlameGraph item
itself. Also, don't redirect the typeSelected() signals through the
model. They don't belong there.

Change-Id: I77c17977b5a51d57ccd2ef880d3d6c6a604b7f78
Task-number: QTCREATORBUG-20573
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-18 12:35:36 +00:00
Christian Stenger
a926909010 Tests: Fix compile on macOS
Change-Id: Ic987e41c79cae531aa94ded8fa9fa87bce55c936
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-04 10:07:22 +00:00
Nikolai Kosjar
c9a3d2bea1 RunExtensions: Support specifying thread stack size
...with runAsync().

The stack size cannot be changed after starting a thread, so specifying
the stack size with a pool does not make sense. However, starting
with Qt 5.10 a stack size can be specified for the whole thread pool, if
needed.

Change-Id: I09eded606321388c779f762b77de6223081609fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-04 09:56:50 +00:00
Christian Stenger
f1881ac2fc Tests: Fix defining path to sdktool
Replace backslashes with normal slashes as Qt handles them
inside paths correctly itself. Otherwise we might end up
using unknown escape sequences which leads to not executing
anything and a passing test.
Escaping the blanks is not necessary as they are handled
correctly automatically.

Change-Id: Ib1a81949c54d41b7864e30a1371de2e148f96bb8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-04 04:52:27 +00:00
Christian Stenger
8b4dbfb8e1 Debugger: Fix member offsets in QFile
Change-Id: I8d806aabcf2c744165553f087831ce899db24d80
Reviewed-by: hjk <hjk@qt.io>
2018-05-22 08:16:07 +00:00
Eike Ziller
e7123b140e Merge remote-tracking branch 'origin/4.7'
Change-Id: I9d433fa6ce4f60a2acfbdb21da9f727cac8d7526
2018-05-14 09:52:58 +02:00
Orgad Shaneh
f615c9aa42 QmlDesigner: Remove outdated Qt version conditions
Change-Id: I7fa3147afbdc07814f8710a44140072e7bbd8511
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-11 12:41:20 +00:00
Nikolai Kosjar
23df884f4a ClangTools: Remove clang static analyzer
...since it's superseded by the tidy integration.

Change-Id: Idafa5e1fb5129b1af8e42231a664684d4b90821f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:17:55 +00:00
Ulf Hermann
734611131d Move Timeline and FlameGraph into a common "Tracing" library
This allows us to share code between the two, in particular the QML code
for the Details window, and the theme code. This way we can potentially
deduplicate some code.

Change-Id: I3a0d26b18488bd2a46b5b077b5b5d79ac2dfc5ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-04 14:08:47 +00:00
Marco Benelli
9678ea5755 QmlJs: add test for code model
Change-Id: I3e60274dcce578a170e12d44533e6f83e77d448a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-04-27 08:27:03 +00:00
Christian Stenger
4533015c66 Tests: Fix include path
Change-Id: I4e05a306aa5947ef12854186b9d700de31fda170
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-04-27 06:22:34 +00:00
Ivan Donchevskii
219e23332e ClangTools: Add tool that runs clang-tidy and clazy
... over the whole project.
Generate and read serialized files to get diagnostics.

Change-Id: Iafc25fc70443107a040a995efc038aed35102bbf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-26 13:02:19 +00:00
Ulf Hermann
780d4c6a43 Timeline: Move modelId generation into aggregator
The way the notes model works requires every timeline model to have a
different ID. Conversely no other kind of model actually needs an ID.
Therefore it makes sense to have the TimelineModelAggregator manage the
IDs as every timeline model will sooner or later be associated with an
aggregator.

Change-Id: Ib8b2c88ed883351d4e3e156dd13e1dd113c21808
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-17 14:11:51 +00:00
Ivan Donchevskii
e9c462391e ClangTools: Split generic part from static analyzer tool
To reuse it for other clang-based tools.

Change-Id: I6c0d8e9eee543fa08faf3bf93c9fac33e43c6820
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-13 12:34:53 +00:00
hjk
99bcc00199 ExtensionSystem: Remove PluginManager::getObjectByClassName
Not used anymore inside Qt Creator.

If 3rd party code really relies on this function, it can use the
function locally, or, likely switch to the still supported
getObjectByName or getObject.

Change-Id: I041877b3e0630e6b257055dec5e10baf68c83546
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-11 06:47:18 +00:00
Orgad Shaneh
7d3a79c696 Utils: Purge asConst
Replace by qAsConst.

Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:00 +00:00
Marco Benelli
a874cf581d Qml/js reformatter: use quotes in objects literals
The reformatter used to remove the quotes that wraps the property name
in object literals.  This causes problem when the name is not a
valid identifier, resulting in that valid code become invalid after
reformatting.
This patch forces wrapping of property's name in quotes: in this way,
the reformatted code is consistent and it never get invalidated.

However the resulting formatted code is not consisted with the one
formatted by previous versions.

Task-number: QTCREATORBUG-17455
Change-Id: I1e361102819055de210d6c81020f204c08aaa253
Reviewed-by: Markus Maier <markus.maier.sw@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-05 06:50:03 +00:00
Marco Benelli
b9d72a5737 qmljs: remove remaining references to QtQuick1
This patch removes all references to QtQuick1 in qml library,
plugin, designer, profiler and tests.

Change-Id: Ie286fad96060299caae3ef328330597cf53e90d3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-03 14:40:30 +00:00
Eike Ziller
5cc24f9ac1 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/projectexplorer/msvctoolchain.cpp

Change-Id: If2116aa2dbfdb9d07088595e791f8fa706b39e00
2018-03-28 10:01:44 +02:00
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
hjk
401d6862b5 Debugger: Make CharArrays dumper test pass on linux
I need the #include <wchar.h> after a recent upgrade.

Change-Id: I59790d6c92b14f42df8b5ece7227c406f2810c8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-22 13:05:38 +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
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
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
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
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
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
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
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
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
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
Tobias Hunger
6445fb19bb Settings: Add test to pick right file if several exist
Test picking the expected file when several exist in
BackingUpSettingsAccessor.

Change-Id: I09d346a98a8df13d6cf3ee53ee20ce34e45e8d28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-14 13:24:26 +00:00
Tobias Hunger
97cf4bb278 SettingsAccessor: Improve test by mocking out read/write operations
Change-Id: I4d4cf6ff0be3d4b8278a7613c26f2b1752304ad4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-14 13:24:11 +00:00
Tobias Hunger
b95bbe1d57 SettingsAccessor: Extract functionality to merge settings
Move functionality related to merging settings into MergingSettingsAccessor,
move code specific to the .user-files into UserFileAccessor.

Remove SettingsAccessor class, now that all code has been moved out of it.

This patch changes the merge mechanism a bit: It used to upgrade
the user and tha shared file to the higher version of these two, merge,
and then upgrade the merged result to the newest version.

Now it upgrades both the user as well as the shared file to the newest
version and only merges afterwards.

Change-Id: I2a1605cbe9b9fb1404fcfa9954a9f3410da0abb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-14 13:23:33 +00:00
Tobias Hunger
9ffd52f9c5 SettingsAccessor: Extract upgrading functionality
Extract upgrading functionality from SettingsAccessor into
UpgradingSettingsAccessor.

Fixes surprising behavior in test
ProjectExplorerPlugin::testUserFileAccessor_prepareToReadSettingsObsoleteVersionNewVersion
where the Version was thrown away.

Also adds a error/warning distinction to BasicSettingsAccessor::Issue,
so that the non-critical ones can be ignored later.

Change-Id: Ia38d074f91cd8d8f820f9bec96d3330d748564c7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-14 13:23:25 +00:00
Eike Ziller
43936b1e86 Merge "Merge remote-tracking branch 'origin/4.6'" 2018-02-13 12:38:29 +00:00
Eike Ziller
c7fdb93865 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp

Change-Id: I2445882a270731b866b04f28ff87d161224c539a
2018-02-13 13:37:37 +01:00
Tobias Hunger
23bb717101 SettingsAccessor: Extract handling of backups
Extract the code that handles backups from the SettingsAccessor into
a BackingUpSettingsAccessor.

Move code up from SettingsAccessor into UserFileAccessor where it belongs.
This became possible due to the extraction.

Change-Id: Icacaa4e7231b3c0c520154c76f9338227f96a614
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-13 12:21:33 +00:00