Commit Graph

5514 Commits

Author SHA1 Message Date
Christian Kandeler
c8e656c506 Add qbs support to library wizard
Change-Id: Id78bc547cf42dec8948d7ebca56eacfcbbd2f055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-18 12:36:43 +00:00
Robert Loehning
5ce028c499 Fix capitalization of "qmake"
Shall be consistent with other wizards

Change-Id: I810cf55abf519f5b67155063ce515c4442fc6637
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-18 10:09:18 +00:00
Eike Ziller
178e57129d Fix imports in Qt Quick wizards
Fix-up of e0d38ae414

Change-Id: I9f4055647bbf82c89b3282048944bc6ac89faacf
Fixes: QTCREATORBUG-22614
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-07-16 13:00:59 +00:00
Alessandro Portale
663e9003a3 Application wizards: Remove duplicate entry in a generated .qrc file
qml.qrc: Warning: potential duplicate alias detected: 'main.qml'

Change-Id: I949fda863175c3de4a828a93ca01620010a44e93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-15 05:38:12 +00:00
David Schulz
79f7605a0a Debugger: fix cdb dumper test for namespaced Qt
Change-Id: I5cbf1db4cffb19ee63ab80dcd6e2a8659cd44389
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-09 08:40:00 +00:00
Henning Gruendl
6d60c7c1a9 QmlDesigner: Fix RealSpinBox interaction
* Fix RealSpinBox drag behavior
* Fix RealSpinBox wheel behavior with step sizes
* Fix DoubleSpinBox hide cursor on drag

Task-number: QDS-650
Change-Id: I5ddbf4815aba88e134c8e806e91521083dda543c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-07-06 19:43:29 +00:00
hjk
6a58666f44 More Utils::toSet/toList
... and unrelated cosmetic changes.

Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-04 12:28:38 +00:00
Christian Stenger
f643f87793 Wizards: Fix typo in Plain C++ wizard
Change-Id: Ifbef31b7edded3f372debe3065fe4e9abc4e9455
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-04 07:39:17 +00:00
Robert Loehning
c4512f466a QmlDesigner: Consistently capizalize "Flickable"
Change-Id: Ie291f5cd2b5091a885945d074c9ea08aa14d7f84
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-03 17:11:53 +00:00
Henning Gruendl
e62eeb5aeb QmlDesigner: Fix DoubleSpinBox in-/decrease issue
Change-Id: I072600fa8ca43828d6e03515af34caef6c8cefbe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-07-03 12:43:52 +00:00
Thomas Hartmann
7cd504511c QmlDesigner: Hide the cursor when dragging in SpinBox
Change-Id: I3900c510bc5510eaba51ea2ae8700aa9ca72f59a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-07-03 07:49:40 +00:00
Thomas Hartmann
e16c948ab7 QmlDesigner: Increase size of SpinBox for Flickable
Change-Id: Ie1343d8cf0dbe41eefd2027a1daa0133cbd109c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:23:10 +00:00
Thomas Hartmann
370b436650 QmlDesigner: Fix ListView property editor layout
We have to use Layout.fillWidth consistently.

Change-Id: I6052fb8c1a2b2cdc704bba70db1f2bf26730232f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:22:56 +00:00
Thomas Hartmann
76d0a16a81 QmlDesigner: Hide label if text is empty
Otherwise we get padding on the left.

Change-Id: I62d78bf988cefe8c91f55268a71c70094f163d5d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:22:39 +00:00
Thomas Hartmann
1a4aedf568 QmlDesigner: Increase the compression timer for SpinBox
Change-Id: I8fe7b2b3645d053255b2486e0584f7f16f77997c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:21:40 +00:00
Thomas Hartmann
868b07853d QmlDesigner: Use new combobox for layout properties
Change-Id: I52e353011b290a59c66003db8b2becd4cd160820
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:21:20 +00:00
Thomas Hartmann
a93e9d7a7a QmlDesigner: Improve custom property editor for URL
Change-Id: I1bf81df8df94bc7d1469b484f6a66f874887b214
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:11:27 +00:00
Thomas Hartmann
6eb0bec95c QmlDesigner: Add editors for font, Text and Rectangle
This requires adjustments of FontSection.qml.

