Commit Graph

57165 Commits

Author SHA1 Message Date
Marco Bubke
6a541fd692 Clang: Add sources manager
Indexing source files multiple times is unneeded overhead in many cases.
The source manager is a support class to handle that cases.

Change-Id: Id737eaa9a691c54563279562833493a221eb3431
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-20 08:57:28 +00:00
Ivan Donchevskii
5077bf379d Clang: Fix menu button text capitalization
Change-Id: I771cbaebbb801665e96cc3d6ea337ebe15872803
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-20 08:26:16 +00:00
Eike Ziller
9f60cdcdaa Merge remote-tracking branch 'origin/4.7'
Change-Id: I15962a85b0cc37c5a00e15ef7eac0445aad6c295
2018-08-20 09:05:18 +02:00
Christian Stenger
7a8e6b052e AutoTest: Disable run related items while executing tests
While executing tests it had been possible to trigger another
run when using the context menu on one of the result items
inside the results pane. Prohibit it at first hand instead of
running into a soft assert later on.

Change-Id: Ib5a4ca53a2605d12f6539fd68aee099211f12174
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-20 06:26:48 +00:00
Christian Stenger
d498a7fcf9 Clang: Fix splitting flags
Correct syntax of using regex substitution. The missing
replacement seems to have resulted performing the search
case insensitive which in turn resulted in splitting within
an option. Fix this by explicitly passing an empty
replacement.

Change-Id: Ieccde1f9daae445d0ebe3b7454f56d09f0139e3c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-20 06:26:30 +00:00
Orgad Shaneh
9e27c865f5 Clang: Fix usage of QString args
Change-Id: I49f1a79b9dfd27d896b296d65d375a05879bdc8f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-18 18:04:21 +00:00
hjk
0769b0d65f Debugger: Simplify GdbEngine::handleExecRun
Combine two branches. The function is only used in the remote and the
local plain case, and the resulting actions were the same.

Change-Id: I30c0b4488f04667d88b69f2c8ecd1dead92e0766
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-08-17 16:03:42 +00:00
Christian Kandeler
3ff33198bc Botan: Fix build with MSVC from Visual Studio 2017 15.8
Task-number: QTCREATORBUG-20955
Change-Id: I7413e73137248bb880fad9b369e05e09101987fd
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-17 13:31:00 +00:00
Robert Loehning
21bcc7f38b Squish: Use sets instead of lists for kits in use
They fit our use-case much better.

Task-number: QTCREATORBUG-20874
Change-Id: Ifa06ce00f3e6999a99c3bc2bb7e9ba759fa02e94
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-17 12:58:14 +00:00
Leena Miettinen
6564922254 Doc: Move common debugger functions to an include file
Some debugger functions are used for both C++ and QML debugging.
Putting them into an include file enables using the descriptions
in both the Qt Creator Manual and Qt Design Studio Manual.

Change-Id: Ief7e1e1c76a881eb6722161a1b216b3d711c6290
Reviewed-by: hjk <hjk@qt.io>
2018-08-17 12:37:44 +00:00
hjk
7866f62892 Debugger: Fix core file loading
Amends 99e3635ef.

Change-Id: I0146416af32a6464765de008630ca1a1a05231a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-17 12:35:45 +00:00
hjk
3b5ecac238 Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.

The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.

Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.

Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.

The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.

There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.

The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.

There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.

Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-08-17 12:35:15 +00:00
Orgad Shaneh
6a04f70e5b Botan: Fix build with compiler wrapper
When using QMAKE_CXX='ccache g++' the build failed.

Change-Id: Ic580d4d6561711d4d871ea242151628ad2678f99
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-08-17 08:39:31 +00:00
Christian Stenger
e885b30663 Botan: Fix passing sysroot on macOS
Change-Id: I6c55947a637b975950edc93ecf6357369e22a13b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-17 08:29:14 +00:00
Eike Ziller
d6911fd10c Update change log for 4.8
Change-Id: I6d8d0b4831baa07fdb4967918cc0dd2d0c85fa7b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-16 14:56:47 +00:00
Leena Miettinen
a90dd96621 Doc: Move qtquick-profiler.qdoc to the "qtquick" folder
It is needed for the Qt Design Studio Manual, where the
"analyze" folder is now excluded from doc sources.

