Commit Graph

64672 Commits

Author SHA1 Message Date
Orgad Shaneh 51453936cc Utils: Replace foreach with range-based for
Change-Id: I9aeea9c029ffc56cbadc04edd20e9b35b154f986
Reviewed-by: hjk <hjk@qt.io>
2020-06-16 04:43:29 +00:00
Henning Gruendl afd6eeed3f QmlDesigner: Fix PropertyEditorValue resetValue
Change-Id: I3ece38e66d46b2d5688594be5a820c2bc666f00a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-15 15:39:25 +00:00
hjk 82e25e71c8 Debugger: Remove left-over comment
Change-Id: I5fecaed75cb2b5368e904ea4202657e56361f0d5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-15 15:02:02 +00:00
Eike Ziller 48e46132e3 Add changes file for 4.12.3
Change-Id: Iaea37345615c572da2bd5697e0a5d771a9168987
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
v4.12.3
2020-06-15 14:28:30 +00:00
Christian Kandeler 934641f45c TextEditor: Sort indent ranges before applying
It can easily happen that callers insert indent ranges out of order, and
without sorting the indentation done earlier in the file is not
considered for the later parts, leading to inconsistent results.

Fixes: QTCREATORBUG-18929
Change-Id: Ice2abe92d54446bcdd102c6a1f822262a8533543
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-15 13:46:11 +00:00
Volodymyr Zibarov 9be4a5f839 C++: Fix Find Usages false positive results for function arguments
Code snippet:
void bar();         // call find usages for bar from here
void foo(int bar);  // bar from here should not be in results

Add test for member function false positives, that is part of
QTCREATORBUG-2176. That was already fixed before.

Fixes: QTCREATORBUG-2176
Change-Id: I9a079caa83bbaea1edb7ba6aeb151d4d4c77952f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-15 13:19:51 +00:00
Christian Kandeler 48be20cf48 Fix clang warnings about copies in range-for constructs
Change-Id: If50553964483626e72a816b1d23fa81b45ed9ca7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-15 12:38:17 +00:00
hjk beee392dd8 ProjectExplorer: Consolidate RunConfigurationFactory::ids
It was already only one id string with two names. Since it is not
an id for the factory but the id of the created run configuration,
settle of  runConfigurationId() as accessor.

The factory and id fields in RunConfigurationCreationInfo were
redundant. factory always implies (runconfiguration)id (but not
necessarily the other way round, in theory different factories
are possible for the same runconfiguration type for different
devices). So drop the id field here.

In one case now factory pointers instead of ids are compared, but
this is neutral there as this happens in a context of a fixed Target,
device and project are fixed there, so id and factory are equally
unique.

Change-Id: I859aa91486a2dd4abfc7369540a3322d6ec6260d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-15 12:13:38 +00:00
Christian Kandeler fcef4709bb qmlpuppet: Fix function linkage
Putting static functions into a header file causes warnings in all cpp
files that include the header and don't use the function.

Change-Id: I9147c034092515e486dc6113a1b053f4d8094686
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-15 12:06:31 +00:00
Cristian Adam e98dfe4d14 GitHub Actions: Update libclang to 10.0.0
Change-Id: I40850933a040084b15ec9861b928a473c878a050
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-15 11:34:51 +00:00
Eike Ziller 2e130acfd7 CMake build: Show build date in about dialog in packages
The default for non-packaging build is OFF.

Fixes: QTCREATORBUG-24128
Change-Id: Id422babe197e215d6cb33807a78ba1ee3aaabb32
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-15 11:32:22 +00:00
Assam Boudjelthia 2acca95fab Android: remove ministro deployment option
Task-number: QTCREATORBUG-23761
Change-Id: I5be3c78a009f1747a3ccf7a6bd342969d2b8ece4
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: hjk <hjk@qt.io>
2020-06-15 11:14:50 +00:00
Tobias Hunger 1bc3e2f0ba CMake: Be more paranoid about running several cmakes at the same time
Try to be more paranoid about having several cmake binaries run for the
same project at the same time.