Change-Id: I60eb17c299c73da42726dead0d8713a91d4af932
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:11:11 +00:00
Thomas Hartmann
feaf2a3b95 QmlDesigner: Extend support for custom property editor
* Allow custom '.' properties to show up in custom editor
* Allow custom property editors to span multiple sections

This allows us to support alias proprties to e.g. Text and Rectangle
items.

Change-Id: I7939a5cf5769387dbb3a27df0fd9e74c493a577c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 16:10:40 +00:00
Henning Gruendl
a6d5da5af2 QmlDesigner: Add RealSpinBox and refactor SpinBox
* Transfer all changes which came up while Qt Creator integration
 * Refactor states by using dedicated edit property
 * Refactor alias properties
 * Set SpinBox slider indicator default to false
 * Add CheckBox tri-state
 * Fix Menu closePolicy
 * Remove some connections
 * Fix TranslationIndicator
 * Add new values and fix some missing scale factor multiplications
 * Add new icon font
 * Use MenuItem instead of Action for context menu due to shortcut issue
 * Add RealSpinBox due to the following bug QDS-806
 * Refactor SpinBox with findings during RealSpiBox implementation
 * Fix SpinBoxIndicator enable/disable state
 * Fix RealSpinBoxIndicator enable/disable with a new property called
   realEnabled and synching between the actual property and the new one
 * Make RealSpinBoxIndicator increase/decrease on release
 * Add drag start/end signals
 * Fix indicator behavior exiting/entering while pressing (and holding)
 * Fix wheel and dragging step size for increase/decrease
 * Fix reset of step size for cursor keys
 * Fix press and hold timer
 * Set decimals 0 by default (int by default)
 * Replace SpinBox with RealSpinBox in HelperWidgets

Change-Id: Ieda049595e6483b052fcdf4ca597f6af66e5f4dc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-07-02 12:12:12 +00:00
Thomas Hartmann
05a53204fd QmlDesigner: Set property editor scale factor to 1.1
Change-Id: Ibf2db6490ec908d8a2952fa88ca42e7d4c049f3f
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-02 09:12:01 +00:00
David Schulz
853f1226e0 Debugger: Fix QStandardItem dumper test
Change-Id: Ic4b965da9589a7bade4f96226bff3bb14987602c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-02 08:26:23 +00:00
David Schulz
1571384e49 Debugger: add dptr child to QDir for msvc targets
Makes it possible to access the entry lists if these were populated by
the code.

Change-Id: I066824d2ce7f75a38d208155156c93d06458f8b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-02 08:26:14 +00:00
Orgad Shaneh
55653db029 Dumper: Fix std::map<K, V>::iterator dumper
The iterator type is std::_Rb_tree_iterator<std::pair<K, V>>

Change-Id: I0ed2f2e6955deb4b402277fe0f3eb32b6af2d477
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-01 12:51:37 +00:00
Christian Kandeler
375ec4c51b Wizards: Fix qbs project template for QtQuick app
Change-Id: Iffc9dad352d78f54557f45b36687c543935853dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-27 09:00:35 +00:00
Christian Stenger
6288e03264 Wizards: Fix regular expressions
Although this is valid JavaScript matching the '.' is
not working as expected.
The directory always gets messed up by replacing the
first character with a dash. Use an alternate regular
expression and also ensure the replacement happens
globally instead of once as we want to replace all
dots by a dash.
As at it fix handling of the file suffixes as well.

Task-number: QTCREATORBUG-22625
Change-Id: Ide189fe50e29994abfb368e503050b9b413aba9f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-27 07:18:19 +00:00
Michael Weghorn
aedc0ca91b Pretty printers: Unify code for different allocators
The code path for allocators other than
'std::allocator' does work for 'std::allocator' as well,
so unify this.

This also fixes the case of std containers when
'std::allocator' is used and the compiler flag
'-D_GLIBCXX_DEBUG' in place which results in size assumptions
that were made in the now dropped path to not be fulfilled,
thus leading to an incorrect display.

Fixes: QTCREATORBUG-22606
Change-Id: I2b6f8ac9933b210d26197975017292e2fc227541
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 13:40:13 +00:00
Eike Ziller
63c4428287 Merge remote-tracking branch 'origin/4.9' into 4.10
Change-Id: I53ceb69b1558520e7d7b6db8b7ebdd5c1590e991
2019-06-26 11:58:54 +02:00
Michael Weghorn
5eba3bde93 Fix std::basic_string printer with custom allocator
This fixes expansion of 'std::basic_string' in the locals
view when a custom allocator is used (which previously
would result in "<not accessible>" being shown);
for example, when expanding 's' at the breakpoint
in the following example:

    #include <string>

    template<class T>
    class myallocator : public std::allocator<T> {};

    int main()
    {
        std::basic_string<char, std::char_traits<char>, myallocator<char>> s("hello");
        return 0; // break here and expand value of 's' in locals view
    }

