Commit Graph

55184 Commits

Author SHA1 Message Date
Claus Steuer
27190cd50a AutoTest: Set gtest-result line number even if file can't be resolved
Task-number: QTCREATORBUG-18725
Change-Id: Id9c4749feafcd3dc3c54fcb25589f45e9cebe283
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-09 05:45:53 +00:00
Orgad Shaneh
5e483d04bc Clang: Fix build
This amends commit cf4dbb4bb6.

Change-Id: Ib74fba38348a02f6bb9d254b7a5e9013a2013942
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-09 05:25:40 +00:00
Orgad Shaneh
1c82a53e74 Modeling: Catch exceptions by reference
Detected by GCC8.

Change-Id: I478e835a49beaa2cd6f07650b2e8c3726979018d
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-04-07 17:41:42 +00:00
Orgad Shaneh
2dcb558945 ClangSupport: Do not cast to const quint8
Detected by GCC8.

messageenvelop.h:83: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
         out << static_cast<const quint8>(messageEnvelop.messageType_);
                                                                     ^

Change-Id: I46ee5fb45b6ebc3c75475faa16cba66243a38fb3
Reviewed-by: hjk <hjk@qt.io>
2018-04-07 17:34:08 +00:00
Tim Jenssen
e0c8ec8f79 QmlProject: simplify code
Change-Id: I3cfee42b63bf840bf2ecde54c5f2d277d7a32e7c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-06 17:23:30 +00:00
Nikita Baryshnikov
a16d712c11 CMakeSpecificSettingsPage: delete SettingsWidget
Also added Q_OBJECT macro, for tr call in ctor.

Change-Id: I4766b6299a07e3ba0ebc8577e9f4471021b89f07
Reviewed-by: hjk <hjk@qt.io>
2018-04-06 13:31:51 +00:00
hjk
cf4dbb4bb6 ClangSupport: Use simpler structures in some cases
The patch is mostly mechanical, but contains also a few spurious changes
from values references for some local variables, foreach -> ranged for
etc that I coulnd't resist.

Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-06 12:55:23 +00:00
Christian Kandeler
9d4cb68894 Update qbs submodule
To HEAD of 1.11 branch.

Change-Id: Ia5df7f4264cdead6d11a97f473c8f2701de78eae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-06 12:06:58 +00:00
hjk
4a0bbed560 Qnx: Re-enable CMake etc builds
This partially reverts 6e419d642a as the restriction is not need.
QNX + CMake is working fine.

Change-Id: I430c6e8c25f8975201892759abb20a52cb04e4a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-06 11:49:46 +00:00
hjk
9670c67704 Qnx: Move QnxRunConfigurationFactory close to run config
No need to have half a dozen lines of code in a separate translation
unit.

Change-Id: I7b611f3404d3db4a1f731b4bfa79bd560a2bf9f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-06 11:45:20 +00:00
Christian Kandeler
300afe8b8d QbsProjectManager: Cache run environment
Setting up the qbs run environment is not free, and the respective code
gets triggered from other plugins much more often than expected.

Task-number: QTCREATORBUG-20175
Change-Id: I6529718d20738140963486caef103d6d17958d50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-06 11:05:45 +00:00
hjk
71501a3bf7 BareMetal: Some consolidation of RunConfiguration related classes
Purely mechanical, no visible/functional changes intended or expected.

- have one file pair for each set of config/factory/widget
- de-pimpl BareMetalRunConfigWidget, it's very local now
- use new wrapWidget convenience function for run config widget setup

Change-Id: Icd0df2bc7e206d6bf15d722f7eaa3b9fbee0b0fa
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2018-04-06 08:52:46 +00:00
hjk
afbeefba86 Python: Move TaskList emptying to OutputFormatter constructor
... in preparation of upcoming OutputFormatter creation reorganization.

Also, replace a raw string literal by a normal one to accommodate moc
and remove an unused member.

Change-Id: I416bb20afd891717fcb4f449955b4e46e5c05590
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-06 08:24:12 +00:00
Nikolai Kosjar
b9ae919cb7 Clang: Backport support for std::has_unique_object_representations
...to be able to parse type_traits of libstdc++ 7 without errors.

Task-number: QTCREATORBUG-18757
Change-Id: Ib76e233e77a58a9fb6761c733057dcc1d6c42ead
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-06 06:57:44 +00:00
Nikolai Kosjar
56a8cd6835 Clang: Remove pointless empty line in diagnostic tooltip widget
...for diagnostics coming from clazy/tidy.

Change-Id: I73a1db74f075c1ec15ff16fc07da012451729097
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-06 06:57:34 +00:00
hjk
c69e4598ed ProjectExplorer: Streamline *EnvironmentAspect interface
Register code/name combinations together.

Also make the otherwise implicitly preferred first entry
explicit in the API.

Change-Id: I80f68b01d53e2672480365d4efcb9d790b8363fd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-06 06:27:52 +00:00
Ulf Hermann
27c51ed4c8 FlameGraph: Allow zooming into items
Double clicking an item will now rebuild the flame graph with that item
as root. Double clicking on an empty area will reset the root.

