Commit Graph

5265 Commits

Author SHA1 Message Date
Alexandru Croitor
89fe2681f7 [Debugger] Add dumpers for Python "PyObject"s
The dumper calls PyObject_Repr and shows the result of that as the
value of a PyObject.

It also adds three new sub fields to show the object class (type),
super class (base class), and the meta type (the type of the class
object).

Change-Id: I0612833321f6d2b50826588e775cfa12e1db28e4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-19 11:17:36 +00:00
Thomas Hartmann
7bff611ee1 QmlDesigner: Call all Component complete handlers
We have to ensure to properly call all Component complete handlers.
A single component usually has QQmlComponentAttached objects,
which we have to iterate over.

Therefore emitComponentCompleteSignalForAttachedProperty() is not correct.

Task-number: QDS-269
Change-Id: I4aed5d511f9f6e21f72efb955fc6db21b70e7c42
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-10-18 14:41:57 +00:00
Alexandru Croitor
f612833d83 Debugger: Pretty print the name of a function when using lldb
This is achieved by calling "po" on an address value casted to a
simple function pointer type, regardless of the actual type of
the function pointer. lldb does not complain, and reports the
library where the function is defined, its name, and location
in the source code if available.

Change-Id: I23ccce62e33bcf213ccdcb55c9836d54333f3c86
Reviewed-by: hjk <hjk@qt.io>
2018-10-15 15:39:16 +00:00
hjk
cd3011520f Debugger: Fix qfloat16 dumper for LLDB 6.0 on Linux
Needs some hint that floats are involved.

Change-Id: Ie6871ce3b6bb7aaff27e6c763a6002a6d0a90d70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-12 11:24:46 +00:00
Eike Ziller
cec48ea156 Merge remote-tracking branch 'origin/4.7' into 4.8
Change-Id: Ic90a78fb7be7b8eb23f250f04eb074813f2a004a
2018-10-12 09:39:54 +02:00
Marco Bubke
414c7f9f1e TextEditor: Add Overloaded Operator and Punctation to text styles
Task-number: QTCREATORBUG-21285
Change-Id: Ib5d8aac74ff94c506f0888dff3ada802ac605af0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-10-11 12:48:38 +00:00
Tim Jenssen
8d8aa62e4d QmlDesigner: change the import path to QtQuick2 path
Change-Id: I8adb6fdd334647dd85a8a9f95738ac22fc690363
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-10-10 08:36:04 +00:00
Sergey Belyashov
fd186bed20 Russian translation update
Change-Id: I40965282a75586bb23e6e42b7d82bd8532290820
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-09 12:47:51 +00:00
Alessandro Portale
0f4782fbca design.creatortheme: Set DarkUserInterface=true
It is a dark theme and should be marked accordingly.

Change-Id: I437a293162f5bff4ac549f08401ed9f7349213eb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-05 07:41:58 +00:00
Ivan Donchevskii
efc39304a1 Clang: Move the majority of completion items sorting to ClangBackend
With this change ClangCodeModel only needs to sort completions by prefix.

Also some other optimization have become possible and are implemented here:
1. Getting completions after '{' for constructor overloads by replacing
   it with '(' inside usaved file.
2. Checking for all overloads requires only previous item check because
   all Class completions are already sorted to go before all CXXConstructor
   completions. Since they are not mixed no extra search is required.

Change-Id: Ie0187ad96a20857a63c1d71ddec74606b803f572
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-10-02 12:29:23 +00:00
hjk
089b50f7d3 Debugger: Fix display of upper half of short unsigned ints
Change-Id: Ie15c66c02c15420436b26c65af3cee9a19634e5c
Fixes: QTCREATORBUG-21038
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-02 10:12:33 +00:00
Tim Jenssen
21fd164110 Theme: adjust to new theme color names
Change-Id: I6d99ff37ac419058729b248860a56eecc9fa0be3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-09-25 13:57:22 +00:00
hjk
ada0e43c93 Debugger: Fix use of external debug info for installer-based Qt
On Linux. Required installs are the gcc-built Qt libraries themselves,
the "Sources" and "Qt Debug Information Files" components.

Fixes: QTCREATORBUG-20693
Change-Id: I920efd641ce3ee4583741ea1db0bea18031adc51
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-24 13:37:24 +00:00
Alessandro Portale
20f3c8d654 Wizards: Remove Canvas 3D application wizard
Canvas 3D is deprecated from 5.12 on.

Task-number: QTCREATORBUG-21078
Change-Id: Icfd4d3651bcc3a9e65fcf52297ec173330f7b0c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-18 16:25:35 +00:00
hjk
c3433519a6 Debugger: Add an explicit QObjectConnectionList dumper
Mostly for sanity reasons when debugging the QObject dumper itself.

