Commit Graph

55184 Commits

Author SHA1 Message Date
Ulf Hermann
1155601da5 QmlProfiler: Move some methods from statistics view into model
This allows us to tighten up the public interface of the model.

Change-Id: Iaa0363993de7cd94c3468d2c939198e65746e829
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 10:15:44 +00:00
hjk
085dfac560 QmakeAndroid: Remove an explicit reference to QmakeProject
The base Project is good enough nowadays.

Change-Id: I428fecb56c5d5cb59e7f8a98b570e83136c155d8
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-04-12 09:21:40 +00:00
Alessandro Portale
b3d291d230 Qml tooling: Support Qt 5.11
QtQuick 2.11
QtQuick.Controls 2.4
QtQuick.Window 2.11

Change-Id: I78df0cf414e6c2ce72830b88d29a8777ac30c757
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-12 09:16:21 +00:00
hjk
7ae87fa8fd Use WorkingDirectoryAspect in CustomExecutableRunConfiguration
Change-Id: Id7e082aed3161e7a85a4d23b74cc9b1c848e5631
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-12 09:16:21 +00:00
Robert Loehning
417436c965 DocumentModel: Replace optional::value by non-throwing alternative
...to not throw exceptions into dtors

Change-Id: Iee6cb7567befcc07879db496adeb3a2afedd18f3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-12 09:16:08 +00:00
Ivan Donchevskii
bb83f8fdb2 Clang: Set proper translation unit option for UpdateExtraDocumentAnnotations job
Change-Id: I929070698d91d184ca9e0f7cc398be0e74710ce5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-12 09:15:25 +00:00
Ivan Donchevskii
f9d95c9205 Clang: Optimize clang overview model
Build the tree in only one loop.

clangbackend generates tokens almost as fast as it
did before (about 10% slower in general).
Broken documents are more affected and take much more
time (about 300%) but it's better to have this time spent
on backend side then in QtC itself.

Task-number: QTCREATORBUG-20205
Change-Id: I34c58bca30c4494005a029abd82c7e612ecd6fb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-12 09:15:12 +00:00
Ulf Hermann
5de5794c49 QmlProfiler: Disambiguate parent/child terminology in statistics
When talking about call stacks call them "caller" and "callee". Call
the invisible root item of the model "rootItem".

Change-Id: I551b23f1491d391145193901d3f3a29ab3942089
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 09:13:22 +00:00
hjk
abfe7fd3c7 BareMetal: Do not use QtOutputFormatter
Qt is unlikely to run there, so that's never triggered.

This also removes the only dependency of the plugin on QtSupport.

Change-Id: Ic22dcca9836e72a0bce46e67d354c4fcff1ac069
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 09:13:02 +00:00
Ulf Hermann
f94e048c2f QmlProfiler: Un-pimpl statistics classes
They aren't part of any public API and the pimpl pattern just gets in
the way here.

Also, initialize members inline where possible, remove redundant
deletes, prefer explicit ownership over parenting, and use
std::unique_ptr for owned objects and QPointer for non-owned QObjects.

Change-Id: Ibe1e1f88d0e38b6ca26544fccb1db6b809d1556b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 09:12:10 +00:00
Christian Stenger
86b78bde5d AutoTest: Allow framework specific tool tip on settings
The grouping checkbox enables grouping, but frameworks can have
more grouping modes than the default implementation.
Allow frameworks to provide its own tool tip for the checkbox
on the general settings page.

Change-Id: I0515e542284491a669ef33820104a32074ecf885
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-04-12 08:27:25 +00:00
Christian Stenger
aee959ea1d AutoTest: Add gtest filter mode
This adds another grouping mode to the gtest framework based on
gtest filtering. You can now specify a filter that will be used
to group the gtest tree items into matching and non-matching
tests.

Change-Id: Iaf0e55c9e57e2720f4fa84ab4b51ecaeb614df88
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-04-12 08:27:11 +00:00
Orgad Shaneh
070b5fdbbb Clang: Fix minor style issues
Change-Id: I040e3f6fcd717b4ffae2f0ded8bfebada67888fb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-12 07:21:29 +00:00
hjk
fb8f007bbb Android: Move some unshared code closer to its only place of use
Change-Id: Ieaba2c8f76ee9ac020ebd44712aee593c34e4bf0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-04-12 07:03:06 +00:00
Ivan Donchevskii
84b983617f Clang: Support anonymous types in tokens
Add extra data to Keyword tokens.
Does not affect highlighting.

