Commit Graph

57165 Commits

Author SHA1 Message Date
hjk
6d3275212b WinRT: Remove Qmake dependency
Change-Id: I3f358b9911ffdd096f7f50d3540a3620e3c3b5f5
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-07 07:23:17 +00:00
Orgad Shaneh
43bdabff67 CDB: Fix delete of base class without virtual dtor
Change-Id: Ibc9a443f79f696e7c3a3e7e570ba9b0d883fafc1
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-07 06:22:15 +00:00
Orgad Shaneh
3306c9c969 TextEditor: Cleanup TextDocumentLayout
* Use range-based for
* Use nullptr
* Use inline member initialization
* Fix real/int implicit casts

Change-Id: I17fc35382ef22c97b34faba741915b9b914e38ff
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-07 06:08:07 +00:00
Jay Gupta
32d665e3be Add "How to set up Gerrit" information to HACKING
Change-Id: Ibdcadf06fe3d045768b6e5fb5545642440670d43
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-05-05 16:13:46 +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
Przemyslaw Gorszkowski
b9b2f2c187 SilverSearcherPlugin: fix searching if PATTERN starts with dash/hyphen
Change-Id: I36b35d4413f0f94664f75835c21e0945d22afce6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-04 13:22:23 +00:00
Eike Ziller
547ecf757d Get rid of size type conversion warning in Utils::transform
When transforming between containers with different size_type, like
QList and std::vector.

Change-Id: Ife28aacdc8627e81901579cde8b563da1408d084
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-04 13:06:55 +00:00
Jarek Kobus
80beedfa49 Refactor the highlight scrollbar painting
Scale the highlight on the handle according to the number of lines
visible on screen. In case when document has huge amount of lines
and only couple of lines are visible on screen, this
generates a nice magnification effect.

Change-Id: I43d7cce859cbc14da77272685a6f8d2350b41bb7
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-04 11:49:55 +00:00
Ivan Donchevskii
a2df3594c1 ClangTools: Rename configuration widget
This configuration is used not only for static
analyzer but for all tools.

Change-Id: I5ef282500e0addb4ca104b34530e56fba80f59b8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-04 09:59:48 +00:00
Ivan Donchevskii
52ac74b61c ClangTools: Remove clang executable settings
We use custom clang executable and it does not make
sense anymore to give a choice of changing it.

Change-Id: Icf86042ac3fcd08c320ef2bbdaabef1102b023b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-04 09:58:37 +00:00
Orgad Shaneh
80ae992c91 Clang: Fix another crash when closing document
Task-number: QTCREATORBUG-20191
Change-Id: Iae9d96827f5b84b727a838aae1fcc08eeacb909e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-04 09:46:15 +00:00
Eike Ziller
1f1be70546 Version bump to 4.6.2
Change-Id: I34702cbff029caa071f4e3556350011d84d26f2a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-04 09:43:30 +00:00
Tobias Hunger
887d1f17a1 CMake: Do not sort nodes
The project tree will sort the nodes as needed, so there is no
need to sort the list beforehand.

Change-Id: I1ee71100aba003117c918c5295224ec1253dc807
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-04 09:03:30 +00:00
Tobias Hunger
2df36926f5 CMake: Use FolderNode::addNestedNodes for unique_ptr in server-mode
Remove FolderNode::addNestedNodes that take raw pointers now that the
last user is gone.

Change-Id: If2ca3864934d9239ac136e65c0b7dbcea7caf220
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-04 09:03:15 +00:00
Tobias Hunger
522492d85d NimProject: Use FolderNode::addNestedNodes that takes unique_ptrs
Change-Id: Ibd8fb90ae38f2f3ae6e522a78c68632b4b2f0c38
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-04 09:03:05 +00:00
Tobias Hunger
bdd2dd371e ProjectExplorer: Add FolderNode::addNestedNodes taking unique_ptrs
Use that in CMake's tealeafreader.

Change-Id: Id1c372b083df380d0d930668cf7eec4ee89060c2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-04 09:02:56 +00:00
Jarek Kobus
1a23768563 Ignore index change when we set the document
Do the same as in case of sidebyside editor.

Task-number: QTCREATORBUG-18306
Change-Id: I1364aed0edb02dd9f5432e191ce4fb4b2db34430
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-04 07:58:37 +00:00
hjk
416e4dc1ad WinRt: Remove one more reference to proFilePath
The path of a .pro files is a qmake specific concept, the
build system should not play a role in running things.

Change-Id: I63657c803a7fb5b9c0b7fabbe42f4333827a44f9
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-04 07:23:28 +00:00
Ivan Donchevskii
c36f1f7f34 ClangTools: Add unit-test for standalone ClangTidy+Clazy tool
Use simple project with only few ClangTidy and Clazy warnings.

Change-Id: Idfbbeb653c5f610bda502c3ec23e7497f503f8a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-04 07:06:09 +00:00
Ivan Donchevskii
0b99ecf915 Utils: Add reset call to ExecuteOnDestruction
Sometimes it makes sense to have the function call
settable. For example if the call on destruction is
needed only for one branch of 'if' but the required
lifetime scope is not limited to that if-scope.

