Commit Graph

62421 Commits

Author SHA1 Message Date
David Schulz
14067cca86 LanguageClient: filter completion results
Use the optional filter text or the label of a completion item to filter
out results that do not match the current completion prefix. Fixes
completing code with language servers that do not provide server side
filtering.

Done with: Thorbjørn Lindeijer

Change-Id: Id27b88bb4e8f0b8b68d6ee49bd1d41ec11d54c45
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-01 09:33:30 +00:00
Cristian Adam
392bda1160 CMakePM: Save cmake parameters in qtcsettings.cmake also for initial run
This way projects can have access to all CMake parameters that were
issued from Qt Creator.

Previously the initial run was skipped, only the subsequent changes
were picked up.

Change-Id: I7a2262cdb9754ff666f78fd2e39663466f494f5f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-01 09:22:41 +00:00
hjk
f4a8c4590e ProjectExplorer: Fix ProcessParameters::effectiveWorkingDirectory()
... for remote setups: QDir::cleanPath() must not be used on a
fully stringified FilePath, as this also collapses the double slashs
in the :// separator.

Change-Id: I186328ecfc33665c50eda4efebe5d7a4cc3e4917
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-01 08:52:04 +00:00
Jarek Kobus
ba0c797e6d Compile fix
Amends: 615b37193b

Change-Id: Ic40e13320a964f20e50ddaf6a776592632361b3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-01 08:40:14 +00:00
Christian Kandeler
b0d4fc359f ClangCodeModel: Let user choose the override
.... when following virtual function calls.
This brings us up to par with the built-in code model.
We do lose the icons, but they are of very little use in this context.

Change-Id: I29b27d538e7277d06a5af7acee07bddb6eb94c98
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-01 08:22:21 +00:00
Assam Boudjelthia
1372dfdf7f Android: Fix multiple clang clazy warnings
Change-Id: I2ea6cebd16c09a8a4502f4719d99a9d85e5e7d02
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-01 08:11:56 +00:00
hjk
41240ed706 Utils: Differentiate between WritableDir and ReadableFile
Brown paperbag.

Change-Id: Ice4e3760bbfc5699f7efef49919505657d731867
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-01 08:09:28 +00:00
hjk
1fb73905c1 Utils: Simplify and extend MacroExpander::expand(FilePath)
At least for the host it is imaginable that variables might be useful.

Change-Id: Ia8aeeef49c195db3877256c6726a832ec966c420
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-01 07:59:26 +00:00
Christian Stenger
615b37193b AutoTest: Support multiple test cases for Qt
Multiple testcases inside a single executable are not
supported officially, but widely used.
Detect them and handle them as appropriate as possible.
Single test functions or data tags are not selectable
as they cannot get addressed correctly and rely
strongly on the implementation of the test main.

Fixes: QTCREATORBUG-18347
Change-Id: I0f0f42579709d8896e034a6df356cb560291d2ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-01 07:36:25 +00:00
Miina Puuronen
0147fdfc8c QmlDesigner: Fix dropping assets from file explorer to Assets Library
When dropping assets from file explorer to Assets Library, user couldn't
see "Add Resources" dialog if it opened behind file explorer. Dialog was
already modal but now it's WindowState is also set to WindowActive,
giving the dialog focus.

Fixes: QDS-4450
Change-Id: I54ced0f1d51df3994cc688c926de0104d933b83d
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-06-01 07:28:12 +00:00
hjk
57281f10a3 Utils: Add a convenience QtcProcess::start overload
Having QtcProcess::start(const QString &cmd, const QStringList &args = {})
makes porting easier.

Change-Id: I9a028b1ad99d393d14fd9c88488c179a2daa90dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-01 06:47:57 +00:00
hjk
a490745ae0 Docker: Remove some toUrl/path indirection in FilePath access
Change-Id: I8528f28fe64c99d251b20d486438fcd594b55824
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-01 06:01:42 +00:00
Marco Bubke
da267946d9 QmlDesigner: Sync project storage
Task-number: QDS-4423
Change-Id: Ia99df711effff2909b0a57ecebfb386ca51165f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:43:19 +00:00
Marco Bubke
8603eb5ba9 Utils: Remove std::initializer_list contructor
If you write

Utils::SmallStringView view;
Utils::SmallString text{view};

it selects the std::initializer_list contructor. Not the didicated
constructore. It is much to easy to get it wrong so it is better
to make it explicit.

Change-Id: I4240eaf1f39cf71d37df4480fea1ecfa3ea83cb0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:43:11 +00:00
Marco Bubke
7b330d3496 Sqlite: Add insertUpdateRemove
An generic approach to merge values into a database. It is comparing
two ranges. The first range is the Sqlite select range and the second
one which are the new values. New values are inserted, change are
updated and missing values are removed. Unchanged values are not
touched. The compare function is comparing a key. Both ranges are
binary ordered.

