Commit Graph

57165 Commits

Author SHA1 Message Date
Tobias Hunger
7ad738d236 Core: Add more HostOS related information to MacroExpander
* Add HostOS:PathListSeparator
* Add HostOS:ExecutableSuffix

Both should be useful e.g. for External Tools.

Change-Id: I2a807b189eb2ace5ac093e50ff406ebcd3e497a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-29 12:14:54 +00:00
hjk
449a749dd7 Debugger: Move part of debugger ramp-down to DebuggerRunTool
DebuggerRunTool and debugger backend process have (almost) a 1:1
correspondence, unlike engines or the debugger plugin itself.
So it makes sense to accumulate backend start/rampdown login
in DebuggerRunTool.

Change-Id: Ia105283bcdf2641c7e9a401b4146b34c20605ba7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-29 11:59:36 +00:00
Robert Loehning
c908a52628 Squish: Update to re-uploaded text
This should not expire after another year.

Change-Id: I86ed49d491f619509e6bd32fc2624df2a1c24f5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-29 11:43:58 +00:00
Nikolai Kosjar
a741b7300f Clang: Avoid diagnostics about unknown qdoc commands
Task-number: QTCREATORBUG-20512
Change-Id: Icbdcf7871738c9900544516467154ef73c595e1b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-29 10:28:16 +00:00
hjk
65be72d64d ProjectExplorer: Add RunConfigFactory::addRunWorkerFactory convienience
There is a recurring special case that certain run controls depend
on the presence of specific RunConfiguration (which in turn has
it's own restriction on e.g. target or project types) but have no
further restrictions.

Make it easy to handle that case.

Change-Id: I2e86f366591b02003f720dcc00b4c52bb2f34e00
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 09:03:29 +00:00
Leena Miettinen
019f3c0d6c Doc: Describe new filters in Issues pane
... for Clang Code Model and Python.

Change-Id: I4a1844137874c5c2c4bd3f0348879cf4c40ceda0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-29 08:33:04 +00:00
Ulf Hermann
0f3409bf3f QmlProfiler: Set the future to finished after loading all events
Change-Id: I9b23eb5a10558279a47b9bcc106430d5c2b802e0
Task-number: QTCREATORBUG-20508
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 08:17:58 +00:00
Ulf Hermann
bfb3764328 QmlProfiler: Set the feature on Qml types when loading from qzt
Otherwise they are all invalid and nothing is loaded.

Change-Id: I12c71b231c81ce961754c1de67766010f00dd8d5
Task-number: QTCREATORBUG-20508
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 08:17:40 +00:00
Tobias Hunger
3f83cf2447 ClangSupport: Fix typo in variable name
Change-Id: Ic8574b95d4ac477e6bede896eaac0cbc46e6fdd8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-29 08:14:19 +00:00
Ivan Donchevskii
0d64011e47 ClangTools: Synchronize standalone tool diagnostic settings
...to the global diagnostic settings list.

It was possible to add/remove some configurations without
adding/removing them to the checks combobox.

Change-Id: I31608fd3758c385aa2fb7ce06aceeb0b91403c50
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-29 07:52:24 +00:00
Leena Miettinen
80dd54ec8b Doc: Describe the Cancel Build button
Change-Id: I448cd01cd9d2741ff8a4dcb962ddbf3d839f0aa8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-29 06:49:29 +00:00
Christian Stenger
d5f3370a6d ProjectExplorer: Fix compile for older compiler
qOverload() needs support for variable templates, which GCC 4.9 does
not support yet (it is only supported since GCC 5)

Change-Id: I79d6d234cdfb36ec539fcccc6619be39fae1b1fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-29 06:40:36 +00:00
David Schulz
3e618cbf76 Editor: fix continuosly repainting partially visible annotations
Task-number: QTCREATORBUG-20422
Change-Id: Id171d8cb3022dd6e345e55fdf029c445bc42c382
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-29 04:50:12 +00:00
Eike Ziller
c8c6b28e22 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h

Change-Id: I192b9e88f967182f3275b4b98abed1220c26daac
2018-05-28 16:10:23 +02:00
Eike Ziller
c1c57f0c38 Merge remote-tracking branch 'origin/4.6' into 4.7
Change-Id: Ifddceb06f377ea428300fa8a48908cfc44b98705
2018-05-28 16:07:00 +02:00
Nikolai Kosjar
bae61e08ea ClangTools: Fix applying fixits one by one
If a file had multiple fixits and only a subset was applied, the
remaining fixits in that file were invalidated. Fix this by adjusting
the locations of the not yet applied fixits.

Change-Id: I2c190412e871e9011c4d4a62ed938e76ad4cdf72
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-28 13:54:54 +00:00
Leena Miettinen
79b958b02e Doc: Describe Previous Bookmark and Next Bookmark functions
Describe the Bookmarks menu options and the buttons in the
Bookmarks view. Update and add screenshots.

Change-Id: I5a72fd1679fe1c3d674dc703884e3e9c3a663a47
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-28 13:46:47 +00:00
Eike Ziller
6e66b2a078 Remove some lambdas from Utils::transform calls
It is often possible to user (member) functions or members directly.
That improves readablility and potentially reduces the total number of
symbols.
Also use qobject_container_cast at places where it is appropriate.

Change-Id: Ia2591bca356591e001e2c53eeebcf753e5bc3c37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-05-28 13:45:20 +00:00
Eike Ziller
d8caa228ea Add changes file for 4.6.2
Change-Id: If2012dc8a6deb26e1f55205e4d772645553c6f57
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-05-28 13:42:04 +00:00
Leena Miettinen
8d9942300f Doc: Mention the Context Help context menu item
...for getting context sensitive help for a class or function
(an alternative to pressing F1).

Change-Id: I5c742f13a7eedde39d75cdb35c7ae860ac531567
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-28 13:02:54 +00:00
Eike Ziller
005b0c1147 Add option for parallel jobs to make step and use it by default
By default the make step uses idealThreadCount jobs, except if it finds
a "-j" option in the MAKEFLAGS variable. The user can opt-in to override
MAKEFLAGS anyhow, and can also choose a different number of build jobs
(including 1).

This option is available for unix-style make. It is not available on
Windows with MSVC tool chain, which would use either nmake (does not
support parallel jobs) or jom (does parallel building by default).

Task-number: QTCREATORBUG-18414
Change-Id: Ic0b5c732d899607ce67ef0b496cc758497a3113a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-28 13:00:50 +00:00
Ulf Hermann
bd659b2b99 QmlProfiler: Clear the model manager before deleting it
We cannot have the model manager clear itself from the dtor, as the
order of deletion between the various other objects parented to the tool
is undefined. Make sure we get into a clean state before the model
manager disappears.

This fixes the soft asserts when the tests shut down.

Change-Id: I8fcd52a7c2d0703cbdd215d85aa1d80c2e3296a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 12:54:39 +00:00
Tobias Hunger
88b065db3f CMake: Do not crash when deleting cmake tools
Do not crash when the cmake tool that was used to parse the project
gets removed.

Change-Id: Ieda3ae2025dbcfb1f90d9bd01c5f0ed960756c6a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-28 12:36:33 +00:00
Oswald Buddenhagen
d03fb35067 qmake: fix file id mapping lifetime management
turns out that flushing the ids together with the ProFile cache was an
abysmal idea, as the latter expires after a few seconds after loading
the project, while references to the ProFiles (and thus the underlying
file ids) are kept for as long as the project stays loaded. the early
flush would cause re-use of the file ids, which would wreak all kinds of
havoc when re-loading projects.

instead, ref-count the vfs class based on its instances.

amends 60245e55d7.

Task-number: QTCREATORBUG-20113
Change-Id: I7382a71af4d6a991156c05719deae9fb1e4fb278
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-28 11:25:27 +00:00
Christian Kandeler
491b057d14 QbsProjectManager: Add new files to the top-level product
... by default. The "New File" wizard, if not invoked from the context
menu, implicitly prefers Groups over Products, because the respective
nodes are tried first. Thus, we lower the priority of group nodes so
that their parent product will be a better match unless the group was
specifically selected.

Task-number: QTCREATORBUG-20480
Change-Id: I0c5b2dbf861065ee97ab957ec8bd86132295893e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-28 10:46:38 +00:00
Eike Ziller
b48742ad40 MakeStep: Do not require C++ tool chain
Fall back to C tool chain and then to any other tool chain.

Change-Id: I1683f304a8042cd949f33fcbd4ef18b663e56ea3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-28 10:00:41 +00:00
Ulf Hermann
ae5698fa8e QmlProfiler: Avoid double delete in details rewriter test
Using unique_ptr for parented QObjects is maybe not the best idea in the
first place ...

Change-Id: I95e2d1dd27f8f3d42d90d206e4fed0d866d1ea49
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 08:58:44 +00:00
Ulf Hermann
4f3e1b6024 QmlProfiler: Avoid soft asserts and warnings in details rewriter test
ProjectExplorer::Project wants an ID and a displayName, and Target wants
an IBuildConfigurationFactory that returns a priority >= 0. Give them
what they want.

Change-Id: Iab539d183669729d0e57505143b462ffa92730ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 08:58:07 +00:00
hjk
89049b6fa2 Debugger: Remove some dead code
Commented out in the analyzer base merge, and never missed since then.

Change-Id: I078b12a70970dc244bc4590520bdb1dd80d8b2ff
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 07:37:02 +00:00
hjk
c43100c601 ProjectExplorer: Simplify SessionManager::markSessionFileDirty(bool)
It did nothing if false was passed. So do not call it in that
case and drop the parameter.

Change-Id: I9b055cb0c0c8be85d528247a269fb7fea062326b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-28 07:36:52 +00:00
hjk
8416a14f3d Debugger: Simplify use of getUninitializedVariables()
Change-Id: I7962fe2d582fc3f2ad6a76fb600038f454b75dc0
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-28 07:36:42 +00:00
hjk
94d41afade Debugger: Move cpp snapshot storage to cdbengine
It's the only one using it.

Change-Id: I95dc4918c82653710a47cb8d0043bb3241e954ac
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-28 07:36:32 +00:00
hjk
db1174b6b8 Debugger: Remove a parameter with fixed value
Internal::displayDebugger's updateEngine parameter was always true.

Change-Id: I27e91b7327ef7f4ccfb7718ad47fe5316660ea17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 06:52:43 +00:00
hjk
a4d1af9828 Debugger: Conceptually fix temporary stop of mixed lldb+qml engine
That's similar to d4ea80ef7c, but for LLDB.

Change-Id: Ie38b49d48418c614e42c095e9bb7f7f7a6ad5fd8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 06:51:43 +00:00
Christian Stenger
38bc2358ac AutoTest: Use same pattern across file
Latest refactoring brought up a new pattern for
creating and using the fake future.
Follow the same pattern at older occurrence.

Change-Id: I4db4b3e6b0558660ef416e4201a017acba3de538
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-28 06:39:35 +00:00
Nikolai Kosjar
5e8ad2ca45 Doc: Update clang code model page
Since the clang code model is enabled by default now, remove the text
that describes how to activate the plugin.

Change-Id: I2e2c5d84ca00302cb5f9f15dceaab48279fce75a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-05-28 06:34:13 +00:00
Leena Miettinen
286d8d591a Doc: Describe the New Search option in Search Results pane
Task-number: QTCREATORBUG-17870
Change-Id: I51a7432d587ff426b20ea4212fd605c367e3d915
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-25 14:44:59 +00:00
Aaron Barany
95e0418e8e Editor: Improve visibility of some UI elements
Don't set the initial palette on the text color scheme dialog. For dark
themes this would cause the labels for the dialog to be black, which was
very difficult to read against the dark background.

Mini project selector now uses the highlighted text color for the item
that
has focus. This will work more correctly when dark themes use a more
readable selection color, which will be done next commit.

Task-number: QTCREATORBUG-18888
Change-Id: Ie666af0ce9f8a8030e5e83ccd9a4de362dccaa4f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-05-25 14:03:50 +00:00
Ivan Donchevskii
150d53e041 Clang: Use QFileInfo instead of QDir for clang executable path
QDir::exists() returns false for files which is not the
intended behavior.

Change-Id: I768432df93e10b3f8f570da4d94035038ff52e06
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-25 12:48:30 +00:00
Leena Miettinen
6b071f5e36 Doc: Describe mode selector styles
Task-number: QTCREATORBUG-18845
Change-Id: Ib9a7ae38f11624b5c22b4e7c889736cf4405a839
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-25 12:40:25 +00:00
Nikolai Kosjar
ff534ee354 More changelog for Clang Code Model
Change-Id: I8f53621400185d9d57e27d7d379a15061c240b11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-25 10:58:00 +00:00
Eike Ziller
5a6aabe708 Fix that removing splits results in code model issues
The code model is listening to editorsClosed signals, and checks for
which editors are actually visible when that signal is sent.
For this to work correctly, the signal must be sent only at the very end
after deconstructing all the views, because otherwise we might be in a
state where temporarily no editors are "visible".

Fix-up after 80ae992c91 which exposes the
issue.

Task-number: QTCREATORBUG-20464
Change-Id: I9ec5e579d681f2c12924be3d7b89aab398579505
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-25 10:00:59 +00:00
Ivan Donchevskii
bc458c7b5f Clang: Use the tree instead of the list for Clang-Tidy settings
List of checks does not give enough flexibility to
select/unselect specific checks. The tree fixes that.

Also remove Clang-Tidy checks line edit because it is
now integrated into the tree mode as an alternative way
of providing checks by pressing "Plain text edit" button.

'cpptools_clangtidychecks.h' is generated using python
script 'generateClangTidyChecks.py' and clang-tidy
from our LLVM/Clang 6.0 build.

Change-Id: I2ed1738cb2cbbf8dac6aba563469f06f69b11593
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-05-25 09:59:20 +00:00
Leena Miettinen
b1fcbfecce Doc: Add a link to a site map (TOC) listing all topics
Change-Id: Ibb71a67874d0146298c6bbed420549660426e0ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-25 09:30:31 +00:00
Leena Miettinen
de5db2d664 Doc: Describe new File System view functions
Change-Id: Iaa2592f7ae7188bbd136558c208c4523c25b3dfe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-25 08:55:56 +00:00
Nikolai Kosjar
bb5a4a8b20 Utils: Clean up ChangeSet
* Stick to coding rules
* Fix a variable name, probably a left-over.
* Simplify removing first items.

Change-Id: Ibfcc5ab4d6fd4cd21e6ab24c6964da4ad4478e8e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-24 13:04:25 +00:00
Nikolai Kosjar
8c8033b438 Clang: Link to documentation for tidy/clazy checks
...in the diagnostic tooltips.

The "enable option" in the top right of the tooltip (e.g.
"-Wclazy-range-loop") is now clickable and will open the documentation
page for clazy and tidy checks.

Change-Id: I6e7e2d1fc39b3b6ccee328276b7a52ae4809b567
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-24 12:37:09 +00:00
Nikolai Kosjar
8639cfcc50 Clang: Fix empty category/option header in diagnostic tooltip
We assumed that diagnostics from clang itself (not tidy, clazy) have
always an enable option set, but this is not true as can be easily
observed with invalid code:

    bla // error: unknown type name 'bla'

Due to the assumption we were running into the
conclude-category-and-option-for-tidy-and-clazy code path, which failed
and resulted in an empty category and thus an empty line in the tooltip.

Change-Id: Ic21629a637a7b0e5736ac514dc826bdc4c0cf91d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-24 12:34:09 +00:00
Nikolai Kosjar
69dec8a9f8 Clang: Create preamble on first parse
...now that parsing and creating the preamble is faster due to the
skipped function bodies.

As a consequence, we can remove all the extra jobs that were needed to
get an initial AST faster.

Change-Id: I79a66b8a0e8a180850af6daf353d9a679089bbb1
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-24 12:33:55 +00:00
Nikolai Kosjar
8fa15892a4 Clang: Skip parsing function bodies in the preamble
With this, we get

 * Significantly faster reparsing (~ 50% faster here for texteditor.cpp)
 * Less crashes due to less code to handle
 * Reduced memory consumption and size of the preamble on disk due to
   smaller AST

On the downside, we don't get anymore diagnostics for invalid template
instantiations, e.g:

 -- header.h --

  template<class T>
  bool cmp(T t1, T t2)
  { return t1 < t2; } // Function body is not parsed.

 -- main.cpp --

  #include "header.h"
  struct Foo {};
  void example(Foo foo)
  {
      cmp(foo, foo);
  }

The diagnostic "error: invalid operands to binary expression ('Foo' and
'Foo')" is not reported anymore. It will be noticed at build time.

Change-Id: I9b37be349f99af88b4786380ca1d8e6aff39b123
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-24 12:33:47 +00:00