Commit Graph

62421 Commits

Author SHA1 Message Date
Christian Kandeler
03c8db5513 Core: Fix warnings about unsused parameters
Amends e203581956.

Change-Id: Ia1ca257f43849bc0e96200c2980f23587ef73734
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-07 09:11:49 +00:00
Eike Ziller
8e51295959 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/libs/utils/processreaper.cpp
	src/plugins/clangcodemodel/clangmodelmanagersupport.cpp
	src/plugins/cmakeprojectmanager/cmakeprocess.cpp

Change-Id: Ie248bcb02a80f3e02ab19d73033ce2ba31e7fd83
2021-09-07 11:05:40 +02:00
Cristian Adam
e08928e4f7 auto-setup.cmake: Better handling of conan edgecases
Do not try to run the conan executable if conan executable is
not found.

If the conan auto-setup fails warn about it and provide the message
how to skip the auto-setup configuration and do not fail due to the
missing conan_paths.cmake file.

Also print a status message that informs the user that the package
manager auto-setup is performed, with the information how to skip
the step.

Task-number: QTCREATORBUG-25680
Fixes: QTCREATORBUG-25891
Fixes: QTCREATORBUG-25818
Change-Id: I0969ba9b417448f89efd22d7c361e3a54e552ed1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alp Öz <aoz@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-07 08:52:36 +00:00
Christian Kandeler
c8bc0eb512 CppEditor: Merge two smaller headers into cpptoolsreuse.h
Change-Id: If83190725a003a49bcd915225f049ccaf186f985
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-07 08:49:42 +00:00
Eike Ziller
95de5c93b1 QmlJS: Fix issues with getting modulePaths
This patch

- improves performance by removing the usage of QRegularExpression for
trivial string operations (this is called 3000 times after configuring
Qt Creator)

- fixes handling of version number like "2.-1" which are the result of
imports with only a major version number like "import QtQuick 2"

Task-number: QTCREATORBUG-25899
Fixes: QTCREATORBUG-26178
Fixes: QTCREATORBUG-26216
Change-Id: Ic792909513f4fe25ac72043645f297ee41890375
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-09-07 08:16:48 +00:00
Christian Kandeler
0b86b455b0 CppEditor: Put the locator filters into one file
These classes are strongly related, so no need to spread them around.

Change-Id: I4258b0c4198b3c650454ac734d7e52e09f46a4eb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-07 08:09:42 +00:00
Christian Stenger
481070d808 AutoTest: Fix test tools handling for project settings
Fixes restoring project settings with enabled test tools but
having globally disabled these.
We need to take the real active state for test tools into
account not only the global one.
Kind of enhances b99d7623f3.

Change-Id: I29c8cc4fff7c82140da41d3c85823d5980c96d9f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-07 08:06:03 +00:00
Christian Stenger
87784a2e01 WebAssembly: Fix test expectation
Amends cd2e164b7d.

Change-Id: I41d2e68aea45c1b4f18f93d5103a6fd560b06c68
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-07 08:05:54 +00:00
Samuel Ghinet
4e7ee4687b Allow the NewDialog to be overridden by other plugins
So that Qt Design Studio can set its own implementation for the New
Project dialog box.

Task-number: QDS-4490
Change-Id: Ie04b041a5b6e25b38416f53b0ee4943839c2f64f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-07 07:04:56 +00:00
David Schulz
d739ba8a7d TextEditor: use cursor to comment selection
preparation for multi cursor support

Change-Id: I57d318ee325e3667a6377a972a0eda66e43d0349
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2021-09-07 06:38:08 +00:00
Jarek Kobus
ace765c199 Move ProcessReaper into lib/utils
Reuse ProcessReaper inside process launcher.
Automatically reap all internal QProcesses of QtcProcess
(either direct child of QtcProcess in QProcessImpl
or indirectly inside process launcher).
Make ProcessReaper work again on QProcess instead of on
QtcProcess, so it may still be reused for non-QtcProcesses.