Change-Id: I206499ea35ee4ece5fe442665c904090cf5d90fc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-12 06:51:07 +00:00
hjk
3290de7a4e FakeVim: Remove Utils dependencies from fakevimhandler.cpp
There have been requests to easily re-use FakeVim in other projects.
To make that easy, cut the few explicit ties to libUtils in
fakevimhandler.cpp.

Change-Id: I090d50fb1fd4e62d97e9430e94a84d1f267773a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-12 06:50:31 +00:00
hjk
b3d16f4465 Nim: Use aspects in NimRunConfiguration similarly to other runconfigs
Change-Id: I4b9d9cda4867c36cece3f4d4e208ec4163a7d6b8
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2018-04-12 06:31:55 +00:00
hjk
870a5c581a Debugger: Make libcxx's std::vector plottable
Task-number: QTCREATORBUG-20249
Change-Id: Idc17fcbda34273b4f29f0da0b01eddcd4f83c52d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-12 06:28:48 +00:00
Ulf Hermann
06aa4c573e QmlProfiler: Fix type for restrictToFeatures
Change-Id: Ifdc75c570faf4ae6784decf80a530c0e30d44e1d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 05:53:30 +00:00
Ulf Hermann
1732b6f882 QmlProfiler: Drop some dead code
Change-Id: I43e0803461ff8d6e30fde3c526d62402fedb6f4b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 05:51:42 +00:00
Ulf Hermann
5aaaa7c198 QmlProfiler: Get rid of field/column mapping in statistics view
None of the fields are ever unavailable, and they are always shown in
the same order, so we can just use the enums directly instead of a
mapping and an extra whitelist. This enables us to also drop some magic
numbers. In addition, none of the items have children. So we don't need
to expand or collapse them.

Change-Id: Ibf3d1933d1fb703f5d8e74ae5043c3d1db462738
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 05:51:34 +00:00
Thomas Hartmann
4f4e5102ea QmlDesigner: Slightly increase section size
Change-Id: Iaa42a5e7fa1b58bf77f05ea04fcb997b647f474a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-11 15:46:44 +00:00
Antonio Di Monaco
bf5ba08435 Fix coding style
This patch fixes the incorrect brace symmetry contained in the patch
916bc59cfb .

Change-Id: I003c89f5f2170190d1ae2f52f186862fe06a2135
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-04-11 14:47:18 +00:00
Tobias Hunger
94cb7c988b QmakeProject: Do not try to emit "parsingStarted" several times
This prevents a soft assert from triggering.

Change-Id: Ic2b650f1c850d87492bad8f23d200ede0de35722
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-11 13:23:47 +00:00
Tobias Hunger
63a4654a8e ProjectExplorer: List foldernodes in project as well
List folder nodes (e.g. used for QRC files) in Project::files(...).

Task-number: QTCREATORBUG-20220
Change-Id: I9879d79530fd78a6b0976fe7fdb45a23d2d9c553
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-11 13:23:22 +00:00
Ulf Hermann
939db5feab Timeline: Use plain array as model for RangeDetails
The type restrictions enforced by ListModel effectively force us to
convert everything to QString before we print it. This is probably not
more efficient than using dynamic types, and it force us to write a lot
of boiler plate code.

Change-Id: I3f61409782a676858874380d3b617ab46b4144ff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-11 12:27:07 +00:00
Orgad Shaneh
3a52a2c3f1 QmlJS: Sync parser with Qt 5.10
Change-Id: I87c64edc1235bab10b9f32abeab4386b5cc7390b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-11 12:15:19 +00:00
Tobias Hunger
d6543baa88 BuildStep: Make build steps more widely available
Make the build steps apply to more buildsteplists.

Task-number: QTCREATORBUG-19823 (and similar for other build steps)
Change-Id: I09d3b4b6ad99453cb587303aa78b46e8a4f360bb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-11 12:02:38 +00:00
Tobias Hunger
38b6b79775 CMake: Make cmake build step available to all build step lists
"cmake --build ." is useful to build, clean and deploy, so offer it
everywhere.