Change-Id: I16dd4b00d0dd09ff922a01acee67f0d553da6323
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-06 05:58:54 +00:00
Orgad Shaneh
438db9a488 QmlJS: Remove duplicate entry in DISTFILES
It already listed in parser.pri.

Change-Id: Id44e1945eb9f0a7fc988a00b52b6650267c8a266
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-05 14:33:01 +00:00
Thomas Hartmann
89ce755909 QmlDesigner: Remove magic opacity when adding items in states
It should not make a difference if an item is created in a state.

Change-Id: I788cb2aec758a42418a5939c2430074803a662db
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 13:42:47 +00:00
hjk
fbb7f380e2 Qbs: Rework RunConfiguration
Use new ExecutableAspect, simplify working directory and
'use terminal' access.

Change-Id: I1daca3a30a4a46f3e1ad0019a49d28279cbc885f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-05 12:30:37 +00:00
hjk
96b5fa208f Qmake: Remove QmakeProject::runConfigurationCreators
Not used anymore.

Change-Id: Idba6fd4a8d6f4c7e251a78568b1da0debd93bf5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-05 12:21:26 +00:00
hjk
232e8712a5 ProjectExplorer: Streamline RunConfigurationFactory interface
canHandle() is only used locally in the implementation, so
make it private and de-virtualize.

canCreateHelper() did nothing except returning true anymore,
so remove it.

Change-Id: Ifac39e077e3c296b2b2dfc9fbb29c20884e056a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-05 12:13:05 +00:00
Alessandro Portale
98e26dc6fb QmlDesigner: Remove programmatical derivation of theme colors
The Qt Quick Designer synthesized a few theme colors from existing theme
colors. That was in order to prevent the need for 6 theme colors being
defined in every theme. It turned out, however, that being able to
define these if favorable.

Todo in follow-up commit: remove QmlDesigner::Theme::qmlDesigner...()
functions, and fix up the qml, accordingly.

Change-Id: Ica85df5472cd7b9da8bf215eb6dbdcf608a4fb2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-05 10:41:12 +00:00
Marco Benelli
65c11b6446 qmldesigner: avoid reloading document when not needed
Creating a new ReadingContext is an expensive operation as it creates
and call a Link object.  This operation is needed only when the document
is actually changed, in all the other cases it is not needed.

Change-Id: Ia368122d60d2c7de86d10e169dd7f20a19f01115
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-05 09:52:41 +00:00
Thomas Hartmann
906d2ac9b5 QmlDesigner: Read contentItem after completing
This avoids issues with deferred properties.

Change-Id: Ie9cc0eaa3468bcb21e4817f8c5e3c1b97c8fc99c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 09:20:31 +00:00
Thomas Hartmann
9624bf0508 QmlDesigner: Disable widgets while text is edited manually
While the user is editing text in the text editor
we disable the input widgets.
This ensures that the rewriter is not confused by the
manual editing and also there is no guarantee that the
QML code is syntacially correct.

We also disable the toolbar.

Change-Id: If062b49f834e901a933a9b1f67582ee9be6232bc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 09:17:45 +00:00
Thomas Hartmann
9c6061be9b QmlDesigner: Add missing enum scope
Change-Id: Iadb96854c43d94f70d6b6d8bd398e2e265bff21a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 08:53:59 +00:00
Thomas Hartmann
6f07d79e01 QmlDesigner: Catch exception in ModelMerger
Exceptions in the merger are very rare but not impossible.
Therefore we have to catch potential exceptions.

Change-Id: I83b2e9e41aa7b21374c06e2401c13df984fe0fd5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 08:53:50 +00:00
Thomas Hartmann
c3e19a8076 QmlDesigner: Do not dispatch commands when already in destructor
On Linux destructing the local sockets leads to commands being
dispatched synchronously. This is not expected and totally unrequired.
When we shutdown the instance server no commands have to be dispatched
anymore.

Change-Id: Ieeca7ac2103e7b463137d76f85cd326888cc38ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 08:53:42 +00:00
Thomas Hartmann
aa75c6ebed QmlDesigner: Do not show icons for the itemlibrary in resources
Everything that is in or below a designer folder with a *.metainfo file
is not supposed to show up in the resource browser.
The code is written very defensive way and we check a maximum
of 3 directories above the current file.

Change-Id: I14b3ae8a7e47208e15e9adfc1696c531a8589231
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-05 08:53:32 +00:00
Orgad Shaneh
68e3da84f3 Debugger: Fix brace indentation
Change-Id: I2a09543a47af48af3ed8bf20c75eedfd0aa1a5ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-05 08:13:08 +00:00
Orgad Shaneh
7a4499d889 Debugger: Add missing breaks
Detected by GCC8.

Change-Id: I2bb6b20e5d2b8a930ef3e935e40a66a24cd1fd8e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-05 08:13:04 +00:00
Christian Stenger
88ecdaaf00 Debugger: Ensure debugger console is created
Output panes must be created before handling the settings
which of the panes to display.