Change-Id: I950cac5cec28f17ae97fe474d6a4e48c01d6aaa2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-09-06 21:28:19 +00:00
Thomas Hartmann
442907bc13 QmlDesigner: Use Qt::Key_Backspace instaed of QKeySequence::Backspace
Task-number: QDS-5011
Change-Id: If3e0719389e47110b8885ab709568a8daaf0ec1d
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-06 18:37:42 +00:00
Christian Kandeler
72d52f3ac2 CppEditor: Un-export some classes
Change-Id: I285fe7bd3ac835c4a43f0a200dd7905f577ff211
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-06 14:48:17 +00:00
Christian Kandeler
d3b55f45cb CppEditor: Add some member initializations
Change-Id: I920973b83f2c8a217845c8e2c64f7ba9ac52807e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-06 13:03:43 +00:00
Orgad Shaneh
7a7dc86716 GDB: Fix missing token on some responses
COOKIE FOR TOKEN 0 ALREADY EATEN (InferiorStopOk). TWO RESPONSES FOR ONE
COMMAND?

Change-Id: I569a9715f073f3fbba71045f14fa30a06cd434e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-06 12:48:11 +00:00
Henning Gruendl
6d3248e669 QmlDesigner: Fix color dialog removing property
Fix color dialog removing color property after rejecting the dialog when
color is binding.

Task-number: QDS-4826
Change-Id: I4cae3b70b18a0131ac555d5b8502d05de5409070
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-06 12:46:29 +00:00
Thomas Hartmann
1393aa8505 QmlProject: Open the first .ui.qml file in QDS
Open the first .ui.qml file of a .qmlproject to not
confuse users.

Task-number: QDS-4986
Change-Id: I56c77c2101fd549cb7b96ea7d273bb4f5234693a
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-06 11:57:53 +00:00
Eike Ziller
f3418d8661 QMake: Fix that qmake was run on every build on macOS
The commit a71d725e46 which fixed issues
on ARM Macs also removed logic for CONFIG+=<arch> arguments to qmake,
which was removed from qmake in Qt 5.6 (since PPC and 32bit Macs are no
longer supported or relevant, qbase f58e95f098c8d78a5f2db7729606126fe093cbdf).

The commit only removed part of the logic though, leading to the
Makefile parser and the qmake step disagreeing on the architecture of
the last qmake run, leading to the qmake step being executed again.

Remove the whole architecture detection and matching logic from
everywhere, which only did anything meaningful on macOS, and is not
needed there anymore either.

Fixes: QTCREATORBUG-26212
Change-Id: Ib60ebca1143296194454a63992ab90a97fdb56b6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-06 10:10:32 +00:00
Christian Kandeler
548e19370e CppEditor: Remove CppToolsBridge & friends
This redirection did nothing except to horribly obfuscate the code.
Note that most callers already accessed the model manager directly, and
some bridge functions were not called at all.

Change-Id: Ic1c728afe79bf98544da23a1955ee82d0dbde94f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-06 09:49:36 +00:00
Christian Kandeler
7761a5afbc CppEditor: Move trySplitComment() to its only point of use
Change-Id: I50dc26835a54558879498bcfedf3f246f99f86d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-06 09:37:12 +00:00
Christian Kandeler
8c73358092 CppEditor: Remove unused header file
Change-Id: I4c685e2106689c1d7ed9a3167fe018b8a54fef9d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-06 09:36:29 +00:00
Miikka Heikkinen
8004909f79 QmlDesigner: Fix crash on asset library refresh
Asset library refresh will crash if done while there is a modal dialog
open, so postpone it a bit in that case. The timer used for this
will also reduce unnecessary refreshes, improving overall performance.

Change-Id: Ib2ff29f5f79428c6543a20f611c708ba80e88ded
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-06 08:12:43 +00:00
Assam Boudjelthia
c7061af61f Android: don't throw error on adb's "All files should be loaded." log
When installing a signed apk, adb might throw the following log
"All files should be loaded. Notifying the device." which is being
treated as an error and will stop the deployment from going forward
until user input is given. The current condition is not catching it
probably because it has a \n at the end, but let's treat it as a
warning.