Change-Id: I7d6267625f091788e73b0b28695e9b99e33ab3e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-17 08:53:43 +00:00
Alessandro Portale
70fdbedbd8 Qml tooling: Support Qt 5.12
QtQuick 2.12
QtQuick.Controls 2.5
QtQuick.Window 2.12
QtQuick.VirtualKeyboard 2.4

Change-Id: Ie4a60ac93b25ca735e28ac84447cfe60778f8d7d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-09-13 13:38:09 +00:00
Alessandro Portale
9e221f6ff7 QmlDesigner: Improve the quality of state thumbnails
The ImageProvider needs a correct sourceSize. And the puppet needs to
consider the devicePixelRatio.

Change-Id: I408f956fdb4adb23f272c879878e44e88ca76321
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-09-13 07:08:09 +00:00
Eike Ziller
a865fa513b macOS: Fix passing environment to terminal
We do not actually start a new Terminal process, so we need to clean up
the environment after the fact.

Clean the environment in the started shell except for some essentials,
read the config files as if for a login shell, and re-export the
environment.

There still can be differences, since environment variables set in the
user's bash profile etc will "win". This is wrong if we want to open the
terminal in anything but the "system environment", especially if the
PATH is effected, but I don't see how to solve that without severely
crippling the shell setup. This is also the current state on Linux.

Change-Id: I1d3c8184ac3bf543675e96f73253085fa6b1b29d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 11:09:31 +00:00
Eike Ziller
972cd5514f macOS: Reduce clutter shown when opening terminal
By writing the needed special commands to a temporary file.
What we cannot get rid of is the command for opening a bash that sources
that file.
Since Terminal usually opens a login shell, but we cannot set a special
file for sourcing in that case, the special commands include mimicking
the behavior of a login shell by reading the corresponding config files.

This is in preparation to setting up the environment for the shell.
Since we do not start a new process for the Terminal on macOS, we will
need to explicitly export the whole environment after the fact,
resulting in potentially dozens of export commands to be executed.

Change-Id: Ia24cf1f00e62411734f5d6514d073e11d4cdae6e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 11:09:24 +00:00
Eike Ziller
53f0e6c0ee macOS: Replace openTerminal.command by python script
This script will become even less trivial in the future, so use an
actually usable programming language for it.

Change-Id: I4fa1c8d327f97585bf8dde0ffaefc5fac7c1ca18
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 10:04:33 +00:00
Christian Kandeler
d8ebdf1a30 Project Wizards: Update the qbs templates
- Remove the unneeded Project item.
- Remove the minimumQbsVersion property. It was originally added to
suppress warnings in some ancient qbs.
- Install applications to the bin/ directory by default.
- Add main.qml to the files list in the QtQuick template. It is good
practice to list all source files in a project file, and in this case it
is even required for building against a static Qt.
- Remove an unused file.

Change-Id: I05f36e8ae64c0a2150639760db9630dd5d613ab9
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-09-07 15:05:43 +00:00
Eike Ziller
ac9f1f798c Merge remote-tracking branch 'origin/4.7'
Change-Id: Ifb51ca9893549c478e99c9fc3ea6c32d5d5a28a2
2018-09-07 14:39:42 +02:00
hjk
4cb0b3fa73 Debugger: Make enum class dumper test pass again for gdb
Change-Id: Iaded82ab13f30e7222eb14f548ac72d1c6502b7d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-06 13:41:51 +00:00
hjk
8de44d9281 Debugger: Make std::once dumper test pass again on Linux
Change-Id: I46ad9bb8ed3beb4aac23f5b3cca69f3ef0c92971
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-06 13:35:08 +00:00
Michael Weghorn
1ae96a9090 Debugger: Fix display of children in GDB's PlainDumper
The 'putSubItem' method expects an object of the
Value class as defined in 'dumper.py'.
Therefore, create such an object for the gdb.Value
when passing it into the method.

Task-number: QTCREATORBUG-21000
Change-Id: I5277f832ee2aae808824f3dcf728fdaa0e2a3c78
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-05 05:41:55 +00:00
Michael Weghorn
34840e8088 Improve displayed type for GDB's PlainDumper
Use the name attribute of the gdb.Type rather
than that of the pretty printer.

This e.g. displays 'std::vector<int>' rather than
just 'std::vector' for an int vector.

Change-Id: I53da01bb5ba67bcd8d7113beda6ff03e708d60f9
Reviewed-by: hjk <hjk@qt.io>
2018-08-30 12:39:05 +00:00
Christian Kandeler
71e94e4e28 Theming: Fix value of TextColorDisabled for classic mode
TextColorDisabled has always been the same value as TextColorNormal
(which was presumably unintended), and nobody seems to have noticed for
a long time. However, as of commit f7a0a3cd26 we have been using
TextColorDisabled to display disabled project nodes, which means users
could not tell enabled and disabled parts of the project apart anymore
when using classic mode.
We now use the same value as in the other themes.