Change-Id: I0c391f4c56c517d5a9626735006d741f64cf161f
Reviewed-by: hjk <hjk@qt.io>
2018-04-05 08:13:01 +00:00
Marco Benelli
a874cf581d Qml/js reformatter: use quotes in objects literals
The reformatter used to remove the quotes that wraps the property name
in object literals.  This causes problem when the name is not a
valid identifier, resulting in that valid code become invalid after
reformatting.
This patch forces wrapping of property's name in quotes: in this way,
the reformatted code is consistent and it never get invalidated.

However the resulting formatted code is not consisted with the one
formatted by previous versions.

Task-number: QTCREATORBUG-17455
Change-Id: I1e361102819055de210d6c81020f204c08aaa253
Reviewed-by: Markus Maier <markus.maier.sw@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-05 06:50:03 +00:00
Christian Stenger
bf285af007 Utils: Fix compile with gcc 4.9
Otherwise compile fails with
 constexpr constructor does not have empty body.
Broke with 2f8c075a01.

Change-Id: I04ce03eaf51ddb3b4233abc4b51a553355e28e04
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-05 06:25:15 +00:00
Orgad Shaneh
704a70810d Clang: Add a missing break
Detected by GCC8.

Change-Id: I64e399a006c9ad93af4798f0e6cf48f1ca391f39
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-05 06:19:51 +00:00
hjk
150011823e Qbs: Split mangled build key only when needed
Easier to keep one variable in sync than three, and moves
the code closer towards a unified pattern in the local
runconfigurations.

Change-Id: I2df09127d476be4ddab466f8a709a2b383a76b97
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-04 16:09:49 +00:00
Marco Bubke
efd9b08eb4 Utils: Remove noexcept from SmallString::append
We want to get bad_alloc. ;-)

Change-Id: Icc7995405bfb96d3f709b80e30b13c5d81fb3979
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:36:51 +00:00
Marco Bubke
28da1261c8 Sqlite: Use compiled statements for transactions
So we don't recompile them again and again.

Change-Id: I54c95e9d81df86f4944b9e3d45a7277f93f37312
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:36:44 +00:00
Marco Bubke
549aa7ee02 Sqlite: Don't register ranking any more
We don't use it now but maybe later.

Change-Id: I46912728321c5523b59cf8e76a75c538f903b618
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:36:38 +00:00
Marco Bubke
071a6f90d3 Sqlite: Throw misuse Exception in SqliteStatement::bind
Change-Id: I014cf7e067bc67c38448bd79a179858c8abb0b5b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:36:32 +00:00
Marco Bubke
5e42bbc7fb Sqlite: Throw IoError in SqliteStatement::prepareStatement
If we get this any hope is lost any way but we now know why. ;-)

Change-Id: Ic08b104825dc51ce5453203e70a0804265e47330
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:36:25 +00:00
Marco Bubke
b6c038924c Sqlite: Fix container programming bug
We really want to delete the right copy and move constructor.

Change-Id: I9572c197b1be89fc1ce996d65e2de671f48abb4e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:36:17 +00:00
Marco Bubke
23865a102d Clang: Handle constraint exceptions in the file path storage
It can be happen that the entry is written by an other connection after
we tried to read and before we write. This would lead to a double entry
which be prevented by the unique index in the database. In that case we
simply try again and read the id from the database.

Change-Id: I6c9d94e95ae11556bb446813f64be0855be4ddbe
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:35:37 +00:00
Marco Bubke
c5f9765c93 Clang: Handle all busy states in the file storage
It can be happen if different connections try to write and read at the
same time.

Change-Id: I30e9120fdb8f6963f5440eed48e2cfdf8803b2be
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:35:29 +00:00
Marco Bubke
68c1140d27 Clang: Add busy timeout handler to database
You use now a busy timeout of one second. This is preventing the throwing
of a exception for a busy time under one second.

Change-Id: Iae800a525ad009b594c29883ffb243c1be8b3874
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:35:12 +00:00
Marco Bubke
5870905db6 Clang: Handle a busy database in the PCH plugin
This can be always happen for write statements. It fixes the wrong behavior
of the transaction that it tried to rollback if begin fails. If begin fails
the transaction never started so there is nothing to rollback.

Change-Id: I8a03162257fa22a0bb66ccb844f90c6afbc7db64
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:35:06 +00:00
Marco Bubke
789379a8e3 Clang: Fix includes in the PCH creator
We now distinguish between the the top external headers which are used for
the PCH and all external includes which are used for watching. Adding
indirect external includes can lead to errors because some are not
protected by a header guard.

Change-Id: I01576fcf1ad25e7a6e3efc252eabbd23d5c0e727
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:34:59 +00:00
Marco Bubke
4b97126d28 Clang: Fix exception catching
Change-Id: I5914ee4056e821359109786190b7006ef992b60e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:34:52 +00:00
Marco Bubke
410a2b95c4 Clang: Make more indices unique
This is providing more security that there will be no double entries in
the database. Instead you will get an exception if you try to corrupt the
database.

Change-Id: I162dc8ddd270b86afdf12ba4d55686637b2c09ef
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:34:39 +00:00