Change-Id: I93dbc1ee3798a08e5778445286b83b2848a54e3e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-03 13:52:10 +00:00
Hugo Holgersson
86aab16ea4 TextEditor: Highlight punctuators as Text
This change limits the set of tokens that fall under
Token::isOperator(). That allows cpphighlighter.cpp to
distinguish operator tokens from punctuator tokens
(without changing any logic in cpphighlighter.cpp).

This change moves punctuators from "Operator"
to the "Text" style category where they belong.
Punctuators are not operators. Punctuators are
dumb text tokens.

Why don't we let the clang backend alone separate
these tokens for us?

1. Clang is slow on big files. Sometimes the
   highlighting dictated by clang is painted _seconds_
   after cpphighlighter.cpp runs. CppHighlighter is way
   faster so we use it to "prepaint" code while clang is
   busy in the background.

2. Secondly, clang cannot yet handle all operator types.
   In particular, none if its "operator cursors"
     CXCursor_UnaryOperator:
     CXCursor_BinaryOperator:
     CXCursor_CompoundAssignOperator:
     CXCursor_ConditionalOperator:
   includes the -> and . operators.
   We still need CppHighlighter to paint those tokens.

However, once clang has finished processing the file some
operator tokens will be repainted. We need clang to get
all operators' semantics. In particular, we need clang to
tell us if < is a "smaller than"-operator or part of a
template parameter like set<int>.

Task-number: QTCREATORBUG-19659
Change-Id: I952cb58f7c79134b3281e2a8221425cc1d0ad263
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-03 13:43:16 +00:00
Ivan Donchevskii
ce032552c0 Clang: Support old-style SIGNAL/SLOT macro
Color types and enable Ctrl+click for the functions
and types inside SIGNAL/SLOT macros.

Change-Id: Ic1c0b7372fe9a73c5607b1973d75a6656c75ef0e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-03 13:34:21 +00:00
Nikolai Kosjar
a2e8c68fee QmlDesigner: Move file also in for qbs
Change-Id: I6c42d4cabee5792069ec27def80bf8ab3df4acb4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-03 13:23:41 +00:00
Jarek Kobus
7d60710608 DiffEditor: fix various warnings
Change-Id: I555aa30c8925ba8eeb314dd836f1544b93d7a66f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-03 13:03:31 +00:00
Jarek Kobus
45c42dcec8 Form wizard: generate nullptr instead of 0 for parent
Change-Id: Icb6ebbc057608e022a034f217bbcb35c77e99a42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-03 12:49:03 +00:00
Alessandro Portale
ea86b6e7c8 ProjectExplorer: Fix "Click to activate:" tooltip in target setup
The kit information needs to be shown in the tooltip.
Amends 460fdc02e0

Change-Id: Id661318d97244c6c35c5880842788fa265cc0098
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-03 11:47:34 +00:00
Tobias Hunger
0b1ed791a5 Project: Fix soft-assert triggered by Qbs projects
Soft-assert when a root project node is set again, except when
that node is nullptr.

Change-Id: Ib7c1891defc79d464a692c0e982b668be9a40cf9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-03 11:24:14 +00:00
Nikolai Kosjar
4861f5c183 Clang: Fix heap-use-after-free in ClangCurrentDocumentFilter
...when closing editors fast (e.g. holding Ctrl+W).

Due to the queued connection the slot was invoked after the deletion of
the editor. There is no point in having a queued connection here, so
remove it.

Task-number: QTCREATORBUG-20191
Change-Id: I3872f8046b56f93c9aac832feccfd911d39e5995
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-03 11:02:35 +00:00
Tim Jenssen
44daf5b1e3 QmlDesigner: move ZoomAction to compentcore
it is used by other plugins now

Change-Id: I778faf73be003e3341471ecff84333d0d7dac56e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-03 10:58:37 +00:00
Tim Jenssen
063a55e3ac QmlDesigner: export ZoomAction to Designer plugins
Change-Id: I53574fd1a7303b2b45d038b82bce8d18348a89c6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-03 10:58:25 +00:00
Tim Jenssen
a67c192968 QmlDesigner: try to keep zoom combo box smaller
Not sure why it takes so much space, tried different tricks,
nothing was working - so just take the half and hope.

Change-Id: Ib9ea475281b860838391f370c4f1eed98e327903
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-03 10:56:33 +00:00
Tim Jenssen
21faaaf2ce QmlDesigner: add resetZoomLevel to ZoomAction
we always start from 100%

Change-Id: I7877fe36430e1a80dc5258ee4ed2ed68ffaadd81
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-03 10:56:16 +00:00
Thomas Hartmann
b395bffefb Fix compile
* formattedDataSize was added in Qt 5.10
* We simply use KB instead

