Commit Graph

66461 Commits

Author SHA1 Message Date
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
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
Miikka Heikkinen
767db9a92b QmlPuppet: Disable navigator preview image creation in Qt6
This frequently crashes the puppet. Will be re-enabled once the
underlying issue QTBUG-88320 is fixed.

Task-number: QTBUG-88320
Change-Id: Ie4c1ad914e5bd62dcf3b132cea588ba6fc003bc5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-12 13:53:07 +00:00
Thomas Hartmann
d2293204d4 QmlDesigner: Use single transaction to add state
The QtQuick import has to exist.

Change-Id: I2184a6981b8307b593bddcc2feba8dee28a7eaf3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-12 13:51:05 +00:00
Christian Kandeler
dc66d30076 CPlusPlus: Support C++11 attributes also for function parameters
Fixes: QTCREATORBUG-24636
Change-Id: I9dc3d2cc6ca102b09f6b040455fa901c362dae7d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-12 13:16:34 +00:00
Christian Kandeler
80be8c2b14 QtSupport: Prefer suffixed uic
This prevents the wrong uic from getting picked up in the case where the
unsuffixed version belongs to a different Qt.

Change-Id: I3fe7b4afc25a2733c632bb0195ca7ea74666bdbf
Reviewed-by: hjk <hjk@qt.io>
2020-11-12 13:16:18 +00:00
Jarek Kobus
2b414508b7 Remove unneeded includes
Change-Id: I67fee9303509b7080e123a2a5826e200ce498ce2
Reviewed-by: hjk <hjk@qt.io>
2020-11-12 12:14:11 +00:00
Orgad Shaneh
bc9c6e23ca Debugger: Fix source mapping on Windows
Path separators should be translated to '/'.

That's probably was the intention for originally using QDir::cleanPath(),
which was removed in b7c72f8621.

Change-Id: Id7fdbc1e430b7d52da1bd7406fcfd777326bf593
Reviewed-by: hjk <hjk@qt.io>
2020-11-12 11:45:19 +00:00
Thomas Hartmann
c96e44825d QmlDesigner: Add possibleImports to benchmark
Change-Id: I84be55af408b80406d27ba6406e3b53e18b703c9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-12 11:43:24 +00:00
Mahmoud Badri
1b4ef82f28 QmlDesigner: small improvements to the paste logic
Change-Id: I256ffbe7f7eff1eb5796a368105d256d319c42bf
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-12 11:32:32 +00:00
Eike Ziller
46d2046173 Merge remote-tracking branch 'origin/4.13' into 4.14
Conflicts:
    src/shared/qbs

Change-Id: If75741825f5788165f9bf2f0248e976811273b6a
2020-11-12 11:39:01 +01:00
Eike Ziller
524cad144a Add changes file for 4.13.3
Change-Id: I88b845af94e16951b78c23668ba3eba07da594a7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
v4.13.3
2020-11-12 09:15:52 +00:00
Orgad Shaneh
1e8ed5092d Clang: Do not derive deprecated std::iterator
Reported by MSVC.

Change-Id: If89d1c41c7b52e48d01d0d4251c85de4785c73ec
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-12 08:58:26 +00:00
Tim Jenssen
b1640074e3 scripts: make release with debug info default
Change-Id: If08eeb64bfda42780f6ba9223c3394ce8daf6a6b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-11 19:23:23 +00:00
Eike Ziller
c1e850123a cmake build: Fix permissions of scripts in installation
CMake doesn't copy file permissions by default.

Fixes: QTCREATORBUG-24907
Change-Id: I3f452502de49517f72ace1a4a2696c797c95bdfa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-11 16:30:49 +00:00
Christian Kandeler
59f8bd4702 CPlusPlus: Expose "static" specifier also for function declarations
To be able to do this, the parser needs to store the decl specifier list
in FunctionDeclaratorAST objects, the same way it is done for
FunctionDefinitionAST.

Task-number: QTCREATORBUG-24894
Change-Id: I475fb08b1f14c63f3050d72dff200c1b08df5789
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-11 15:41:27 +00:00
Christian Kandeler
30c1652d10 clangbackend: Another workaround for missing libclang cursor information
Prevent identifiers in function (parameter) attributes from being
reported as the surrounding scope (e.g. a namespace), breaking
highlighting and outline.

