Commit Graph

67787 Commits

Author SHA1 Message Date
Jarek Kobus
6d5e302157 Use typed syntax in calls to QMetaObject::invokeMethod
We do it wherever possible. Some places can't be fixed
since they still rely on dynamic introspection
(mainly QQuickItem cases).

Change-Id: Ia00b4a04d8b995c9a43b7bf2dbe76a60364bb8ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-16 13:45:02 +00:00
hjk
d7b19b929d Qbs: Use a StringAspect for the "Equivalent command line"
Change-Id: I8d8c6039282dcdb870202e6d0d42d017f557b26a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-16 12:12:59 +00:00
Mahmoud Badri
9e8d88c90b QmlDesigner: cleanups on the Model class
Change-Id: I61764f5ea829b3a59d55b341d02aedfda7b87b84
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-16 11:33:06 +00:00
Jarek Kobus
3167d23a36 Fix a crash when showing tooltips
Looks like we have omitter Q_OBJECT declaration in
subclasses of TipLabel. This probably confuses
accessibility support in Qt 6, as it reads the classname
of the object. Apparently, the classname wasn't set
properly.

Task-number: QTCREATORBUG-24839
Change-Id: I5085e924fb3fa3a0f06d17372c7dc339db30226c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-16 11:31:52 +00:00
Christian Stenger
aa67aa8b2a Sqlite: Fix unittest build on macOS
Change-Id: Id412d0098a1287d5e93c29690bfcf269be1315f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
qds/v2.0-beta1
2020-11-16 10:27:05 +00:00
Eike Ziller
4498c12ddc Merge remote-tracking branch 'origin/4.14'
Change-Id: I790a8b9002a55f52090d085b65d9fe58b7eb1d20
2020-11-16 11:26:03 +01:00
Eike Ziller
9ff91ef0d9 cmake build: Fix building with PCHs
- fix target name
- build pchs without extensions like all other targets
- require CMake 3.10 for plugins

Amends c038abb0ab

Change-Id: I0eae58a9e7ce91c0df6103790cb91a5229d06051
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-16 10:00:58 +00:00
Miikka Heikkinen
d661c2ed12 QmlJS: Ensure QtQuick is the first import
Some items will show empty property panel and cannot be reparented
in QmlDesigner if the module that defines the item is imported before
QtQuick module. This fix ensures QtQuick module is always imported
first.

Change-Id: Ie610fef681f5bf0ac62d1b879bb9306d4f7d293b
Fixes: QDS-3115
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-16 09:36:15 +00:00
Henning Gruendl
c7b5501c84 QmlDesigner: Update icon font
* Add flow action, flow transition and search

Change-Id: I87fc48904b5f1a56aca34f2a66b2aef4657d86bc
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-16 09:30:42 +00:00
Christian Stenger
0695738b67 KSyntaxHighlighter: Fix compile with Qt5.14
Change-Id: I9a98717ba99357940ab8b42c025bea4ecfa42102
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:56:16 +00:00
Cristian Adam
ab324a626c CMake: Add convenience BUILD_PLUGINS|EXECUTABLES|LIBRARIES variables
By setting the CMake list variable "BUILD_PLUGINS=foo;bar" the
Qt Creator CMake API will set "BUILD_PLUGINS_BY_DEFAULT=OFF" and
"BUILD_PLUGIN_FOO=ON" and "BUILD_PLUGIN_BAR=ON"

Change-Id: I766d7451bfb7ccbd23c973f288b06a18ada79dda
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-16 08:51:44 +00:00
Christian Stenger
d60fa5c762 Python: Improve auto detection
Do not list app installer redirectors as python
executables. Windows may put empty redirector files
with the same name in a path that is prepended to
PATH for the respective user.

Change-Id: I9418784ef099df72ef8d0426e55198b30fbeed6a
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:33:49 +00:00
Christian Stenger
bf8eb2d270 AutoTest: Fix using of cache
Change-Id: I3f7695c96139c1f1809631ead1b723e3820b240d
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:33:40 +00:00
David Schulz
c2b6d45670 Editor: Qt6 compile fixes for KSyntaxHighlighter
Change-Id: I65487a3ccb93efeec3be3971f876d317b5a6bfc6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-16 08:12:14 +00:00
Christian Stenger
5d1c789c27 AutoTest: Introduce TestToolConfiguration
Preparation for having code based and build system based
test items.