Change-Id: I2b09eb865ce27e097bc5fb2164f3da73b2437b5d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-03 10:34:07 +00:00
Ivan Donchevskii
7b0867df12 ClangStaticAnalyzer: Use --driver-mode=cl to support MSVC flags
we do not use clang-cl anymore but we can use this flag
to turn on the clang support of MSVC flags.

Change-Id: I1aefc4c0c2324a8f6ce77d93a488126ce8bb0253
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-03 10:04:18 +00:00
Ivan Donchevskii
02f50d5286 CppTools: Rollback some changes in CompilerOptionsBuilder
Make it safer in the 4.6 release.

Change-Id: I75857ecc08af8febe40fd75dc94d8ab986d4b768
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-03 10:04:08 +00:00
Thomas Hartmann
7d11401751 QmlDesigner: Refactor adding resources
We show now a dialog that allows to optional change the
target direcotory and gives an overview of the operations.

Change-Id: I3f3337be1049b1c35bfa783c5840fd49d1952806
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-03 10:01:03 +00:00
Andre Hartmann
83c5629545 EnvironmentDialog: Add help text to make usage more obvious
Change-Id: I13e1397b14ab6f1288bcc0626f358b9722c47d50
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-05-03 09:43:44 +00:00
Ivan Donchevskii
43072e82d2 ClangTools: Generalize unit tests
Add an option to run different tools.

Change-Id: Iaf5c928663a888526eba9ee9d1fcea59e6083488
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-03 09:03:57 +00:00
Tobias Hunger
b57ce2d7a6 ProjectExplorer: Fix crash on replaceSubtree
Do not double-free oldNode.

Change-Id: Icce2d13b6afd24f2e37c5ca7e2b572a6784e69e1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-03 09:02:48 +00:00
hjk
fd3a75d7f2 QmakeProject: Show full qmake path for Effective qmake command
This is for information only anyway, and leaving out the path makes
it less useful for e.g. cut&paste to a terminal or to double-check
whether the intended qmake binary is used.

Change-Id: Id35ee37363f58377a9da2e18c3ec6d89caf54312
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-05-03 08:57:15 +00:00
Kari Oikarinen
087af41871 Wizards: Add deployment rules to Widgets and Console applications
Otherwise they can't be deployed to Boot2Qt (and other) devices. Quick
application wizards already have these deployment rules.

Task-number: QTCREATORBUG-20358
Change-Id: I5a19ada3f6a382e8553750769478c398a50352c9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Kari Hormi <kari.hormi@qt.io>
2018-05-03 08:49:27 +00:00
Ivan Donchevskii
0a7d24c730 CppTools: Fix MSVC toolchain flags for C-files
In case of C-header or C-source files the MSVC
language version was not switched to C.
Fixes static analyzer runs for C files.

Task-number: QTCREATORBUG-20198
Change-Id: I1da31a1048b7c258642cf00f5084681f5d384ee6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-03 08:25:31 +00:00
Tim Jenssen
6456e725b9 QmlDesigner: remove unused environment variable
Change-Id: I110455905fe91ac8bcc061812e67ed26214f6e38
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-03 07:57:24 +00:00
Tim Jenssen
ba0c5ca8fd QmlDesigner: remove unused variable
Change-Id: I75c4d8ce2a861e421c204809d28dea156d3e6a88
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-03 07:56:57 +00:00
Eike Ziller
45f8d221bf Use FileName in TextMark
Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-03 06:51:47 +00:00
Christian Stenger
8559df7bc9 RemoteLinux: BareMetal: Fix history completer
History completers need a respective key to work properly
and become restorable.
This patch avoids some soft asserts and warnings regarding
empty settings keys.

Change-Id: I7d24d738b29167b7ab9714b4c6d54dbc1f7e1181
Reviewed-by: hjk <hjk@qt.io>
2018-05-03 06:37:09 +00:00
Vikas Pachdha
fea16708b7 Android: Do not start AVD when AVD name is empty
Task-number: QTCREATORBUG-20350
Change-Id: I36b5c81b05b34c3caa515b32b504c4441b2a1f2b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-03 06:17:17 +00:00
hjk
adaf1b3826 WinRt: Generalize executable extraction in WinRtRunnerHelper
This was the only remaining user of ProjectExplorer::
BuildTargetInfoLists::targetForProject was only.

The result after direct inlining shows that it relies on
the qmake-centered assumption that the the .pro file name
is used as build key in BuildTargetInfoLists, so replace
it with the now-generic projectFilePath member instead.

Change-Id: Ic4dccfb347289a3dcbb4c6a11b71cf568b054fd8
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-03 05:58:47 +00:00
Eike Ziller
eca2f5da53 Bookmarks: Some general code cleanup
Change-Id: Ibaba24af685d733bc3a488b82f2af5212f7ac35d
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-03 05:19:24 +00:00
Eike Ziller
eecbfc214e VCS locator filters: Let locator close its popup
By delaying the execution of the action with a singleShot.
Both CommandLocator filters and the menu bar filter are affected.

Task-number: QTCREATORBUG-18863
Change-Id: I4f3d39410621c2d578bc9f7af7357af372a15b73
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-05-02 16:47:26 +00:00