Commit Graph

4987 Commits

Author SHA1 Message Date
Mitch Curtis
fcb504dede Flat Dark theme: make "changed variable" color in watch window readable
It was a dark red, which is really hard to read against a dark
background. This patch makes it a pastel red, as was done for the
Dark theme in bbb0de0553.

Change-Id: Ieb78522b1e5282e2c35b18ec65c31f4aeb246ad8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-03 14:10:49 +00:00
hjk
1e9cc97220 Debugger: Improve handling of static members in shared objects
Change-Id: I4978094dc5dcd0e57bb6790cfc8476a9db77724d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-02 10:22:14 +00:00
hjk
f38f120031 Debugger: Add a dumper for QLazilyAllocated
Task-number: QTCREATORBUG-18060
Change-Id: I5eec7bd10f54278a1d40cf9fce97fba56f4aa2e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-26 10:51:39 +00:00
hjk
81d9315587 Debugger: Add a boost::variant dumper
This requires making template argument extraction a bit more robust

GCC 5.4.1 created debug info only reports the first argument for
boost::variant<int, bool>:

    #include <boost/variant/variant.hpp
    int main() { boost::variant<int, float> v = 1; return 0; }

    py print(gdb.parse_and_eval('v').type)

      -> boost::variant<int, float>

    py print(gdb.parse_and_eval('v').type.template_argument(0))

      -> int

    py print(gdb.parse_and_eval('v').type.template_argument(1))

       -> Traceback (most recent call last):
          File \"<string>\", line 1, in <module>
          RuntimeError: No argument 1 in template.
          Error while executing Python code.

Change-Id: Iedca8b073078c93449ab61bb2cab05d6cd9803ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-26 09:23:18 +00:00
Eike Ziller
f901cbffba Merge remote-tracking branch 'origin/4.2' into 4.3
Change-Id: If2076ea858d166093c37e9cf52d38f3ad9115012
2017-04-25 15:33:59 +02:00
hjk
5784a96596 Debugger: Extract printing of dereferenced pointers into method
It's used twice, always for 'this', and whenever asked for by the
user's 'Dereference Pointers Automatically' choice, but needs to
be done at different times.

Change-Id: I4dc7340d0a4cb3eb0c7ff17d59e39be0e3870aa0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-25 10:24:50 +00:00
scootergrisen
e5cf97f409 Add danish (da) translation for Qt Creator 4.0
Change-Id: Ie3d5f2f418d462df68ad3c646fcbebe225f0c6f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-25 08:16:48 +00:00
hjk
758e50fa45 Debugger: Catch some exceptions related to optimized out values
These could be triggered by declared but undefined and unused
static data members.

Task-number: QTCREATORBUG-18030
Change-Id: I941e8cbe8ce18dca737e59472ed0ee19ace44072
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-04-25 07:58:13 +00:00
hjk
53ff0e1ca1 Debugger: Add a workaround for bad gcc debug info generation
Gcc does not write out full type names with 'using template ...', see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80466

This is in most cases harmless for Creator as dumpers are triggered
independently of template arguments. However, if the dumper takes
different code path based on the template argument type, as is
e.g. needed for std::vector<bool>, wrong results are produced,
as the type cache only used the template base name as type id.

Work around by mangling the id of the un-typedef-ed type into
the type id of a typedef, which, in case of templates contain
the full parameter list.

Change-Id: I63c59cccdc186b09ff780e9dfd57b0ad668ae98f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-20 09:15:59 +00:00
Thomas Hartmann
38bf6aed8a QmlDesigner.PropertyEditor: Disable line edit if color is transparent
Change-Id: Ifbb08473e12404f355f1498087dbbb60bc7e7ac9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-19 12:45:41 +00:00
Thomas Hartmann
591191f1e5 QmlDesigner: Show expression in UrlChooser
If an Url is an expression we show the expression.

Task-number: QTCREATORBUG-13328
Change-Id: Id615a701f540082ac25a898e6d3a104b833b7eec
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-04-19 12:45:31 +00:00
Montel Laurent
d29396b164 Use qEnvironmentVariableIsEmpty or qEnvironmentVariableIsSet directly
Change-Id: I4f2e61e4bade9e7b4518d144db8163e596ab6264
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-04-19 08:00:14 +00:00
hjk
283bce7343 Debugger: Add a qfloat16 dumper
Change-Id: Ibc43da06c195d916296f09740a1111a2586443b8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-04-19 06:01:18 +00:00
Montel Laurent
5d27bc747b Use QFileInfo::exists(...) which is faster that QFileInfo(..).exists
Change-Id: I0d2e61d84c74e60ef4f54074a4ca00f2d0835562
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-04-14 13:18:28 +00:00
hjk
873559b9c9 Debugger: Check presence of current working directory explicitly
Change-Id: Iba6037907761702fa825764757dd00fce4a91082
Reviewed-by: Vadim Evard
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 10:25:10 +00:00
David Schulz
17485c0678 Debugger: Optimize python output handling
Change-Id: Ia97e8adaabbffe49acec44575621a4f4243c5cea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 07:07:38 +00:00
David Schulz
c00bb1dcfb Debugger: Pass uninitialized variables to the python dumpers
Reduces accessing uninitialized memory