Task-number: QTCREATORBUG-23332
Change-Id: I4d21142d74b40b988d82c69d02f5c6633c8cebe4
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:56 +00:00
Christian Stenger
73613d8549 AutoTest: Introduce ITestTool
Preparation for separating handling of code based and
build system based tests.

Task-number: QTCREATORBUG-23332
Change-Id: I490af5f3157fd4a8cd07d976cdfd9e4503ade97b
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:31 +00:00
Christian Stenger
e95041c054 AutoTest: Guard against nullptr access
Change-Id: I0378b043ed240533ce6f4b341705dc84d6ede7eb
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:17 +00:00
Christian Stenger
239a59c596 AutoTest: Introduce ITestConfiguration
Preparation for an additional simpler test configuration
which needs to have the same common base.

Change-Id: I1800ed5d7301f1aea99eba6ef588a204697bd569
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:04 +00:00
Christian Stenger
55298cc211 AutoTest: Introduce ITestTreeItem
Preparation for having separated test tree items with a
common base.

Change-Id: I3735f582cc96910e971f5a41c799cc0729a10a58
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:09:46 +00:00
Alessandro Portale
b057ea1ab8 WebAssembly: Revamp Emscripten SDK registration and toolchain handling
Qt Creator's ability to register Emscripten toolchains depended on an
SDK being activated "globally", and on the presence of the ~/.emscripten
file. Qt Creator would parse that file in order to determine the
location of the compiler and the necessary environment variables that
have to be set.

As of recently, the Emscripten SDK does neither activate gobally
anymore, nor is the ~/.emscripten generated. This change here addresses
the new situation in a couple of ways:

- Instead of trying to silently detect everything, add a UI
(IOptionsPageWidget) that lets the user select the Emscripten SDK root.
- Instead of parsing the ~/.emscripten file, parse the output of the
emsdk_env tool to determine the toolchain environment
(ToolChain::addToEnvironment). The parsing is cached. A test for the
parsing is included.
- Instead of registering the underlying clang as compiler, register the
emcc/em++ wrapper scripts, which are (also as of recently) compatible
with Qt Creator's way of determining gcc's predefined macros and built-
in header paths.

One Emscripten SDK is registered globally in Qt Creator. When changing
that, the previous Emscripten toolchains are removed, the new ones are
registered and the kit are "fixed" to use those.

On startup, an InfoBar entry is shown if Qt for Webassembly kits exist
and no Emscripten toolchains are present. That's the case for first-time
use after installing Qt for Webassembly via Qt SDK installer. The
InfoBar entry opens up the IOptionsPageWidget.

Qt 5.15.0 for WebAssembly and Emscripten SDK 1.39.0 are the minimum
supported versions. The new UI will show warnings accordingly.

Task-number: QTCREATORBUG-24811
Fixes: QTCREATORBUG-24822
Fixes: QTCREATORBUG-24814
Fixes: QTCREATORBUG-23741
Fixes: QTCREATORBUG-23561
Fixes: QTCREATORBUG-23160
Fixes: QTCREATORBUG-23126
Change-Id: I017c61586b17e815bb20a90e3f305a6bf705da36
Reviewed-by: hjk <hjk@qt.io>
2020-11-16 07:39:20 +00:00
Orgad Shaneh
783a06b2ee ProjectExplorer: Add a user controlled tooltip to build configuration
Change-Id: I16b95f01273e9be4ebcbcaacd87c6afe4e4bda46
Reviewed-by: hjk <hjk@qt.io>
2020-11-16 07:12:36 +00:00
David Schulz
b49a9c2d8b Editor: update KSyntaxHighlighting to v5.75.0
Change-Id: Ibef1526fccf52920d0d557c8b8f3a52bec5550f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-16 06:40:26 +00:00
Christian Stenger
1eb0b02ce9 QmlProfiler: Fix flamegraph test
Change-Id: I27d7067a844e614334a5faedcb2915b3a24ae5e0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-11-16 05:29:50 +00:00
Christian Stenger
dbe280cd14 Doc: Mention re-running failed tests
Change-Id: Ief2b7ebbee89a23b77259f65207d641af3ed2623
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-11-16 05:29:36 +00:00
David Schulz
7e10d6d7b5 LanguageClient: remove unused function
Change-Id: If931e1e6d2e28eddb599faefda2590324ff0801b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-16 05:29:34 +00:00
Thomas Hartmann
ef01956c7c QmlDesigner: Rename method
Change-Id: I43e85703b8a09c33a0685487a42ae333439d9beb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-13 20:10:06 +00:00
Cristian Adam
c038abb0ab CMake Build: Fix problems with PCH and super repo
Make sure that every project will have its own precompile headers
sets.

