Commit Graph

54723 Commits

Author SHA1 Message Date
Ivan Donchevskii
63ea3ac004 Clang: Improve code model plugins settings UI
Describe clazy levels, improve layouts.

Change-Id: I4895682ea7d10ea910c2d53725073c9c870bb306
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 13:33:54 +00:00
Tobias Hunger
e037fe7e0c CMake: Hide nodes from project list
Hide nodes from project list so that they will not end up cluttering
the locator with directory locations (which creator can not open anyway).

Task-number: QTCREATORBUG-19346
Change-Id: I78d7d16b7cdacf5536e81c5001a292af0bd0c2df
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 13:16:34 +00:00
Tobias Hunger
9a56ac25cb SettingsAccessor: More const, more warnings on misuse
Change-Id: I667944f041792c72b0cecbd6b2ec252db9a2701d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 12:28:25 +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
Christian Stenger
c738198185 Android: Fix compile with Qt5.6 and gcc4.9
Change-Id: Id353723112bb3086e695f483c3ce4ec53ba425d8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-22 12:04:48 +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
Ivan Donchevskii
1c0bdb693e ClangRefactoring: enable "search again" for find/rename usages
Make its behavior closer to the builtin find/rename

Change-Id: I3730e87ca3e41677b004b98bb2e62dada5d32f22
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 11:56:12 +00:00
Ulf Hermann
bffbae47f1 QmlProfiler: Don't write past end in QmlEvent
If the external data is quint16_max long, we need to stop writing at
quint16_max - 1. So we cannot rely on unsigned integer overflow to
enforce the boundary.

Also, use for (...) rather than foreach (...). This should easily offset
the extra overhead introduced by the bounds check.

Change-Id: I51d1aef1040fbaa8396ca80ec7e30b2fe7b7dd0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 11:46:29 +00:00
Ulf Hermann
64288955f0 FlameGraph: Silence some warnings
Apparently those anchors get evaluated before the parent-child
relationship is established.

Change-Id: I182a7760f3f638bd416af707dff092025d40a9b6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 11:13:45 +00:00
Ulf Hermann
1e49ac3041 QmlProfiler: Properly clear the trace client
Rename the method to clear() and make sure all the event types and
pending events are actually cleared.

Change-Id: Ie6c916d374a00025f7d77d21345d039fe8cead80
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 11:13:10 +00:00
Ivan Donchevskii
08e3d8f011 Clang: Android: fix clang code model errors
Add missing gcc include directories in Android toolchain.
This introduces the similar "magic" that we have in qmake
(*qtsource*/qtbase/mkspecs/common/android-base-head.conf)
but allows us to have those paths wherever we use android
toolchain.

Change-Id: I5740f1f2339fd30670567f24db2be2454f665f41
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-22 10:56:10 +00:00
Ivan Donchevskii
1601f53542 Clang: StaticAnalyzer: use the default compiler options builder
Analyzer has clang path and can generate necessary header paths
to be able to use default options builder.

Change-Id: I9bb1fc158f045f6e099817c5557ee7d9e38416fb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 10:55:44 +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
David Schulz
c815d456ed TextEditor: Add option to display annotation between lines
Task-number: QTCREATORBUG-19181
Change-Id: I9b3957c678c08ca2f3ddf9cfa5ff272241547471
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 10:08:01 +00:00
hjk
c751e6afa7 Nim: Remove some unused functions, inline others
That's adapting to the introduction and use of extra runconfig aspects
a while ago.

Change-Id: I216aa409679b6b81bf3b6fa7c4473147616962a6
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-22 09:45:00 +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
903fe559c2 Clang: Fix spelling of "disabled" messages
Change-Id: Iac9729ffc75171c70822cd8f207af63b060b5b78
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 08:47:12 +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
Tobias Hunger
7c96f0027e NavigationTreeView: Improve horizontal scrolling in treeview
Do not move horizontally so often when scrolling to an index in the
TreeView. This is done by getting more accurate sizes for the items
being drawn.

Change-Id: I9cbc7912ede6a4bec3126c3ce9a0a4eb65805910
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 08:41:45 +00:00
Marco Bubke
b0137c3a01 Clang: Move path watcher to clang support
Change-Id: I3b54304bcbba750ef826e6244b8f6c7000c9cf9b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-21 17:38:07 +00:00
Leena Miettinen
983e2cd09d Doc: Update Qt Quick UI Prototype wizard docs
The wizard name has changed.
The option to create an ui.qml file has been replaces with
the option to add a virtual keyboard.

Change-Id: I2466500dcabda59586806939c0e7b8f3100d6677
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-11-21 15:00:43 +00:00
Ulf Hermann
7d550cd7c4 QmlProfiler: Eliminate some clang warnings
Explicitly check the user-given port for the right range, drop an
unnecessary switch/default clause, and reorder members for better
memory alignment.

Change-Id: I82e9f4353debd6b211d251ecd83fc642a04bdd87
Reviewed-by: hjk <hjk@qt.io>
2017-11-21 14:55:29 +00:00
Ulf Hermann
14db426133 Fix outdated perf profiler documentation
The event types should now be chosen in a structured way, not as
additional arguments. This is a hotfix for 4.5. A more comprehensive
documentation of the settings will follow in master.