Change-Id: I973c83677ea74f8fa62bd7ab8a73ed560c806562
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:43:02 +00:00
Marco Bubke
6fa399eccf Sqlite: Make selects even a little bit more random
Returning selects in the reverse order can find hidden bugs.

Change-Id: If06c0de368de3277e5cca02fadfd6ea3fa323847
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:42:58 +00:00
Marco Bubke
b9ea367769 Sqlite: Activate optimization SQLITE_ALLOW_COVERING_INDEX_SCAN
It is disabled by default because it can break buggy legacy code.

Change-Id: Icd3469b809b93cb9a4b9c95457ded42ea18a7c09
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:42:50 +00:00
Marco Bubke
02f794b9f4 Sqlite: Disable the non memory temp store
We don't use it anyway.

Change-Id: I6718782a4f0d3b05b40c43442b36e403ac3ff28e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:42:39 +00:00
Marco Bubke
b2cd0c32a5 Sqlite: Open Sqlite by default in exclusive locking mode
There are no extra files for the WAL in the excusive locking mode and
it can be even faster because the logging is happening on the heap.

Change-Id: I59d75dd2aa95d802ba67c8534a5cd8ab32a343df
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:42:20 +00:00
Marco Bubke
52698bf924 Sqlite: Add new sqlite compile options
Change-Id: I104bcd74f464155d8b9785f03a96b4b5d73df469
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-05-31 16:42:06 +00:00
Marco Bubke
494469641a QmlDesigner: Move source cache types to their own header
The namespace is now Cache for that types.

Task-number: QDS-4306
Change-Id: I479f1ca534455a41de9dc1d6a1fd891e1d8973eb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:37:59 +00:00
Marco Bubke
b3bed53c4f QmlDesigner: Add SourcePathCache
Task-number: QDS-4306
Change-Id: I5adbf3893cb198c52c1fd433f599d21317c6881c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:37:08 +00:00
Marco Bubke
f7d09630b7 QmlDesigner: Add sqlite function unqualifiedTypeName
Task-number: QDS-4305
Change-Id: Ic9f16c6d5e9af8a3a6ffaff817c3b82af0fc8d61
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:36:35 +00:00
Marco Bubke
019d948552 QmlDesigner: Move project storage to projectstorage subdirectory
We save their not meta info related data. So it is better we move it
their own subdirectory.

Task-number: QDS-4304
Change-Id: Ib99419e992fced93fb245a8c48e02ee256823def
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:32:12 +00:00
Marco Bubke
e4fea9f159 QmlDesigner: Add project storage
Task-number: QDS-4252
Change-Id: Ic74e027b20bc41f3712e3ae155cddc64f8972cb0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:16:48 +00:00
Marco Bubke
a79adedb90 Sqlite: Add noexcept to swap
Task-number: QDS-4289
Change-Id: I74bccb6117904773f400fbe37505de141f816895
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:14:59 +00:00
Marco Bubke
f764e4f0aa Sqlite: Change error handling for reset
Error handling in reset() is not needed because it is only repeating
the errors of step(). We do already handle them. Reset() is also mostly
called in destructors so we can not do much about error there. Reset
is only now reset the statement to a clean state again which is what
we want.

Task-number: QDS-4286
Change-Id: Ifa50859f3d47cc110ef03d7273a01d4419eca9aa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:13:58 +00:00
Marco Bubke
ef4f2a4dcf Sqlite: Add unoptional value fetcher
There is now value, valueWithTransaction, optionalValue and
optionalValueWithTransaction. Sometimes you want to return
the default constructed value as default. So this is now possible.
This simplifies some code but can be even more optimal.

Change-Id: Ibbb6b5ca47803344ed646bfa257602b6db52e0fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:10:09 +00:00
Marco Bubke
c78d1c171f Sqlite: Add *WithTransaction fetcher
There are many simply fetch functions which can now be simplified.

Change-Id: Ibf542ee8b07a1b06ea3dae695da1f69065e9dd71
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-31 16:07:30 +00:00
Marco Bubke
5fda083436 Sqlite: Add exception if statement is called outside of a lock
Sometimes it is really hard to trace if sqlite statement is called
outside of a database connection lock. So we know throw an exception
in the unit test. So we get failing tests.

Change-Id: I71485b9473075751a2fb771ce7e2954e28d8413e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-31 16:07:14 +00:00
Erik Verbruggen
943c31a5b4 Fix missing checks for GHS-Arm
Some places where ghs-specific checks were done, were not modified to
do the same for ghs-arm.

Change-Id: I484f98209188e4c160a13248ca3c3f046b342b22
Reviewed-by: <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-31 14:52:02 +00:00
Eike Ziller
2485c31a48 Merge remote-tracking branch 'origin/4.15'
Conflicts:
	doc/qtcreator/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc

Change-Id: I906330addb7de31e6ed88f88af3fd2adbbe53e1f
2021-05-31 16:13:47 +02:00
Eike Ziller
fbeaa774b5 CMakePM: stop file api reader future on stop()
The future that would trigger the result of a cmake api file parsing
would not be removed if the stop parsing would be triggered.