Change-Id: I0ca98de50d83a1f6e6f019acc37a1302a05fdba8
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 07:18:06 +00:00
Michael Weghorn
01f26bd5b7 Fix std::vector<bool> printer with custom allocator
This fixes the std::vector<bool> pretty printer, which
previously just showed "<not accessible>" for variable
'v' for the following sample code (with system GDB
pretty printer disabled so that the custom
pretty printers are used):

    #include <vector>

    template<class T>
    class myallocator : public std::allocator<T> {
    };

    int main()
    {
        std::vector<bool, myallocator<bool>> v;
        v.push_back(true);
        return 0; // break here and check value of 'v'
    }

Change-Id: Ia9883aa0b06a396cb3546ac2594a82c1b2062b80
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 07:17:39 +00:00
Michael Weghorn
0313cdbd87 gdbbridge: Convert children to gdb.Value
'Dumper::fromNativeValue' expects an object of type
'gdb.Value'. However, the 'pretty_printer.children()' iterator
may return values that first need to be converted to this,
as documented for function 'pretty_printer.children' at [1]:

> This method must return an object conforming to the Python iterator
> protocol. Each item returned by the iterator must be a tuple holding two
> elements. The first element is the “name” of the child; the second
> element is the child’s value. The value can be any Python object which
> is convertible to a GDB value.

Therefore, explicitly convert the value to a GDB value first.

This fixes the expansion of 'std::vector<bool>' when system
GDB pretty printers are enabled which previously led to
"<not accessible>" being shown e.g. for the following example
(expand 'v' in the local variable view at the breakpoint):

    #include <vector>

    int main()
    {
        std::vector<bool> v;
        v.push_back(true);
        return 0; // insert breakpoint here
    }