Change-Id: If071730b39871b4e60f8755d14ba352b86e7c244
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-06 07:04:27 +00:00
Assam Boudjelthia
bf3dae64a2 Android: fix toolchain path retrieval for NDK r10
Although, recent Qt versions (Qt 5.12+) don't really need r10, this
can be useful if an older version is used, or if the user wants to
explicitly use Ndk r10.

Change-Id: Ic88929a747bcea89384a7bae9d8f8b26135fae65
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-03 17:06:02 +00:00
Jarek Kobus
8724a4efbb Use QtcProcess for clangbackend
Change-Id: Ifdcdba765409a09861f81dd3dff405115a986801
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-03 14:06:56 +00:00
Jarek Kobus
21fabfeeb6 Fix a leak in ClientServerOutsideProcessSlowTest unittest
It looks like posting the delete request from custom
deleter might not deliver the actual delete to the QtcProcess
for some reason (e.g. event loop wasn't spinning anymore).

Change-Id: I4f797984e28d738015881bd0fe4f91d28f525989
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-03 14:06:46 +00:00
Cristian Adam
e203581956 Core: Remove 'dllimport' attribute warning
By having the function body in the class we automatically get the
same inline functionality and get rid of the warnings below on LLVM
Clang 13.

src/plugins\coreplugin/find/ifindsupport.h:71:27: warning:
 'Core::IFindSupport::highlightAll' redeclared inline; 'dllimport'
 attribute ignored [-Wignored-attributes]

Change-Id: I0daa6412678090f45bdfb6401157cb68bcb0241f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-03 12:34:55 +00:00
Christian Kandeler
1d88a65747 CppEditor: Move CppHoverHandler to its only point of use
No need to compile an extra translation unit for this.

Change-Id: Ie21346700818ccadab864b77f13f167bd27a457a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-03 11:36:19 +00:00
Christian Kandeler
0a7aca5a71 CppEditor: Remove class CppEditor
It's not needed, and conflicts with the namespace of the same name in
some contexts.

Change-Id: I281025abbfad0feb602f006e3b997a8b9c308b48
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-03 11:10:26 +00:00
Jarek Kobus
f7aa963a07 Make all objects created by QtcProcess children of it
Sometimes after creating QtcProcess we move it into a different
thread. In this case we should move all the children, too.
Without parent-child relation all the children will stay in the
old thread.

Change-Id: Ibde44d6153092a155dd2d200a7116a046910dddc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-03 10:56:26 +00:00
Jarek Kobus
a454b3dc23 Use QProcess' / process lanuncher's exit code
Change-Id: I802116c45847daf9a647771ee293aef8463fc3c7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-03 10:56:19 +00:00
Jarek Kobus
597750507e Implement process channel forwarding in process launcher
Change-Id: I9e526eb40ebc46284f773d10ec0e285a009c524d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-03 10:56:12 +00:00
Jarek Kobus
ebae255e49 Fix a possible crash when reaping a process with callbacks
It may happen that CMakeProcess destructor puts its internal
process into the reaper. After this, when the CMakeProcess
is already destructed, the internal process may still be working.
Since we have set the StdErrLineCallback lambda for the process
which accesses the private m_parser field, it may potentially
crash.

Solve it in a general way, so that whenever we put a process
to the reaper we reset its callbacks.

In addition, disconnect all the slots connected to process'
signals.

Fixes: QTCREATORBUG-26220
Change-Id: I63ea0e0ed6a62ef97ac695572f18014458489c5c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-03 10:05:34 +00:00
Miikka Heikkinen
4772253d9d QmlDesigner: Fix used imports not being in sync with model content
Figuring out the used imports checks all model nodes, which means
model needs to be updated before used imports are determined.
Fixed by moving setupUsedImports() call after model sync.

Fixes: QDS-4985
Change-Id: I3f03055d36cb638bcfcd48dc973dbae3af7d8002
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-03 09:50:58 +00:00
Artem Sokolovskii
83e926f1cd CppEditor: Fix space issue for auto generated Q_PROPERTY
Change-Id: I3744ecfc18c7291666f346ea7b047ee749672e05
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-03 08:37:25 +00:00
Thomas Hartmann
d7994871b6 QmlJS: Prepend "My" to default component name
Task-number: QDS-3313
Change-Id: I1bd9944a63333d38c9fd77801ef63d7d55787878
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-03 08:31:26 +00:00
Thomas Hartmann
5e464155d9 QmlDesigner: Remove "layer.enabled" when deleting effect
Task-number: QDS-3802
Change-Id: Ieb0e839e006c43be8f62318ffec06044eedefd78
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-03 08:31:20 +00:00
Christian Stenger
b99d7623f3 AutoTest: Fix synchronizing test tools
It is wrong to query the global active state when
adding test tools known to be active.

Change-Id: I89ab292e1a71b43757e6308fa4b4c584d62fe28b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-03 07:13:23 +00:00
Christian Stenger
e76f83aa90 AutoTest: Silence deprecation warning
When using Qt5.11+ we run into some deprecation warning
for the logging handling on Windows.
Silence this by specifying the new environment variable
as well which is checked first.

Change-Id: I1ca2b826de4516c606b260d053b949b5761c8414
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-03 07:13:18 +00:00
Christian Stenger
368a6614f3 AutoTest: Fix getting more output from ctest on Windows
When running ctest with Qt based tests we missed output coming
from qtestlib.
Due to running a separate QProcess we need to force the output
on stderr to be printed not via the Windows debug console.

Change-Id: Ie3b957230836efd59f11b6a1e7ac310fa44fa073
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-03 07:13:12 +00:00
Christian Stenger
ee2dadb508 Utils: Fix compile with Qt5.14
Amends 8bd1969e7f.

Change-Id: Ieff4e0ef4e35bf2983253b95d6b1d52835a7dfee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-03 07:13:00 +00:00
Artem Sokolovskii
17c6fb866c CppEditor: Add property name to the generated signal
Task-number: QTCREATORBUG-26184
Change-Id: I4689dfb8b74de154092b7916188159432a5c827d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-02 14:02:38 +00:00
Christian Kandeler
3be9f52980 Fix some warnings
Unused functions & variables, initialization order, signedness, non-
virtual destructor.

Change-Id: I405d768fe0e02a36a16c2cead9e1bc2f6a23fb75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-02 13:47:07 +00:00
David Schulz
391588d08e LanguageClient: fix build
Amends 1e1076e247

Change-Id: I2de12e26c75cd1add22570e568d01fc99fa86668
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-02 12:36:17 +00:00
Samuel Ghinet
8bd1969e7f Enhance logging capabilities for wizard classes
* Added QDebug operator<< for the Field classes so that they could be inspected during runtime (i.e. logged)
* Added optional QDebug operator<< overloads for QVariant (wizarddebug.h) - to better visualize the data parsed from the wizard.json files (QVariant objects), by using a format more in the like of json.

Change-Id: I53a729b24e4f2d9c9acf1ed802ac9dc3bb67f373
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-02 12:11:11 +00:00
David Schulz
78372726c1 Editor: fix marking proposal entries as explicitly selected
The flag was set whenever the n or p key was pressed allthough
we only switch the item if also control is pressed.

Change-Id: Ib1b6ab14d1ddf7dee954651382b9b0fc454ddca1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-02 11:05:13 +00:00
David Schulz
28447355ba Editor: reuse generic proposal widget
Do not close already visible proposal widget if we get new results for
the same base position. Just replace the model of the widget and update
the prefix.

Change-Id: I298aba6eb8177edc17fea783189a2f987dbf15a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-02 11:04:55 +00:00
David Schulz
08d8d63f6c CppEditor: add *.qdocinc extenstion to the text/x-qdoc mime type
Fixes: QTCREATORBUG-26203
Change-Id: I4195914d0f89df679cba51d4eb586cb9ad08c950
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-02 11:04:16 +00:00
David Schulz
1e1076e247 LanguageClient: export completion assistant
Change-Id: I2baaf14e9d60fb70e1ba84c1043a89db2db97c3d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-02 10:17:52 +00:00
David Schulz
a3196eedb7 TextEditor: remove Function from the declaration format UI text
Task-number: QTCREATORBUG-26156
Change-Id: I2ca0f8c6d6445a78b9bd5f366c51237073991fd6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-02 10:17:38 +00:00