Change-Id: I6ceca456e515c0beeff46e6912d15b2dd87283a2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-15 10:34:01 +00:00
Tobias Hunger 82555df811 CMake: Add some debug output
Change-Id: I2ae817c5c810b3c97fef2784fe1b5f25cab3c439
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-15 10:33:15 +00:00
Volodymyr Zibarov 7d82741602 C++: Fix find usage to see Catch test functions bodies
Catch test functions defined with function-like macros.
To speed-up semantic analysis, find usages does not expand function-like
macros.
Semantic fails with "expected a function declarator" on such functions
and skips function body.
To avoid that, we create dummy function type specifically for this case

Change-Id: Ie2f2464ee57aa4dc86eed07b8b699458f95c0266
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-15 10:16:06 +00:00
Knud Dollereder af9665f785 Fix issues related to curve locking and pinning
- Prevent insertion of keyframes in locked curves.
  (QDS-2172 means locking, not pinning)
- Unselect keyframes when the curve moves into locking state.
- Make sure that locked curves are always at the bottom of the z-stack
  otherwise they might prevent non-locked keyframes from being selected.
- Use the selection color as background for the whole row of a
  treeview-item if it was selected.
- Always paint the locked/pinned/unlocked/unpinned icons in the treeview.
- Fix wrong mouse-hit-test for the locked/pinned icon hover events.
  The delegate was sometimes wrongly assuming that the mouse is hovering
  over a certain icon

Task-number: QDS-2172
Change-Id: I6caab3f9e8e61e0dc2738eca113d5e1eec420957
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-15 09:35:57 +00:00
Knud Dollereder db3b60d780 Improve usability of the timeline
Keep focus in the lower graphicsview when dragging the playhead
Update the timeline and curve editor when a keyframe value has changed
Select the keyframe when right clicking on an unselected one

Task-number: QDS-1417
Task-number: QDS-2129
Task-number: QDS-670
Task-number: QDS-919
Change-Id: Ic37816c03447b7a7deedce360795fa25805df315
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-15 09:35:38 +00:00
Eike Ziller 8b8ecfa28f Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/fileapiparser.cpp

Change-Id: I39f8c2be859be043f506bef77de9bb5b42d38165
2020-06-15 11:30:34 +02:00
Tobias Hunger 630f43c02d Fix build: Utils/archive.cpp needs to include QTimer
Change-Id: I99f15e6bf2f0879b7cd0f6d859174c95299e4f93
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-15 09:00:26 +00:00
Eike Ziller f1fddfd408 Fix "Header" documentation in ExtensionSystem and Aggregation
Change-Id: Ia6c05bdc1fe810c6afcc337320ed0512fff098c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-06-15 08:25:03 +00:00
Assam Boudjelthia 759b38e2ac Android: don't delete the openssl dir when cloning
Avoid removing the openssl dir if the selected path already exist
and is not empty, rather just recommend selecting a different path
or empty the provided one.

Fixes: QTCREATORBUG-24173
Change-Id: I1e501b361d4917a59a5720146b11580e79ac32aa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-06-15 07:58:23 +00:00
Eike Ziller fa16071ca8 Fix "Header" documentation in Core plugin
Change-Id: If3cbe51b47a3acba32429894dfb5154cd573967d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-06-15 07:55:39 +00:00
Eike Ziller 18ee72ac3f Utils/Archive: Add simple async API
So we can integrate it deeper into the plugin wizard.

Change-Id: I7f7a9eb8e07d3eeab6a4ecf92161f7d04f5fa5c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-15 07:45:10 +00:00
Eike Ziller 7cedde2a0a Utils: Create re-usable Callable for copying and asking for overwrite
FileUtils::copyRecursively has the option to override the copy
operation, and this is e.g. used for asking the user if files already
exist, and to track what is actually copied.

Make that functionality available for re-use.