Task-number: QTCREATORBUG-19321
Change-Id: I56670bd8d54fa8a62eb35951d86e4023a2a8c680
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-11-21 14:48:12 +00:00
Eike Ziller
1b74172019 Merge "Merge remote-tracking branch 'origin/4.5'" 2017-11-21 13:11:05 +00:00
David Schulz
99309389f6 Editor: Remove dead code from EditorManager
Change-Id: I1f913177b964440592bf5954c1cd3a46cba2b139
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-21 13:03:32 +00:00
Eike Ziller
89f9f22035 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/clangcodemodel/clangutils.cpp
	src/plugins/cpptools/clangcompileroptionsbuilder.cpp
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I0728f08171103259407bbbb35f93b70c2f2e18d0
2017-11-21 13:28:55 +01:00
Ivan Donchevskii
194bde265c Clang: Define __FUNCSIG__ and others for msvc toolchain
Affects __FUNCSIG__, __FUNCTION__ and __FUNCDNAME__.
By default Clang can't concatenate strings under those
macros with other strings.
Because of that we need to define them with empty strings
to make clang compile such cases without errors.

Task-number: QTCREATORBUG-19295
Change-Id: I9a3770ebe56b4b8a49ba9982c5a1ba90c8f0b304
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-21 11:31:22 +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
Vikas Pachdha
59e3d9af1e Android: Enable emulator tool installation
Let Android sdk manager UI install the emulator tool. AVD needs this
tool to manage AVD's.

Task-number: QTCREATORBUG-19332
Change-Id: If836c511ca4a5673470d42c14115afa21b1b96fd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
v4.5.0-rc1
2017-11-21 10:53:20 +00:00
Tobias Hunger
216e40b3f0 CMake: Fix tree scanner not getting run automatically
This lead to <Headers> entry being missing from the project tree.

Task-number: QTCREATORBUG-19333
Change-Id: Ice3bab6d92aaa3799e66800cbae0bacd57537322
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-21 10:19:53 +00:00
Nikolai Kosjar
2abf1f29cc Clang: Add identifying macro Q_CREATOR_RUN
Use the same we use for the built-in code model.

This is useful for conditions of pragmas.

Task-number: QTCREATORBUG-16847
Change-Id: I4c83be46bb2b8a23e4c8f70d98e2b4c9572121ee
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-21 10:05:31 +00:00
Nikolai Kosjar
cd74eff1ba Clang: Fix coverty scan diagnostics in constructor
CID 1462055:  Uninitialized members  (UNINIT_CTOR) Non-static class
member "m_tidyChecksWidget" is not initialized in this constructor nor
  in any functions that it calls.

Change-Id: Ie6ba9f2714238feb03a9fc4006c0475b658cdf07
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-21 10:05:24 +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
Eike Ziller
7186456fd5 More 4.5 changes
Change-Id: Id75bc6dbfdfda12f2c12c70fb7a95ae7a0a3c56b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-11-20 14:51:57 +00:00
Christian Stenger
0d87abee8b AutoTest: Fix handling of forward declared test classes
If a class has been forward declared we might not end up
inside the real class declaration when trying to find
declared test functions. So, do not just take the first
found symbol into account, continue to process others if
we haven't found the real declaration.

Task-number: QTCREATORBUG-19319
Change-Id: I752d7a10470f5362e2214596966d93c037d58f4a
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-20 14:45:18 +00:00
Christian Stenger
466fb7ea53 AutoTest: Fix running Quick Tests with special functions
If special functions (init, initTestCase, cleanup, cleanupTestCase)
are present for a Quick Test they must get ignored when trying to
run a single test as they cannot get explicitly addressed.

Task-number: QTCREATORBUG-19311
Change-Id: Ie91928271928cf581bfef0b5e3463e027af985fd
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-20 14:45:10 +00:00
Christian Stenger
5b64c6ea82 AutoTest: Remove confusing information
If there is no information regarding the tests to provide to
the user 'unknown' is not helpful either. Just give no hint if
we do not have any.
While at it ensure to provide only non-empty information.

Change-Id: Ia1667c2cfd35b0456bfd47c2d4a14ed4d0000a4d
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-20 14:45:00 +00:00
hjk
95c17c3f0d Partially revert ProjectExplorer: Get rid of QLatin1* in settingsaccessor
Some intermediate is needed in return statements.

This reverts commit cf5d926221.

Change-Id: I76192484c0a8e88c85c34a2b31c6ec3487763524
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 12:14:14 +00:00
Ivan Donchevskii
ebdeb87241 Android: fix make command for latest NDK
Change-Id: I8c54ac146a96c11d6df5a7e5c791314799119b5f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-11-20 11:08:56 +00:00
Tobias Hunger
8dd8bd2fc8 Move SettingsAccessor from ProjectExplorer into Utils
Change-Id: I83e9d7ef81f8c0af7220ce2777723db53ef2e02a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:41:01 +00:00
Ivan Donchevskii
32bae7ef6c Clang: use local renaming based on ClangCodeModel
Provide refactoring engine for ClangCodeModel and
implement missing methods.

Change-Id: If5c913e0c5a7941cd2ced54d0fcfa4d625eadc93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-20 10:24:47 +00:00
Tobias Hunger
94e818dc82 ProjectExplorer: Do not depend on app_version.h in settingsaccessor
Change-Id: I673a1946ecfc9ef7e60eeae549eff7e08741d756
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:08:40 +00:00
Tobias Hunger
cf5d926221 ProjectExplorer: Get rid of useless QLatin1* in settingsaccessor
... and derived classes.

Change-Id: I7468794203c2ef32bb82585ed31cd50b7b80f5aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:05:03 +00:00
Tobias Hunger
15139aadb6 ProjectExplorer: Modernize UserFileAccessor a bit
No change, just adapt to new C++ standards.

Change-Id: I775f4ad3615b782808863e34294b511971bd7427
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:04:20 +00:00
Tobias Hunger
6cde4a73f8 ProjectExplorer: Use std::unique_ptr in SettingsAccessor
Change-Id: Id5c675c12d5a271efced0f3f52592364bfde34d1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:04:00 +00:00