Change-Id: I025e9070b9b17a806237619b484cb27230e7f494
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 07:03:23 +00:00
hjk
79c3c4e5e5 Debugger: Remove unused Dumper.Type.field function
Change-Id: Ib7b1576d2b71b0e5f1648b51a4298b44581b1c2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-04-05 05:45:31 +00:00
David Schulz
16b3235003 Debugger: Catch memory read exceptions in getJumpAddress
Throwing an exception in these cases is not uncommon and should
be handled properly.

Change-Id: I8d4377bf26a4e31971da724904dd5ea5f01a95e1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-04 08:23:30 +00:00
David Schulz
cafd4a4626 Debugger: Make readRawMemory exception more detailed
Change-Id: Ibb9b42b05921cf8f797da3d3e2967a8842bf38c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-04 08:22:18 +00:00
David Schulz
4e4b5833da Debugger: Fix QFlags dumper for cdb
Also adding a test covering this dumper.

Change-Id: I491dd87e52f65bf3faf21d81436f264507bf0b51
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-30 13:37:53 +00:00
David Schulz
86edeb9722 Debugger: Use native value for pointer dereference
Change-Id: Ibde6ff382e7adc0c196837c9eba04391c0a2c3a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-28 09:22:28 +00:00
David Schulz
767d988891 Debugger: Cache reference to an unresolvables type as struct
This fixes throwing an uncaught exception if local variables contain
arrays or pointer to a type that can not be looked up.

Change-Id: If9407e5cf5d86bb89594266d4122a53dd65a80bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-27 13:19:13 +00:00
David Schulz
bb04bbe9d4 Debugger: Add dumper for Utf8String
Change-Id: I0f9411a246d121e22c8b65bf188598c427993726
Reviewed-by: hjk <hjk@qt.io>
2017-03-27 12:01:16 +00:00
Thomas Hartmann
2df18ec34f QmlDesigner: Fix drag and drop
The release mouse event does not come through if we start a drag.
There was already a workaround that stopped working with 5.8 and
did rely on private API.
I removed all usage of private API and added a simple workaround
that synthesises a mouse release event.

The actual execution of the drag is now asynchronous to
ensure the release event is delivered properly.

I removed all dependencies on private API in the designer.

In Qt 5.9 the issue seems to be fixed in Qt.
The workaround does not seem to get in the way of the fix.
Eventually, the workaround can be removed.

Change-Id: I9b45b255da5e44c26aba2acf4a42f88537126f75
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-24 11:21:42 +00:00
Thomas Hartmann
4ca71590db QmlDesigner: Fix warning
Change-Id: Iff2c50439521e602bd2703716590a3e95c8ab2b1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:00:42 +00:00
David Schulz
c2f260ee2e Debugger: Add exceptions for array type names
Cdb also seems to return <gentype number> type names for
virtual function table types.

Change-Id: I0d9accb88222de599488fabdb69c7f1585216c8e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-22 14:03:55 +00:00
David Schulz
cf61ca4846 Debugger: Fix QHostAddress padding for MinGW
Change-Id: I97f52587767537a5730753b593bc024e270bbd5e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-22 14:03:41 +00:00
Orgad Shaneh
91e9ba7ede Dumper: Remove unused function
Change-Id: Ibc8cf420170b084c05fdaf1d6a7b26594bcb3f24
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-21 14:57:29 +00:00
Christian Stenger
9df203f314 AutoTest: Add missing CMake build system to wizard
Task-number: QTCREATORBUG-16916
Change-Id: I4dca90dd458789b7385013229d8447d6a8e6d360
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-21 14:07:00 +00:00
David Schulz
f32b1d00f4 Debugger: Adjust offset for QFile dumper
Change-Id: I20704cdcdda1273cdc0df91bf963c979a1f51190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-21 09:04:41 +00:00
David Schulz
33e8f2e099 Debugger: Fix QObject detection on Windows
Change-Id: I054161dfde0c03167a6d57861b069c403330e746
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-21 09:04:34 +00:00
Christian Stenger
ae63f89f35 AutoTest: Reduce auto test wizard to useful parts
This patch reduces the former wizard to the test project part.
The wizard appeared more or less useless as there was no easy way
to add test cases later on and you normally do not need to have the
full skeleton of the project including a test sub project - except
when starting a TDD project.