This fixes soft asserts as a side effect when loading cmake projects with
existing "cmake --build . --target=clean" in their clean steps.

Cherry-pick of 63f31a1e4b from master.

Change-Id: I39e5866f6012b9ea1153da324e4abd1cd25fea92
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-11 11:58:22 +00:00
Tobias Hunger
dba102ff61 SettingsDialog: Set a more reasonable default size
Set the minimum size on first start to something reasonable. Currently
the SettingsDialog starts out tiny on Linux and is unusable till
resized for the first time with empty settings.

Change-Id: I1e0f6dc0bc5a41ba53f655f81181fbba84da23df
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-11 11:43:05 +00:00
Thomas Hartmann
a7bf5fae72 QmlDesigner: Stretch factor has to be set after inserting widgets
Change-Id: I90c48c6ca5d7eee51b0d0192ab045ff11a8a7c97
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-11 10:59:23 +00:00
Thomas Hartmann
34f8bbe502 QmlDesigner: Open states editor as expanded
Change-Id: I690aa94f3990f9dd5ab18ab327e37b9a1e42be08
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-11 10:59:18 +00:00
Thomas Hartmann
ba1dcb5506 QmlDesigner: Remove magic number
Change-Id: Id493ef001293afd9271dc5b8142d190f1f434633
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-11 10:58:48 +00:00
Nikolai Kosjar
a821533851 Clang: Suppress diagnostic "file 'x' from the precompiled header has been overridden"
...since it's not critical, only annoying to see.

If this diagnostic occurs, changes in a non-project header will not be
reflected in the main file. That's not a common case.

Task-number: QTCREATORBUG-20125
Change-Id: Ic7b65506cdd6bc1c163050497d6f7c106a48d517
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-11 10:53:38 +00:00
Orgad Shaneh
7caa09c71c UnitTest: Fix signedness incompat. warning
Detected by GCC8.

Change-Id: Id45f8d7928d2071ce7ad59ce0c09e9baa9cbf32c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-11 10:43:31 +00:00
Alessandro Portale
95eadc99f4 utils: Icon: remove dead pixmap-combination code
Utils::Icon can theoretically take lists of "plain" pixmaps and compose
them into one icon/pixmap. But neither is that feature used once in Qt
Creator nor does the Icon API really imply that possibility. Therefore,
the functionality can be removed.

As an additional gain, this change lets QIcon/QPixmap handle the loading
of single pixmaps directly with the benefit that QIcon handles different
@?x versions "the Qt way" (returning QIcons with multiple resolutions,
if available).

Change-Id: Id1ef5115c973a99bebd3d433bf88b3ab24be2bbd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-11 08:25:29 +00:00
Christian Stenger
2945865516 AutoTest: Provide possibility to copy tree items
This allows to create a copy of an item. Basically it will
copy its member objects, but it does not copy its children.
Preparation for extending grouping support for GTest.

Change-Id: I75f92be53ff4191cacea2944b31641a9292d1e58
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-04-11 08:24:47 +00:00
Christian Stenger
1b993e40e3 Core: Avoid duplicating options page
Creating an IOptionPage registers it automatically. In case an
IOptionsProvider is used this duplicates the the option pages
and although duplicated still adds them to the respective
category again.
If one clicks on the respective tab this results in a crash.

Slipped in with cc88302309.

Change-Id: Ie881f532c3f0e397147d99ce368066cdce01a612
Reviewed-by: hjk <hjk@qt.io>
2018-04-11 08:24:26 +00:00
David Schulz
a2c362af31 QmlJSEditor: fix crash after document reload
Clean up all marks in the document destructor, to prevent accessing
already deleted member in a TextMark callback.

Task-number: QTCREATORBUG-20199
Change-Id: Ica996ea393b9ae636c731f009a6d39552ff35e26
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-04-11 08:18:49 +00:00
Ivan Donchevskii
d6bb6c5018 Clang: Link clang driver with clang-tidy/clazy libraries
There's no easy way to build clang-tidy .dll
and load it dynamically. The same for clazy.

Required for the tools based on clang executable
which want extra diagnostics from clang plugins.