Change-Id: Ic5fc97f05ca84e428be6309979e2927563c9e814
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-16 14:49:18 +00:00
Leena Miettinen
8828d79c4a Doc: Use defines in navigation links
To be able to build Qt Creator Manual and Qt Design Studio Manual
from the same sources.

Change-Id: I6adbc7b7f23c40f24508a8de7ae9ad5a2a3a103e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-16 14:48:46 +00:00
Christian Stenger
5ddc14257d Clang: Compile fix for older clang
This patch is needed due to some issues of an older STL
implementation. The patch can safely be reverted when
Xcode 8 is marked as outdated.

Change-Id: I0f66eb6f3a0ae71f0da3f5678d9b4d47cdf146bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-16 10:43:03 +00:00
Eike Ziller
b70f2b2a69 Fix Ctrl+n shortcut in locator widget in some configurations
With Gnome, Qt seems to send shortcut override events to the
CompletionList, and not to the input field, so handle
the shortcut override for Ctrl+N/P there too.
Technically this is the correct thing to do anyhow, since
CompletionList also handles the corresponding key press events.

Task-number: QTCREATORBUG-20867
Change-Id: Ia72aae3b085140f18b0f1007991d38864dfe8426
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-08-16 10:37:33 +00:00
Eike Ziller
16803bf9ec Add changes file for 4.7.1
Change-Id: I95ec99d566ae77313f7e729d886f7c23ac9ace28
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-16 10:32:04 +00:00
Eike Ziller
eb0f3997ad Update macOS requirement for binary packages
Qt 5.11 does not support macOS 10.10

Change-Id: I7438b1354c006447d7ba2148ebe616dafe39ef53
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-16 08:32:46 +00:00
Orgad Shaneh
44776760ba Tests: Add #include <QtGlobal> for version checks
It is required with Qt 5.11.

Change-Id: Ie6aee4a5d71a370952f908561a40ccc2d34d31c5
Reviewed-by: hjk <hjk@qt.io>
2018-08-16 08:29:36 +00:00
Leena Miettinen
c76db4d085 Doc: Use defines to enable hiding device-related information
Currently, only Android and embedded Linux devices are supported
by Qt Design Studio.

Change-Id: I10005f6a9cfeb93c99447796c1c9e6d47ab578de
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-16 07:34:50 +00:00
Orgad Shaneh
98b6fd26bf Dumper: Fix enum display in nested types
When used in SubItem, enums were displayed as
"value of type E at address <addr>".

Change-Id: Ieecfb791126c6f63f272817afc6c8d05f28b9242
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-16 06:42:21 +00:00
Orgad Shaneh
c577774177 MimeProvider: Add #include <QtGlobal> for version check
It is required with Qt 5.11.

Task-number: QTCREATORBUG-20912
Change-Id: I172caf605a95d560d730d8007f2cf623abc90957
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-16 06:42:10 +00:00
Ivan Donchevskii
0bc721fa04 Clang: Improve LLVM_CXXFLAGS
Remove MSVC-specific flags and split the string into
separate flags.

Change-Id: Idce7c2e988651df670c0119245dc6f6c89461c41
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-16 06:36:44 +00:00
Michael Weghorn
ec5e70eeda Make pretty-printing GDB's LazyString work
Qt Creator failed to properly display GDB's LazyString.

The problem was that GDB's 'PlainDumper::__call__' passed a 'gdb.Type',
while 'DumperBase::putCharArrayHelper' called methods that are only
defined for the custom and more abstract 'Type' type defined in 'dumper.py'.

As described at [1], GDB's 'LazyString.type' "holds the type that is
represented by the lazy string’s type. For a lazy string this is a pointer
or array type. To resolve this to the lazy string’s character type,
use the type’s target method."