Change-Id: I404d843b29f058876ea9696b7881f2e5e11b6af2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-21 06:17:05 +00:00
Thomas Hartmann
fdb40645a4 QmlDesigner: Unite the bounding rectangle with actual size
This is required to correctly render text elements with padding,
since the bounding rect seems incorrect.

Change-Id: Ifcef2607089a7a2cec071814d5d87bd27da7ace3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-17 13:02:54 +00:00
Christian Stenger
2b6a912e6b Dumper: Comment out unused function
Change-Id: Iafc2b0892739c43699631f6ca8ce0d51222c893c
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 14:58:58 +00:00
Christian Stenger
8204d794e2 Dumper: Fix missing import
Additonally ensure that code path works with Python 2.7+ and 3+.

Change-Id: I6c7895eeb830259dc07bb7f64049ae51cb814c7f
Reviewed-by: hjk <hjk@qt.io>
2017-03-16 14:57:43 +00:00
hjk
fd0bf9df64 Debugger: Make QObject connections a bit better accessible
Change-Id: I5e70a61db73f89dc48efc82bc6aa4e42c44ba6d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-16 10:12:40 +00:00
hjk
61501042bc Debugger: Simplify Qt namespace guessing code
We get proper notification when QtCore is loaded now, and we either
got it, or not.

Change-Id: I9485126d9b15b8d859ba440f3ba1623f03527ef8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-15 11:36:18 +00:00
hjk
68a4a3db94 Debugger: Use gdb provided hooks to track loaded shared objects
Change-Id: I4f3cce56910e0e737febaf0ff442956b78b19c30
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-15 11:34:58 +00:00
David Schulz
e41befd4f7 Debugger: Check also for Qt5Core(d).dll on Windows
Change-Id: Ic078a165d35c316cb12d08ca84913b4b07143aa4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-03-14 13:07:23 +00:00
Thomas Hartmann
bf3008292f QmlDesigner: Add support for high dpi to form editor and puppet
We forward the device pixel ratio to the qml2puppet and
render items in higher resolutions.
We have to set the device pixel ratio on the pixmap manually,
since it is not serialized.
The option IgnoreDevicePixelRaio allows disabling high dpi awareness.
Rendering in high dpi affects performance, but since we
use shared memory this does not seem to be a serious issue.

Change-Id: Ie9219b8fdb37841c24d4fb3f0ca259f0194ef65c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-13 12:04:18 +00:00
Tim Jenssen
1de5bbd378 QmlDesigner: introduce a real Theme class
- rename Theming -> Theme
 - made derived colors as Q_INVOKABLE methods available
 - rename registerIconProvider -> setupTheme
 - inside *.qml files use a singleton import instead of a context

Before this change, every request for a theme value copied the map into the
Qml context including the convert of values QVariant -> QJSString

Change-Id: I1c483fb591336b519d5adab8ad37b42bc5a06720
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-03-09 17:20:36 +00:00
hjk
fb213b5826 Debugger: Use a named tuple for Dumper.Field
Makes it clear that this is meant to be immutable and is supposedly
faster.

Task-number: QTCREATORBUG-17823
Change-Id: Ie5d67b793e0bc4f704981d5161efc12bcc22100a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-09 08:20:46 +00:00
David Schulz
4f91cb3d0c Debugger: Do not lookup types when accessing the type name
Return the typeId instead of triggering a type lookup when accessing the
type name and no TypeData is available.

Change-Id: I4d46d5356d38184d73427e5a65c3986d30520cf9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-03-08 09:52:30 +00:00
David Schulz
530f7972eb Debugger: Optimize QObject::staticMetaObject lookup
Change-Id: I8c06472ce4e33b7c4203934d93b9cc8c8ae95ce2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-07 09:46:23 +00:00
David Schulz
51d14393c4 Debugger: Fix double and (unsigned) long long alignment
Change-Id: Ia1ee70a047b3e659730e5a19b874f1f2e567d8ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-03 12:57:28 +00:00
David Schulz
2cd8378148 Debugger: Adjust offset in QGraphicsPolygonItem dumper
...for windows targets.

Change-Id: Ib3068f470c16141fa1bbd0455aa3805aa084fe65
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-03 07:57:06 +00:00
David Schulz
37dea3d7a6 Debugger: Fallback to read raw memory
...if native debugger value for an integral typed value can not be
interpreted as an integer.

Change-Id: Ic9753dd56f5d1854dc0765d5de2a0258a38615d8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-03 07:56:47 +00:00
Christian Stenger
605a581712 Wizards: Fix location of git ignore file
Change-Id: I14a914a53f511353d8d24f8236d7c434ce54dea6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-03-02 09:26:39 +00:00
Thomas Hartmann
513209cf1f QmlDesigner: Add logging to NodeInstanceView
Change-Id: I95f9f2e089f2d66ba9cf27b631d2478d54b18085
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-01 16:20:48 +00:00