Change-Id: I425d10c1a87e3051a44b9ffd13eb2968110101af
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-11 07:26:27 +00:00
Nikolai Kosjar
54e82eca80 Clang: Update info bar hint
We use CXTranslationUnit_KeepGoing, so errors in headers will not lead
to the expensive regeneration of the preamble on each reparse. Adapt the
info bar hint.

Change-Id: I340a1f862473f1b3aec0718bb5a2940fff0a91ed
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-11 07:18:41 +00:00
Nikolai Kosjar
e5610c6ae2 Clang: Clean up qobjectdefs.h
* Remove unneeded #include that might lead to false diagnostics
* Fix typo

Change-Id: I38a3bbe07dbcb33f004c7b7a2a4ca4a90fb77350
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-11 07:18:21 +00:00
Nikolai Kosjar
8441bb0933 Clang: Avoid warnings about unknown warning options
...as they are generated by e.g. Q_OBJECT use.

Previously we have avoided Q_OBJECT warnings by using
-Wno-unknown-pragmas (Qt Creator build with libclang 3.9). With the
upgrade to libclang 5.0 GCC pragmas can now be parsed by clang and the
related warning option thus changed to -Wunknown-warning-option.

Note that previously -Wno-unknown-pragmas was part of every built-in
configuration and visible in the UI. Now that option and the new one are
added behind the scenes (not visible in the UI anymore) so that every
diagnostic configuration, also the copied/customized ones, will profit
from it. Still, by putting this hidden options first on the command
line, the user can overwrite them with his own configuration if desired.

Task-number: QTCREATORBUG-17460
Change-Id: I68aaec1b4791522bd8dc4e5fdb405cc5b9c9f514
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-11 07:15:35 +00:00
Eike Ziller
d44ed66a9f File System View: Add option to show folders on top
Task-number: QTCREATORBUG-7818
Change-Id: I37a36a03c9baf6fba7b3eedcb52ee5912a57a47a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-11 06:51:48 +00:00
hjk
99bcc00199 ExtensionSystem: Remove PluginManager::getObjectByClassName
Not used anymore inside Qt Creator.

If 3rd party code really relies on this function, it can use the
function locally, or, likely switch to the still supported
getObjectByName or getObject.

Change-Id: I041877b3e0630e6b257055dec5e10baf68c83546
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-11 06:47:18 +00:00
Eike Ziller
6f91ce1c52 File System view: Add "New Folder" to context menu
Task-number: QTCREATORBUG-17358
Change-Id: I64b3d34ca0432369630382c40cf749f3cc1a08df
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-11 06:43:26 +00:00
Eike Ziller
ab7960f6cf Move Project::makeUnique to Utils
This is more generic than projects

Change-Id: Ifdbc57ff48f9fd4a40e6149ba636e0a55cbac502
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-11 06:42:27 +00:00
Thomas Hartmann
7160b83589 Allow to disable or enable high DPI scaling
An option is added to the Options dialog:

* Allow to enable high DPI scaling on Linux
* Allow to disable high DPI scaling on Windows

On macOS+retina, high DPI scaling applied automatically
and we do not show the option on macOS.

I had to duplicate the logic for parsing -settingspath,
because the code has to run before QApplication is created.

Task-number: QTCREATORBUG-20232
Change-Id: I4e94fc54391fe99e30d4778ec2a178529961eed7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-10 16:28:35 +00:00
Tobias Hunger
12d25f8061 Nim: Set targetAbi to Abi::hostAbi
Considering that you can link C libraries into the binary the
hostAbi is a better default than unknown-unknown-unknown-unknown.

Change-Id: I24ced24a2d04cdeb794d32c85a42bb848c7291ed
Reviewed-by: hjk <hjk@qt.io>
2018-04-10 15:12:29 +00:00
Antonio Di Monaco
916bc59cfb Add support for system include directories in qmake project files
When system include paths are added via QMAKE_CXXFLAGS in a .pro file,
in order to use the -isystem parameter, they are not taken into account
by Qt Creator.

This patch adds support for -isystem parameter in QMAKE_CXXFLAGS
parsing.

Change-Id: Ibd25734ec9f3a18258c445804c4a17269d7522ed
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-10 14:57:20 +00:00