In addition, 'gdb.Type' does not have a 'size()' method, just a 'sizeof'
member, s. [2].

Since all other uses of 'DumperBase::putCharArrayHelper' are passed
a "proper" type, extract the code common to the GDB case and all others
into a separate method and directly call this one for the GDB LazyString
case.

[1] https://sourceware.org/gdb/onlinedocs/gdb/Lazy-Strings-In-Python.html#Lazy-Strings-In-Python
[2] https://sourceware.org/gdb/onlinedocs/gdb/Types-In-Python.html#Types-In-Python

Task-number: QTCREATORBUG-20939
Change-Id: I16608668c9403b6d8e509dab17eb1788586f453e
Reviewed-by: hjk <hjk@qt.io>
2018-08-15 19:23:52 +00:00
Eike Ziller
4e1a3b0029 File System View: Fix scroll position and bread crumb in some cases
Use a model index from the right model, and update the bread crumb, when
updating the scroll position delayed, for the case where the directory
for the file was not already loaded in the file system model yet.

Broke with introduction of the folder vs alphabetic sorting.

Task-number: QTCREATORBUG-20897
Change-Id: Ifc912184b4910ed546c0141044eead3650b98c87
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-15 12:29:44 +00:00
Eike Ziller
db9837fa6c Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/clangtools/clangtoolruncontrol.cpp
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: Ib1e8abf066898b50c90fc1ccba4697fe983e8a8f
2018-08-15 13:53:28 +02:00
Thomas Hartmann
7d5013cefd Use Qt::AA_UseOpenGLES instead of QT_OPENGL
Environment variables are passed on to user applications,
and we should avoid forcing ANGLE on these.

Task-number: QTCREATORBUG-20808
Change-Id: Ia6663e4e2bc4f78ec053d100563a0f07d47092be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-15 10:46:46 +00:00
Eike Ziller
58747b2de1 Fix hiding file system view's bread crumb
When hiding the bread crumbs in the filter option dropdown, there was
some spacing and the separator line left.
With this patch, the spacing and line are hidden too, making the layout
nicer and more similar to before the bread crumbs feature existed.

Task-number: QTCREATORBUG-20733
Change-Id: I560b4414804c8cd25e88d645aa3042acb1b8e06c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-15 09:41:14 +00:00
David Schulz
7bc14bf349 Debugger: add option to disable task entries for exceptions
Task-number: QTCREATORBUG-20915
Change-Id: I3b7bda65f5b645cd4d8f9582b9185cb27b2c9f91
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-15 07:46:33 +00:00
Marco Benelli
8fee3dd4b1 qmljs: update some module versions
Update module version for import completion.

Task-number: QTCREATORBUG-20785
Change-Id: I11761854bd5c7c4ce832f39b815f7bbf710db5e8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-15 06:32:07 +00:00
Christian Stenger
1cd522374a ProjectExplorer: Fix compile
Change-Id: I13b86f69092313f1e0d1309980914dd5f3d29452
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-15 06:31:01 +00:00
hjk
96be20d816 FakeVim: Alias C-w C-h/j/k/l to C-w h/j/k/l
In Vim land do as Vim does.

Change-Id: I4172039804fbee2c596f02587028943ac9845164
Task-number: QTCREATORBUG-20923
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-15 06:26:10 +00:00
Christian Stenger
42e20ce0c3 TextEditor: Fix compile on macOS
Change-Id: I78929b2d3f6e7803879e63ba5611e5210cc53f90
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-15 04:57:54 +00:00
Marco Bubke
7bae47642c Add optional system include to compiler option builder
System includes suppress warnings and prevent indexing of unwanted symbols.
Using system includes for all includes outside of the project can be
quite advantageous. The rootProjectDirectory() can be extended to be set
in the project settings. An automatic generation could be possible but
could create an unwanted path which includes files outside of the
perceived project.