This could be triggered by fast switching between build configurations.

It could also lead to forever parsing states having the project's
wheel always spinning.

Fixes: QTCREATORBUG-25588
Fixes: QTCREATORBUG-25287
Change-Id: I4f92806ebdb703b4910952cd8db1e52816daf9cf
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-31 13:58:26 +00:00
David Schulz
84ea908b2d Utils: move line column parsing again
This will allow us to just parse the postfix without fileName
extraction.

Change-Id: Ied6b80f25078473e2b91ced68913205a17f9068e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-31 11:29:22 +00:00
Miina Puuronen
6caa8cc289 QmlDesigner: Fix Component Library header
Hover was not working on LibraryHeader.qml. There seems to be some issues
between QQuickWidget and QML Item. Header width and height are now set with
m_headerWidget instead of root Item.

Fixes: QDS-4387
Change-Id: Ic587be319bb7aa6755fa26f6211ce11eb9795c67
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-05-31 10:25:55 +00:00
hjk
9ba5d9d8a8 Docker: Fix indentation
Change-Id: Ice8634c7de27a10dcb4ad7d25fdc3c5933146815
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-31 09:29:23 +00:00
Oliver Wolff
841b6a84cd MSVC: Add support for ARM64 toolchain
Qt nowadays supports ARM64 builds using MSVC. While running from Creator
is not possible, support of building projects can be done with this
patch.

Change-Id: I39eed497b222a05b01af7f251e933432afca0cef
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-31 08:38:38 +00:00
Cristian Adam
637a20c34c CMakePM: Have only one "Scan project tree" task
Check if asyncScanForFiles returns true, which means it added
a future, which then can be used for Core::ProgressManager::addTask

Task-number: QTCREATORBUG-24564
Change-Id: I347c027e676023a782e7d4822fe2d51385888a64
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-31 08:30:33 +00:00
Christian Stenger
2a375a4f60 AutoTest: Silence coverity warning
Change-Id: I8195e9d17a7dfa90724e062c0974e98b74ae2548
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-31 07:41:02 +00:00
Christian Stenger
73c2a98b39 Utils: Make Link a class
Change-Id: Ia2f1c9589f65064eca2416b093b3fecf568058d2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-31 06:45:03 +00:00
Christian Stenger
626a79488f Utils: Fix build on Windows
Amends b9c7ca0096.

Change-Id: I1fb2f8a8857c716b4ce9842f102e86d2ddfd51d5
Reviewed-by: hjk <hjk@qt.io>
2021-05-31 04:34:40 +00:00
David Schulz
ee06b995cb Core: move the fileName line column parsing of openEditor
Move it from EditorManagerPrivate::openEditor to the
EditorManager::openEditor overlaod that take a QString so no line or
column number should be passed via FilePath now.

Change-Id: Ia98058195045cbe555fb6a15c1010057746051d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-31 04:31:53 +00:00
Thomas Hartmann
de2e106475 QmlDesigner: Properly convert <cpp> types
This is something that requires a close look when we update the
meta system.

Task-number: QDS-4407
Change-Id: Ibb2bc79142bd4ae166c47ac261a3fe2aa5464a57
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-05-28 15:39:22 +00:00
hjk
b9c7ca0096 Utils: Use Utils::Link instead of TaskView::Location
Same layout, effectively the same purpose

Change-Id: I742d85ed06c07009ebb9696734f00894275859a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-28 15:18:57 +00:00
Cristian Adam
ab55fb2446 CMakePM: Fix conan compiler path setup
The conan toolchain.file was not passed to the cmake process that
was setting up conan install, only inside for conan.

Task-number: QTCREATORBUG-21785
Change-Id: I5f315e7de823d4ef3237081da9b294b236fedebb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-28 11:53:46 +00:00
Eike Ziller
b768ba2412 QmlDesigner: Fix build
Add missing include
Amends 4786b03594

Change-Id: I68b44b2817baf4f9518d8bcb10cade6cb99eafac
Reviewed-by: hjk <hjk@qt.io>
2021-05-28 11:35:37 +00:00
David Schulz
fcd93256c0 Snippets: Allow defining a final snippet tabstop
Change-Id: I8b9704f66c9f0ac33dfb9d8f5e970a85bbcf143e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-28 10:39:35 +00:00
hjk
2ccf5e2795 Core: Use FilePath in ExternalEditor interface
Change-Id: If3360eb7db9cec373551c2eb0fcffaf3bc5460e6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-28 09:13:23 +00:00
Christian Stenger
ce04dcdcf2 QmlDesigner: Fix Qbs and qmake build
Amends 4786b03594.

Change-Id: I0355d5858f744a2e91f9e6c2e298bf2a660e7559
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-28 09:00:32 +00:00
Christian Stenger
95ff7a6c80 LSP: Fix logic to avoid nullptr access
Change-Id: I5511d266b52b1bc1763bdf3cd430f49f30ae3f37
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-28 08:03:58 +00:00