Change-Id: I1f616b6808d6c2012748af24b90953e4eb75df18
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-30 10:08:00 +00:00
Venugopal Shivashankar
24cabc6dbb Wizards: Fix minor language issues in the project templates
Change-Id: Ia999054ecbc674d2bb920ca78f5fb758055a8140
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-30 09:23:30 +00:00
Christian Stenger
8b397d6501 Theme: Fix typo
Amends c79f436e2a.

Change-Id: I211b667b50675b8fa48bdf231146ff7e406f592d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-27 09:14:45 +00:00
Morten Johan Sørvig
c79f436e2a Improve macOS dark mode support
The current theme support in Creator works well, also
in macOS dark mode. This change makes sure that the
native macOS appearance setting (for the Creator process)
and the creator theme setting are in sync.

This is required to avoid light/dark palette issues for
the light Creator themes when the desktop is configured
for dark appearance.

Add a “DarkUserInterface” flag to the creatortheme files.
This flag indicates if the theme is overall dark, with
light text on dark background.

Make setCreatorTheme() force the standard light aqua
appearance for light Creator themes.

Change-Id: I1a5c183230ab0e66641fd834df19d7e0ad1b6a53
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-24 07:50:25 +00:00
Thomas Hartmann
336ea19b17 QmlDesigner: Update icons of Qt Quick Designer
Change-Id: I970da740c15505cae525fc3514a27c1bc12fe40f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-22 09:50:01 +00:00
Orgad Shaneh
9ed36db854 Dumpers: Add a dumper for QPointer
It has an internal QWeakPointer<QObject>, which is not helpful. Cast to the
QPointer's template argument instead.

Change-Id: I9308c5eb9ea3867a682c4e4cba5d8041547981d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-20 12:47:17 +00:00
Eike Ziller
9f60cdcdaa Merge remote-tracking branch 'origin/4.7'
Change-Id: I15962a85b0cc37c5a00e15ef7eac0445aad6c295
2018-08-20 09:05:18 +02: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
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
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
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
49a498c0a6 Debugger: Fix accessing member function
Amends 975f5886a6.

Change-Id: I0e8f5a9ab0ccf76fc095e0e05bfbdb838a7583d3
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-09 12:56:26 +00:00
David Schulz
975f5886a6 Debugger: fix cdb enum dumper
Change-Id: Iac407d98afd8f024a45d0f6550c8b3c00df0a515
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-09 08:30:37 +00:00
Eike Ziller
847787f146 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp

Change-Id: I72882df605bc3fc8a8d20118fd4e49207ac92664
2018-08-07 09:42:02 +02:00
Sergey Belyashov
8353a6ed20 Improve Russian translation
Change-Id: Ib632fb9f5efe97a1913f9a0c09512b6b99ef2b6e
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
2018-08-03 14:27:09 +00:00
Thomas Hartmann
4fd17b6604 QmlDesigner: Fix clazy warning
Use nullptr

Change-Id: I787794c67e89af7bc7a2d82def580bea3c8f2653
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-08-01 14:38:47 +00:00
Christian Kandeler
e968513036 QmlDesigner: Fix typo in file name
Change-Id: I06086caeaa2144e93203bc0cea902259be5d73c5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-01 11:52:35 +00:00
Thomas Hartmann
2cb238471a QmlDesigner: Modernize
modernize-use-using

Change-Id: Ia8eef3d97db7b99ec813a030e1f39ee492d6cf9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-08-01 07:42:47 +00:00
Thomas Hartmann
ca42e48dac QmlDesigner: Keep Qt 3D scenes from crashing
If we do not set the source property of the Q3DSPresentationItem
nothing is actually rendered.

If a scene is rendered in the puppet we get an invalid OpenGL context
when rendering in the qml2puppet.

Change-Id: I74db0df7de759e830499967bc6985745be291856
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-07-31 12:41:54 +00:00
Ulf Hermann
59175ac423 Merge "Merge remote-tracking branch 'origin/4.7'" 2018-07-25 13:36:52 +00:00
Alessandro Portale
859d847769 QmlDesigner: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: Ic42b5c59fed5a4a01853138542d8156471e86f58
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-07-25 12:53:26 +00:00
Ulf Hermann
5b8989d017 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/debugger/qml/qmlengine.cpp

Change-Id: I31edd50b2301f4d9b64e1c7980c4ed371e00c2dc
2018-07-25 14:19:14 +02:00
Robert Loehning
6bf5e71c43 Update German translation
Change-Id: I681c854023a6ccb338751844afda8b37aff36318
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-25 08:55:48 +00:00
hjk
27cd7162e1 Debugger: Make LLDB instruction-wise stepping work with 3.8.1
Judging from the code it either never worked, or LLDB changed
syntax at some time. In either case, having it in a usable
state with current version is an improvement.

Change-Id: I88b15969bf28b92735d860544dedcbd1d9689765
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-24 12:45:01 +00:00