Change-Id: Ib9d3158f14f41efe1f6657f962d5c4437bb324b2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-14 15:03:51 +00:00
Marco Bubke
b592339b4d Clang: Don't parse system headers
Change-Id: I6474fbe4f43daaac930ad6ba49fd9cb3145a3bbd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-14 15:03:41 +00:00
Marco Bubke
4195fce68f ClangRefactoring: Integrate generated files
This is an intermediate step to handle the indexing of the project parts
completely. The generated files are now independently handled from the
project parts. We still not handle the case the a file is indexed but the
generated file is not provided. This will be done in a different patch.
All provided data is now sorted too to improve merging.

Change-Id: I09712b99217a881ec0a233d09aea8659fb787324
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-14 12:47:03 +00:00
Robert Loehning
24f33dc482 Squish: Update Creator's sources to v4.7.0
Task-number: QTCREATORBUG-20344
Change-Id: I7664f2f1b9f9412b9564f192319f9ed832dc142a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-14 10:04:10 +00:00
Hannes Domani
5a3a432396 Valgrind: Fix heob check if executable exists
Task-number: QTCREATORBUG-20938
Change-Id: Id1c3cbf610b97a13209e6a767c5e881e9be18ac7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-14 10:03:07 +00:00
David Schulz
493c5396ff GenericHighlighter: check text color against background
The kate syntax highlighter format allows to directly assign a color for
a specific item. This could result in a bad contrast ratio between text
and background. Check the contrast ratio according to W3C Recommendation
and apply if it exceeds the minimum contrast ratio for large text.
(https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-
contrast)

Task-number: QTCREATORBUG-20919
Change-Id: If5a5d09224446df72f31027cd30e50088179d6d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-14 09:25:44 +00:00
Eike Ziller
cfbc780a20 Fix Linux WMClass also for standalone desktop file
Task-number: QTCREATORBUG-14707
Change-Id: I55a208bc6af58a067029a02eb8f6d114af8dd007
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-14 08:40:15 +00:00
Christian Stenger
f6b228842c Clang: Fix possible nullptr access
Change-Id: I8643912f02d127286b0a0ededbaf7d4f23347a5f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-14 06:35:47 +00:00
Ivan Donchevskii
f60b035295 Clang: Add button to generate compile_commands.json
Change-Id: Iaabdcfc8d1b3463c3f6e5ce47536f9c52556eac0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-13 13:24:12 +00:00
Ivan Donchevskii
934e9b2e19 Clang: Fix anonymous namespaces spelling
Follow-up for d2b951565a. Handle anonymous namespaces
via USR because they don't have displayName.

Change-Id: I5c747951ce406963a0c9a22ff78c92678909a61c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-13 13:07:24 +00:00
Eike Ziller
b40b5cb79c Fix Botan build on macOS
Since some Xcode version, running clang directly from the Toolchains
directory requires explicitly passing the sysroot to use.
If that is not done, inclusion of some standard headers like string.h
fails.

Change-Id: I640eca41d4132354f1091a7514586cb582e5d05c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-13 09:58:53 +00:00
Christian Stenger
13fbd1f867 Botan: Fix compile if documentation tools are present
Change-Id: If5adae5840cca75e3a1429922f48ea25b9903dc3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-08-13 08:43:33 +00:00
hjk
1567679b81 Debugger: Tighten Perspective interface
Pass id in constructor, so it can be const.

Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-13 08:42:52 +00:00
Eike Ziller
1d68e08359 Fix color of labels and combo boxes in debugger toolbar
ManhattanStyle adapts the palette of widgets in its polish(...) method.
But creating widgets directly schedules a polish event, and after a
widget was polished it will never be polished again (except if the style
changes).

Before f45f1a8cef, toolbar widgets were
directly added to the widget hierarchy of the toolbar, but now that is
no longer the case. That means that the widgets are polished before they
are added to the toolbar hierarchy, so ManhattanStyle does not change
their palette.

To fix this we explicitly make tool bar widgets "panelwidget"s when they
are added to a perspective.

Task-number: QTCREATORBUG-20916
Change-Id: I659798c7c314a481d1ec467b1877f2e6ddd6da70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-13 07:49:10 +00:00