This fixes problems with MSVC.

Change-Id: I37d58c9652f679545283907e7cad70cd579911a8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-13 18:48:18 +00:00
Eike Ziller
381c5656e7 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/mesonprojectmanager/project/mesonprojectparser.h

Change-Id: Id38d20ce20981dcdc322fe5d1d7647f4bec89d8a
2020-11-13 16:03:26 +01:00
Eike Ziller
b0d72fa952 Update change log for 4.14
Change-Id: I03a687bc3bca45f74ea0c46c54a63a8bf535554c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-11-13 15:00:53 +00:00
Eike Ziller
da78629153 cmake build: Use CMAKE_INSTALL_NAME_TOOL instead of hardcoding
Amends 98db9774f2

Change-Id: I4aaaddcfc0e5cc31bb0646a3a3ccc18ee2fa5ff1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-13 14:20:17 +00:00
hjk
7a2e49435c ProjectExplorer: Remove ClangClToolChain::m_clangPath
Use the ToolChain::compilerCommand() instead, which now does not
need to be virtual anymore.

Change-Id: I7cf7a623f86b7faacadae424dcbde8b9dbe8d3a9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-13 12:50:43 +00:00
Christian Kandeler
3cd2e2c445 CppEditor: Improve "definition from declaration" for templates
- Make sure the template parameters are included in the definition.
- Find the correct insertion location when using an already-defined
  template member function as an anchor.

Fixes: QTCREATORBUG-24848
Change-Id: I1272ba36403904e7aed81bcef48745793c5e2217
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-13 12:49:51 +00:00
Jarek Kobus
ccf1d17bfe Silence the warning about missing initializer for member
Silence the following warning:

warning: missing initializer for member
‘clang::tooling::IncludeStyle::IncludeCategory::SortPriority’
[-Wmissing-field-initializers]
  118 |     style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200}};

According to the docs of IncludeCategories, the SortPriority field
is optional, and when not set its value is set to the value of
Priority field. So in order to fix the warning we repeat the same
value for SortPriority field.

In addition we ensure that we require at least clang version 10.0.0.

Change-Id: I8baae7a33ad1a7a7f3afe66779f482b29a7396b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-13 12:11:41 +00:00
hjk
c60c642fe5 ProjectExplorer: Consolidate *ToolChain::compilerCommand() implementations
All ToolChains had an compiler command member one way or the other, so have
one in the base class and drop all others.

ClangClToolChain is quirky insofar as it diverts the compilerCommand()
to the additional m_clangPath member. This is left for a later patch.

Change-Id: Ic8b5da17a4b7050966d0c37573edb0706fac2ecf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-13 11:25:25 +00:00
Jarek Kobus
7a14e38b7e Explilitly ignore the return value of QTranslator::load()
Otherwise we are getting warning about unused return type
of function marked with [[nodiscard]].

Change-Id: I07b464cc641ff1b6e36a0c84115deed1701e40d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-13 11:07:13 +00:00
Jarek Kobus
1fd7e9b242 Get rid of setting deprecated attributes in Qt 6
Setting AA_EnableHighDpiScaling and AA_UseHighDpiPixmaps
attributes does nothing in Qt 6.

Change-Id: I1744604f34294d809c594c66ef86b610ed6efb16
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-13 11:07:07 +00:00
Eike Ziller
98db9774f2 cmake build: Do not copy whole app bundle directory when installing
CMake just copies the whole app bundle directory when installing a
target, but we copy various things there that should not be part of the
installation, like static libraries, executables with SKIP_INSTALL,
Clang resources, and potentially .dSYM bundles.

Fixes: QTCREATORBUG-24021
Change-Id: I98bb466b664d2d6d203f3adc20d8345d9b3ce3cc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-13 11:04:32 +00:00
Jarek Kobus
11ce7e1206 Silence the warning about comparing type with different signedness
Silence the warning:
warning: comparison of integer expressions of different signedness:
‘const long long unsigned int’ and ‘const long long int’ [-Wsign-compare]