Fixes: QTCREATORBUG-24650
Task-number: QTCREATORBUG-24636
Change-Id: I1a6694e3b9a96cbb0181d137ee2bb8294c4172b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-11 15:40:51 +00:00
hjk
ba2262a870 ProjectExplorer: Consolidate *ToolChain::target() implementations
All ToolChains had an Abi member one way or the other, so have
one in the base class and drop all others.

Change-Id: Ic4ed47b77f51c2c53d5692c66e6103c6bb23277e
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-11 15:40:34 +00:00
Eike Ziller
1543060ffb Change Qt Creator plugin wizard to CMake
Doesn't make sense to put more qmake-based projects out there
for Qt Creator, so exchange the qmake version completely.

Also adds a README.md, which explains how to build and run a plugin,
since plugins no longer are built directly into a Qt Creator build
(which is a good thing).

Since we do not yet have a way to specify detailed build settings
from a wizard, keep the hack that the project file has a hardcoded
path to the Qt Creator development package. That way developers can
at least directly build the new plugin without fiddling with
build settings.

Fixes: QTCREATORBUG-24073
Change-Id: If6650d9e3c393ee9ac2a358923dfb072ec510850
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-11 15:35:01 +00:00
Eike Ziller
c92adb199e cmake build: Map generic IMPORTED_LOCATION for Qt6 tools
There once was a time where the Qt6 build only set
IMPORTED_LOCATION_<CONFIG> but nowadays it also sets
IMPORTED_LOCATION. Use the latter to make it work with both debug
and release builds of Qt6.

Change-Id: Ic8b14209cb97b47eb6136e23390045e115a12ac0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-11 15:34:43 +00:00
Eike Ziller
fd6fe3f4e6 cmake build: Remove branding from target names
Targets are never branded

Change-Id: If7f23ac005b5492d52f87ba71789e674bb077a00
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-11 15:21:13 +00:00
Orgad Shaneh
b7d35fee82 Clang: Fix MSVC warning
C4273: 'OutputDebugStringW': inconsistent dll linkage

Change-Id: Iee29998801f2cbc821acdfdfa919e74709e3383b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-11 13:42:06 +00:00
Marco Bubke
2d561f8603 QmlDesigner: Add notification blocker
Change-Id: I9609437a7190f92cc208d56cff57c5b35ef57beb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-11 13:14:57 +00:00
Marco Bubke
bed1c073db QmlDesigner: Simplify notifier
Change-Id: I6542596729e025210447ab93aaef44ed103d9982
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-11 13:14:42 +00:00
Eike Ziller
6d7e5eb8d1 Fix CppProjectUpdater cancelAndWaitForFinished
The code was pushing an additional QFutureInterface through the whole
chain of functions, which was used for canceling. But since it was never
started (and never finished, and never used for reporting results),
calling waitForFinshed on it never had any effect with Qt5 and locks up
with Qt6.

Instead of using a separate QFutureInterface, use the actual QFuture
that is available and intended for it.

Fixes: QTCREATORBUG-24902
Change-Id: I5a49bcecc9cf70fbffa93aee4293004f9369df58
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-11 12:49:33 +00:00
Jarek Kobus
557a09ba4c Don't pass explicitly the QFutureInterface into Utils::runAsync
Don't pass the QFutureInterface by lambda capture to the lambda.
Instead, define additional argument to the lambda. The
QFutureInterface will be instantiated by the runAsync itself.

Change-Id: Id3a12f306e91f76239134312bb46f7d8aefd03a4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-11 11:42:17 +00:00
Johanna Vanhatapio
450f417c0b Doc: Update Using 3D Components
Task-number: QDS-3087
Change-Id: I24d186bed1f5af475c9f641eab323df06e14b3bd
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-11-11 11:41:58 +00:00
Christian Kandeler
48ebaecb52 ProjectExplorer: Set unique build directory
... after cloning a build configuration.
It's very unlikely that the user intends to re-use the same build
directory in the new build configuration.

Fixes: QTCREATORBUG-24831
Change-Id: I39b7839225e973fea4e16b9b686fbbf9207cb5ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-11 10:46:22 +00:00