Change-Id: I16b7eddd32509b06866a1070e45ab58629f9a9be
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-15 07:43:59 +00:00
Alessandro Portale 0be309bcf1 Various places: performance-for-range-copy
Change-Id: I475990d32a5211d31a77782667a2dfedba134137
Reviewed-by: hjk <hjk@qt.io>
2020-06-15 05:58:46 +00:00
hjk cbac89b0fd QtcProcess: Port to QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I9784989786ff65ceac6c9921f7f9f09d4e0f0a49
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-15 05:27:59 +00:00
Alessandro Portale 625a35e492 QmlDesigner: performance-for-range-copy
Avoid copying the loop variable on each iteration if a const reference
would suffice.

For QPointers<>, this change only adds a const.

Change-Id: I5abe7d793cd46859a9a4f9304ec1bd41f899d72c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-14 20:10:01 +00:00
Cristian Adam eabe281b18 CMake: Fix for installation
With CMake 3.17-dev the install step is failing because of the symlink.

Change-Id: I012ce95f5cc61f4b5b9d6a4c48ded0f738b581f1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit f392d13419)
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-12 17:33:43 +00:00
Eike Ziller e2670bf3e6 CMake build: Build tests with relaxed QString casting
Like in the qmake build.

Change-Id: I216649123b4f25e5c01f2a71162fc200e0a36d85
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-12 14:30:08 +00:00
Aleksei German 507019ef93 QmlDesigner: Add Binding Editor to Views
- Binding Editor support for Binding Properties View
 - Binding Editor support for Dynamic Properties View
 - Small fix for Binding Editor comboboxes
Task: QDS-2164

Change-Id: I94da14ea97a16d40c5da0b21ff0e6f315f9e84a4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-12 14:03:48 +00:00
Christian Kamm 39ad832686 QmlJS: Resolve missing QEasingCurve prototype
This helps with resolving QEasingCurve's prototype, which is only
available once QtQml has been loaded.

Task-number: QTCREATORBUG-24142
Change-Id: Icb19491071c195c16c527bd206ffdea6f5806b4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-12 12:24:37 +00:00
Robert Loehning 70662eeb90 Squish: Don't "Save All" at the end of tst_rename_macros
There are no unsaved files.

Change-Id: Ief078f521a7bf6e257d862b69b8dc003b47da31e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 09:42:48 +00:00
Orgad Shaneh 60dab96d39 Meson: Fix issues reported by Coverity
Mostly uninitialized members, and one use-after-free.

Change-Id: Idfc9b0f39733e87e22a97d741cb261e1b09a8815
Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-12 09:42:02 +00:00
hjk bdb4e3d793 LSP: Fix initialization of QRegularExpression::PatternOption
Amends 1f303ffcc5.

Change-Id: Ib3198db1e959dc591c12a403e54d92bfca9a281a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-12 09:40:28 +00:00
Christian Kandeler 11f7c4da9f clangbackend: Fix libclang's priority adjustments
... for member qualifiers.
For instance, when doing completion on a non-const object, non-const
member functions get a higher priority than const member functions. This
does not seem particularly sensible and can make our list of completions
appear unordered.
As each matching qualifier only increases the priority by one and the
base priorities are generally further apart, we can fix this problem by
considering two priorities as equal if they are sufficiently close.

Task-number: QTCREATORBUG-6242
Change-Id: I1d04fdf68869cf07cc00626aaac3030b360c2546
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-12 09:39:57 +00:00
Christian Kandeler ff348e0dcc Unittest: Fix qbs build
Change-Id: I2f573b820745ecbbf5fc00931b4f96b3d43f634a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 09:15:19 +00:00
Christian Kandeler 1d2af6b4cc clang-tidy: Consider context when encountering duplicate files
Prefer source files from contexts where we know that they actually get
built and thus should have includes and compiler flags properly set up.
Also fix the qmake and qbs project managers to not mislabel any non-
application products as libraries.

Fixes: QTCREATORBUG-23394
Change-Id: I0d122c7b58e12d14d68a1ca7337df83074299cd7
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
2020-06-12 09:14:31 +00:00
hjk e115e9b970 Android: Properly split am start extra parameter
Avoids, amongst others, adding an empty item if none is given.