Change-Id: I3e0ace4a9aa354f9c8b30814265e9d7516fbdc7d
Reviewed-by: hjk <hjk@qt.io>
2020-11-13 10:17:31 +00:00
Jarek Kobus
976a72a5d9 Fix connection warnings on startup with Qt 6
Qt 6 removed the overload for
QComboBox::currentIndexChanged(const QString &).
Fix the following warnings on startup:

qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName:
No matching signal for on_easingExtremesComboBox_currentIndexChanged(QString)

qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName:
No matching signal for on_easingShapeComboBox_currentIndexChanged(QString)

Change-Id: Iebfe727ca5c5105e1c6faf61284e3e0f6371da83
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-13 10:17:16 +00:00
Jarek Kobus
37ccef9a0f Silence warnings about unused arguments
Silence warnings when QUICK3D_MODULE is not defined.

Change-Id: I4974ce04e2d6185764d91767461e038eac59d90a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-13 09:14:01 +00:00
Jarek Kobus
fdef05c96e Get rid of compiler warning
Silence the warning:
type qualifiers ignored on cast result type [-Wignored-qualifiers].

Change-Id: I3d02a1b71b6cece6d4fcfe209ef37cdf5556afba
Reviewed-by: hjk <hjk@qt.io>
2020-11-13 08:21:51 +00:00
Thomas Hartmann
fb9fb01e34 QmlDesigner: Collect events for telemetry plugin
For each action/event we want to track we
emit QmlDesignerPlugin::usageStatisticsNotifier() with an identifer.

This allows counting how many states, transitions, timelines were created
and we track every registered action.

More 'trace points' can be added later.

Change-Id: Ibb31e1b7e20d984a10697e05bb4417e7ad1b8980
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-13 05:38:20 +00:00
Alessandro Portale
d30d0e05d8 MesonProjectManager: Add .qrc file to the Qbs project
Fixes the error message:
Could not load image:  ":/mesonproject/icons/meson_bw_logo.png"

Change-Id: I41487f827cda9885b525b658117ff04eefb503e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-12 18:41:10 +00:00
Eike Ziller
093d5f5ab1 Build in release mode on GitHub
Add option to build scripts to override build type, so it can be
freely chosen.
Build in release mode on GitHub - RelWithDebInfo was too big.

Amends b1640074e3

Change-Id: Ibba6e60d4e9b2eee24e789bfd28bddffb1e782f6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-12 16:22:19 +00:00
Thomas Hartmann
49230c2122 QmlDesigner: Do not setup imports when checking
Change-Id: I4b3aabeb3384b25918ad9eac84fc44f1679da7a6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-12 15:58:28 +00:00
Thomas Hartmann
c9c56c2099 QmlDesigner: Duplicate state in transaction
Change-Id: Ib7db0b82f17edc77adfa91869ac9333f9a6be679
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-12 15:49:46 +00:00
Thomas Hartmann
98c735be6e QmlDesigner: Fix for high dpi and Qt 6
When grabbing the window  we have to clip the window using
the root item size.
Depending on the window manager the window is resized.

Another issue is that when grabbing the window offscreen
the pixel ratio is always 1.

Before we assumed that the pixel ratio of all images
is the same for the host process as for the puppet.
This is not necessarily anymore and we have to set
and forward the correct pixel ratio.

Change-Id: I36b467291ab120f825119adea4ed7db10d34266d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-12 15:15:48 +00:00
Thomas Hartmann
3d767fcfe1 QmlDesigner: Hide windows again
Change-Id: I0b22a8bbaabaf2290aa134aebd0044fd81bb5e56
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-12 15:09:31 +00:00
Thomas Hartmann
0fea7203a7 QmlDesigner.MetaInfo: Add special case for "QML.QtObject"
In Qt 6 QML.QtObject is used as typename for QtQml.QtObject.

Task-number: QDS-3117
Change-Id: Ib4b78d69781d946a7d5a3447841f20482c44ddf5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-12 15:09:24 +00:00
Orgad Shaneh
d0df1527a6 yaml-cpp: Fix/suppress MSVC warnings
* C4251: 'YAML::Binary::m_data': class 'std::vector<unsigned char,std::allocator<unsigned char>>'
  needs to have dll-interface to be used by clients of class 'YAML::Binary'
* C4275: non dll-interface class 'std::runtime_error' used as base for
  dll-interface class 'YAML::Exception'
* STL4015: The std::iterator class template (used as a base class to provide
  typedefs) is deprecated in C++17.

Change-Id: I37e32df84ee2d2946181aad790dabd0c3ed58c08
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-12 14:01:10 +00:00