Side note: GCC's pretty printer for 'std::vector<bool>' previously
returned either '0' or '1' for the element values, thus leading to the
problem described above. With this patch in place, the elements are
shown when the vector is expanded, but the shown type is 'long long'
(since that's the type that GDB seems to automatically assign when
constructing a 'gdb.Value' from these integers, at least with
GDB 8.2.1 on amd64). This will work as expected ('bool' shown as
type) from GCC commit [2] on ("Have std::vector printer's iterator
return bool for vector<bool>").

[1] https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing-API.html
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6c7d761a3f5fd7d19795d1d4b9b027a04b3fe88b

Change-Id: I9047affa5b4369befd2e2386c8a6b04c66c4b632
Reviewed-by: hjk <hjk@qt.io>
2019-06-26 07:16:42 +00:00
Thomas Hartmann
5be6e84016 QmlDesigner: List all fonts in project
We iterate all over all ttf and otf files that are found
unter the project directory and show their name in the FontComboBox.

Task-number: QDS-100
Change-Id: I45c4d512783d5ecc4a646860c08e6088bd712798
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-25 07:14:29 +00:00
Robert Loehning
eab4e056bc Small fixes in French translation
Change-Id: I86816eb8e1d0f7b439532b9196aa28a8119e5234
Fixes: QTCREATORBUG-22613
Reviewed-by: Jocelyn Turcotte <turcotte.j@gmail.com>
2019-06-24 15:54:10 +00:00
Thomas Hartmann
4b886e12dd QmlDesigner: Remove shortcuts from undo redo in controls 2
Change-Id: I39c5bec7000c3af6e849b9e797da5c2b1d19e683
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-20 10:22:38 +00:00
Thomas Hartmann
ac685f2cb8 QmlDesigner: Remove shortcut from Controls2
Change-Id: I4ba9b6d2892ef277f7b56d710edb08a202a81ed6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-20 10:01:50 +00:00
Thomas Hartmann
9da6c2f43b QmlDesigner: Add alias export to QtObject
Change-Id: If1a78463d4f1625105ab1fad7e179e645be08c9e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-19 07:19:15 +00:00
Thomas Hartmann
1dae4593cc QmlDesigner: Use MenuItem instead of Action
This avoids conflicts with shortcuts.

Task-number: QDS-803
Change-Id: I9269729cf2cb4a6bba9493d768c595748af3392d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-19 07:18:42 +00:00
hjk
93d2e3352c Debugger: Improve QObject dumper
Don't use two lookups for parent types and act on known null pointers.

While the machinery is robust enough to handle the result it's a
needless deviation in regular code path.

Change-Id: I6e50629cf554870a3ffb9f488f654e6ae557e5b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-18 09:55:07 +00:00
Thomas Hartmann
0bcdc93e19 QmlDesigner: Fix layout in templates
Because the templates did not use the pre-defined layout,
the layout was bit broken.

Change-Id: I3a11e78a8dd6ac81252fa51270de5d427e5de0c2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-12 15:19:33 +00:00
Thomas Hartmann
da3f9eb5bf QmlDesigner: Fix property editor template for colors
The color editor requires its own section.
Therefore we mark the color type with 'separateSection'.
For this to work we have to order all properties.
The properties that require their own section do come first.
The QML code generation became a bit more complicated, but
having proper default sheets for colors should be worth it.

Task-number: QDS-742
Change-Id: I1eee71aa05c66af4aaf53e0e8c5a3514a9ca6d92
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-12 15:19:10 +00:00
Thomas Hartmann
aa30828f40 QmlDesigner: Disable horizontal scrollbar for property editor
Change-Id: Id6b9dc66ca86f775c7d8fd8a5c847becb5cf96cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-12 15:18:37 +00:00
Thomas Hartmann
2831f601fa QmlDesigner: Use OpenGL 4.1 surface for puppet
Change-Id: I520adbb54fc264e738ca5eb630f5cc7bc80ee4bd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-12 13:48:56 +00:00
Cristian Adam
36135aa261 CMake: Small clean-up of CMake Wizards
* Updated CMake minimum version to 3.5 (Ubuntu LTS 16.04)
* Lowercase commands
* Used the target name instead of ${PROJECT_NAME}, which nobody uses in practice
* No string quotes around the source filenames, which do not contain spaces

Change-Id: Ide9b3eb85535213798c6c35e08624cae080ebd9d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-06-12 13:34:58 +00:00
Thomas Hartmann
b94c725f0f QmlDesigner: Reserve less space for label
We currently waste too much space for long label.
Eliding works fine for long property names.

Change-Id: I1fe2836e8c06cff93e2a48c6290265ab300e5321
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-12 11:30:20 +00:00
Thomas Hartmann
f6db77a0cc QmlDesigner: Slightly reduce size of the spin box
Change-Id: Ida09ddf17fcdc7000b03c6020334e30cfa7c74ee
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-12 11:30:02 +00:00
Christian Kandeler
a093dfc65c Wizards: Include namespace in header guards again
This was broken in 63c339ffba while trying to fix a different bug.

Fixes: QTCREATORBUG-18157
Change-Id: Iec7e14de257195ed9bb20314b8031d3ef59df2ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-12 11:05:12 +00:00
Henning Gruendl
3172773f52 QmlDesigner: Add more studio controls
* Add alignment button rows with new controls
 * Add font style buttons with new controls
 * Add anchor button rows with new controls
 * Fix CheckBox error about undefined assignment
 * Add new colors in ColorLogic
 * Fix low contrast for edit mode text color ComboBox, SpinBox, LineEdit
 * Add new icon font
 * Fix TranslationIcon background color
 * Some minor import refactoring

Change-Id: If014c3351fd33ccaf893a31033c893e13ee04821
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-12 09:15:51 +00:00
Thomas Hartmann
c839830b3e QmlDesigner: Fix delete shortcut
QtQuick Controls 2 seem to define all shortcuts globally.

Task-number: QDS-803
Change-Id: I6d29f659261c12bdd66473e2c680044b486891ec
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-07 14:42:27 +00:00
Aleksei German
469647db3d QmlDesigner ColorPalette StudioControls usage
Change-Id: Ia1c2daa693e9c2c2a2808cf6fab65a2b60014456
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-07 14:42:00 +00:00
Aleksei German
f3c2fcef1a QmlDesigner ColorButton Labels replacement
Change-Id: I2b0af3e1f77fda44d738202986071b9c8f50cb4f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-07 14:41:38 +00:00