Change-Id: Ieb823e2275ca803088a19a16d7f4238422b149c4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-06-12 09:07:13 +00:00
Alessandro Portale bb89b80097 AutoTest: performance-for-range-copy
Change-Id: I60e79aec1fe2813867d8ff46cec7d39b848d0020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 07:01:10 +00:00
David Schulz 4766ad2d18 LSP: Fix TextDocumentEdit member name
The VersionedTextDocumentIdentifier can be acccessed under textDocument
not id.

Change-Id: I9b3531532ed92885147525fa580c62d4b52f9c4b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 06:36:12 +00:00
Robert Loehning 0575e1bbc2 Squish: Fix finding commit
Change-Id: I87d2345babe91c449c20aec8c93dbafee5773d4f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-11 16:22:43 +00:00
Christian Kandeler aaacfb4945 Fix a clang unit test
This particular test was apparently supposed to check that the two
occurrences of "foo" (one const, one non-const) appear next to each
other in the list of completions. However, there is only one occurrence
of "foo" and the test only succeeded because it happens to be at index 0
and -1 is returned for the second lookup, resulting in a absolute
difference of 1.
So let's explicitly check for that instead.

Change-Id: I6049689911decc114239f2be7e63b091a4a18226
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-11 15:24:07 +00:00
Christian Kandeler fc5b890290 ClangCodeModel: Do not offer dubious fix-it
clang's "remove constant to silence this warning" fix-it is overly
simplistic, just hacking off the remainder of an expression, which does
not necessarily preserve the value. So let's not offer it.

Fixes: QTCREATORBUG-18593
Change-Id: I4443264d5535fae1327103b715386336823e5545
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-11 15:22:03 +00:00
Christian Stenger 7c669a06be Squish: Adapt to changed ui
Change-Id: Ibad3b2080040f7345125c549527f22f2c246fbef
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-06-11 13:44:24 +00:00
The Qt Project 9e73ff6c4e Merge "Merge remote-tracking branch 'origin/qds-1.59'" 2020-06-11 13:31:26 +00:00
hjk f2e06d2764 Revert "Port to Qt 6's absence of QProcess::setupChildProcess"
This reverts commit 6a66ced594.

The patch that will introduce the alternative to setupChildProcess
(QProcess::setChildProcessModifier()) has not yet found its
way to qtbase and current Qt dev already identifies itself as
version 6.0.0, rendering the code here uncompilable.

Change-Id: I570b01598005070f0c17604226d245a3a381250e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-11 13:17:00 +00:00
Christian Stenger 9e4eafccd2 Dumper: Fix python code for Xcode 10.1
Change-Id: I65797bac8b668ce85082eccf6520147a2a4c5680
Reviewed-by: hjk <hjk@qt.io>
2020-06-11 12:58:32 +00:00
Miikka Heikkinen 40457588c5 QmlDesigner: Fix imports from other projects being show in import list
Change-Id: Ic02f679eb5d364250d6cc127ae8652932893e052
Fixes: QDS-1495
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-11 12:42:48 +00:00
Miikka Heikkinen 7f4bf437da QmlJS: Add a way to return just the context of the project of a file
Added ModelManagerInterface::projectVContext() method to return just
the context of the project the file belongs to and nothing more.

To make this possible, fixed caching the file-to-project relationships
and removed automatically adding the currently active project to
list of projects the file belongs to in allProjectInfos().

Task-number: QDS-1495
Change-Id: I949c0202d0280264b6856562a2e7abc2f93d13c0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-11 12:42:20 +00:00
Tobias Hunger 346b28f5f9 CMake: Add a command to trigger parsing of CMake reply file
Add a command to trigger the parsing of a given CMake file-api
reply file. This is important to have to help with debugging file-api
issues like QTCREATORBUG-24044.

Change-Id: Iadaa5cf01b9b6ddddf4e6ad669bb05928c6f29a5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-06-11 12:35:47 +00:00