Commit Graph

4963 Commits

Author SHA1 Message Date
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
Thomas Hartmann
80d1a6ed42 QmlDesigner: Increase interval for puppet alive timer
Once a second is enough.

Change-Id: I7e8e16bbe2b6f4c47d19d4cb25deada363c752f9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-01 15:32:24 +00:00
David Schulz
aafb17ae83 Debugger: Add enum value dumper to cdbbridge
Change-Id: I40f1556599be7581eeab0c75b034696ac22a7131
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-01 10:07:49 +00:00
David Schulz
edacb7d383 Debugger: Use symbol tag to determine type code
Change-Id: I49a2a0f3e1ff65accb0d2e04fbd9352ce3f63f2c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-01 10:07:43 +00:00
David Schulz
327341b917 Debugger: Check type cache before creating array/pointer type
Change-Id: I334c8d9a7ae365f28a8b070b0ccef943b5db3c59
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-03-01 10:07:36 +00:00
hjk
7c5f2184c6 Welcome: Move worldsummit16.png to plugins/qtsupport
Alongside the other icons nowadays.

Change-Id: I58bfc605fab1032a2d94a31a46f394bde8c0348e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-02-28 09:37:43 +00:00
Thomas Hartmann
ae6874b26d QmlDesigner: Adjust padding
Task-number: QTCREATORBUG-17770
Change-Id: I8dc0b67a365b6ef4a79d440b8fec1a8b6a5dd44a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-02-28 09:34:00 +00:00
Thomas Hartmann
569cdadebc Wizards: Fix wizard for .qmltypes
The wizard got forgotten during some cleanup.
I changed the name and description to emphasize prototyping.

Task-number: QTCREATORBUG-17771
Task-number: QTCREATORBUG-17708
Change-Id: I1d46737aba40abf3cd13effc50991cdb789980e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-02-28 09:32:52 +00:00
Eike Ziller
1704c484a8 Merge remote-tracking branch 'origin/4.2'
Change-Id: I9006dd493707ae626ae3502541599c8789e1aab0
2017-02-27 15:17:37 +01:00
Orgad Shaneh
919ba9a925 Dumper: QJsonValue of String has no children
Change-Id: Ic6731ca6e7fe45792688623bffbbe0d9005bd1a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-24 07:41:19 +00:00
David Schulz
9c2e45aa3c Debugger: Use listTemplateParameters from DumperBase
This will utilize the lazy lookup of template parameter types.

Change-Id: Id91ccaba7911e8769f42ec0c65a60f93558be1a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-23 08:40:26 +00:00
David Schulz
bb05b5ff11 Debugger: Pass Qt type info version to the debugger protocol
Fixes Qt 5.8 QDateTime python dumper.

Change-Id: If6fab7bf3ea63372ef01942bcaa2121eb9c2b6db
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-23 05:55:46 +00:00
Thomas Hartmann
ef50012e31 QmlDesigner: Add specifics for Popups
Change-Id: I7fa3e606bec17e1b5cfc6cd002515a1704083fef
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-02-22 13:20:50 +00:00
Thomas Hartmann
d69ebea479 QmlDesigner: Adding MarginSection
Will be used for Popup.

Change-Id: Ie584f42c193843ab83866b137ae6e3ad0cad94c7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-22 13:17:43 +00:00
Thomas Hartmann
6e30faba73 QmlDesigner: Quick fix for Popup
This is a quickfix for Controls 2 Popup, Drawer, Menu and Dialog.
We pretend everything derived from QtQuick.Controls.Popup
is an item instead of a QQObject.

Change-Id: I603dce8a1a1b08df3e2c1dccc0fa57e7ccef0800
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-22 12:58:20 +00:00
Christian Stenger
e2b909c6b6 Wizard: Adjust Qt Quick UI wizard to latest changes
Change-Id: Ib68de88cec3d049d0a495e8e36d658325e5d323f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-02-17 05:50:46 +00:00
Christian Stenger
57d1eafeb4 Wizards: Unify used label with other wizards
Change-Id: I46b0a756d825cfff328c747c37a9563c5449a75e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-16 11:33:15 +00:00
Thomas Hartmann
423d360c23 QmlDesigner: Use colors from theme the for selection indicator
Change-Id: I3430e7c49678422811754f1c0400291cdf61c29b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-15 11:55:47 +00:00
Thomas Hartmann
dfe3898041 QmlDesigner: Implement preliminary support for qsTranslate
There are now 3 options for QML translations in the options.

* qsTr (default)
* qsTrId
* qsTranslate

In case of qsTranslate the context is preserved when editing the text
and the context can be changed by setting a binding on the text property.

Task-number: QTCREATORBUG-17714
Change-Id: Ied2ccb84d98d99d5b920fe47ee6d8cb67ff2bd5b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-15 11:54:47 +00:00
Filippo Cucchetto
d2f78fb431 Nim: Project wizard should filter Kits without a Nim toolchain set
Change-Id: I3ccdc5e7062aa9c26edadcd989dcd855b45b38eb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-15 10:46:20 +00:00
Eike Ziller
e724934393 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	doc/src/qtquick/creator-tutorial-create-qq-project.qdocinc
	doc/src/qtquick/qtquick-creating.qdoc
	doc/src/qtquick/qtquick-uiforms-tutorial.qdoc
	share/qtcreator/welcomescreen/qtcreator_tutorials.xml
	src/plugins/git/gitgrep.cpp
	src/shared/qbs

Change-Id: I6f4d168d888d9547c3af0819f79cc9ebb4186ca0
2017-02-14 15:32:04 +01:00
Leena Miettinen
11047ad4fb Welcome: Update the Tutorials tab contents
Remove obsolete icons and add an icon for Qt World Summit 2016.

Change-Id: Id87b8b4d3992d4efa50fe4180d3640397cb26ebc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-02-13 08:54:15 +00:00
Orgad Shaneh
0c9f23db96 GDB: Fix printing of flag enums
It worked with plain GDB (parse_and_eval), and was broken by
696b2d4261.

Change-Id: Ibc143efdbd90681a2f9f4d84b75063eb98078f2b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-13 08:08:41 +00:00
Jake Petroules
b0229acd54 Clean up projects wizards and support for Qbs+CMake+qmake to all
Task-number: QTCREATORBUG-17308
Change-Id: I5d320a52f2cc5c0adbaf513985e4be0d75219a7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-10 18:19:57 +00:00
hjk
46e4ecbd44 Make Creator compile without Qt tools in some configuration
Needing to compile Qt tools is a bit of a chore (and at some point a
diskspace issue) when building/starting Creator as sanity check for
comparing different compiler optimization settings.

This is not an officially supported configuration.

Change-Id: I628e33eb7137f09ecfebbd27453de548bac2fde5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-10 13:30:53 +00:00