Commit Graph

46099 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
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
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
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
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
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
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
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
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
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
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
Orgad Shaneh
9c6df2f832 Fix implicit size_t -> int MSVC warnings
Change-Id: I2f224c942c52a172788e917641420e8380c54859
Reviewed-by: hjk <hjk@qt.io>
2020-11-11 10:42:07 +00:00
Alessandro Portale
61622d305c ProjectExplorer: De-#ifdef code in ToolChainManager::aboutToShutdown
Change-Id: I920bb1b6cfd563be34f6df40f26f6531772f0f0d
Reviewed-by: hjk <hjk@qt.io>
2020-11-11 08:45:39 +00:00
Assam Boudjelthia
9d5ab6ef4b Android: show image type for each android version in New AVD dialog
If the user has multiple installed system-images for the same type of
device and same Android version, it might become confusing to know what
to choose.

Change-Id: I9be7f55731448efb47a6ab79e45f7f1717ade3eb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-11 07:50:36 +00:00
Christian Kandeler
f7399d520e QtSupport: Do not prefer Qt4's uic unconditionally
A Linux distribution with Qt4 and Qt5 installed will typically have uic
and uic-qt4 present in the same directory. Our code always preferred
uic-qt4, even for Qt5, leading to potentially invalid code in the
generated ui header file.

Fixes: QTCREATORBUG-17739
Change-Id: Icf509de4e2fbee1d51fd049a8cf5a27d1ac5190b
Reviewed-by: hjk <hjk@qt.io>
2020-11-10 15:21:35 +00:00
Marco Bubke
2a2dfbec73 QmlDesigner: Add states to ImageCache
Task-number: QDS-2998
Change-Id: I8e65881181ae1010ef1f8bab92fa71d92c961bcd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:35:12 +00:00
Marco Bubke
c3aad50184 QmlDesigner: Add waitForFinished to ImageCache
Task-number: QDS-2998
Change-Id: I5ffb63b7345a17ccb499db876bb4dbb0a946ed85
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:32:30 +00:00
hjk
2bfd515b03 Utils: Allow BaseTreeView users to hide columns manually
... using a context menu on the header views.

Use the feature in the debugger views where it was previously
un-intuitively available as part of the main context menu of
the view, but not in the header.

Task-number: QTCREATORBUG-24384
Change-Id: I3f030c3dd8ce35dc91bad921e37d2273bfe548b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-10 14:28:39 +00:00
Eike Ziller
1d2b5db02f Merge remote-tracking branch 'origin/4.14'
Change-Id: I2ae0eb18782224e48cd20d41907f9dfea6ee1771
2020-11-10 13:42:46 +01:00
hjk
0eb65f7211 ProjectExplorer: Set focus to TargetSetupPage when shown
This ensures the "Configure Project" button can be activated
with <Return>

Fixes: QTCREATORBUG-20720
Change-Id: Ib20848cf2b4a1a2fcd33f9652a9a09796fd85c54
(cherry picked from commit b1d3eee42d)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-10 12:31:47 +00:00
hjk
913490a4e4 ProjectExplorer: Add shortcut to "Configure Project"
Note that this does not work with 'Return' immediately, as the focus
is usually on the left tree view in that situation. <Tab>, <Return>
work.

We can try to switch the focus by default in a separate patch if
that is wanted.

Task-number: QTCREATORBUG-20720
Change-Id: Iefbf7f2c1493947b847fd9c89e86b4de56a65543
(cherry picked from commit 08f3696f21)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-10 12:31:26 +00:00
hjk
289a18f56f FakeVim: Change shortcuts from Alt-V,X to Alt-Y,X
Alt-V is taken by the Views menu nowadays.

Also, fix the instruction to quit FakeVim on Mac.

Fixes: QTCREATORBUG-24694
Change-Id: I5268760f45e34f973b3b38b19d2577c0c655b000
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-10 12:29:14 +00:00
hjk
eb45b8f9b9 Avoid more uses of non-explicit QChar(int) constructor
Will be gone in Qt6.

Task-number: QTCREATORBUG-24098
Change-Id: Id76b15bb11879b2e8ff0f71af45acbfb1720f763
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-10 12:27:36 +00:00
Eike Ziller
8f4a9d8e9b litehtml: Add method for retrieving current html content
For squish testing.

Fixes: QTCREATORBUG-24903
Change-Id: Id9b21c6be306db9b3ed0e70c23923f39fae2d210
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-11-10 10:34:19 +00:00
hjk
2ecfda056b QbsProjectManager: Use a SelectionAspect to switch Debug and Release
Change-Id: I4beaf0a6456d57871dcf65832f0a79f37fe5fddc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-10 09:36:52 +00:00
hjk
13c68e0c73 ProjectExplorer: Remove unused MsvcToolChain::setAbi() function
Change-Id: I72c86bea57df32d7a5de0e8da16999c331685c15
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-10 09:22:11 +00:00
Christian Kandeler
ad48f2639c ProjectExplorer: Consider build environment
... in "Open Terminal Here" action in the build configuration.

Change-Id: I0b1b15d4f1097cf48eb5a977f2ca5951b2f78377
Reviewed-by: hjk <hjk@qt.io>
2020-11-10 09:01:48 +00:00
Eike Ziller
6813d14872 Fix build against Qt6 with GCC 7 / Linux
Add some missing includes for otherwise incomplete types.
Make LanguageServerProtocol::JsonObject's iterators and end() methods
public. Otherwise QMetaType fails for
LanguageServerProtocol::ServerCapabilities which is used in a signal
from LanguageClient.

Task-number: QTCREATORBUG-24098
Change-Id: Id7f8a4146afb927a8589fadaefe42f7fbca45dd3
Reviewed-by: hjk <hjk@qt.io>
2020-11-10 08:25:46 +00:00
Orgad Shaneh
3122a1bfc5 Aspects: Remove some more default values
Change-Id: Iadee8b8f1eeb3ff009a667d45a51f6f5a94329ca
Reviewed-by: hjk <hjk@qt.io>
2020-11-10 08:06:51 +00:00
Tim Jenssen
6edf6e4dc1 qmldesigner: add missing includes
Change-Id: I3f8ebb842e857525f444d950e5886a8cd3c0320c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-09 21:10:51 +00:00
Henning Gruendl
f66e2f508f QmlDesigner: Fix navigator selection issue
* Fix navigator selection issue caused by clicking on icon columns of
  a locked item
* Fix visibility icon in icon font
* Remove redundant selection behavior call

Change-Id: I03c97b22d92bcf0760b2b9ec627609624a0b3695
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-09 19:37:58 +00:00
Aleksei German
d4653175e4 QmlDesigner: Return Annotation context menu action
Addition to QDS-2970

Change-Id: I92834e047ba76c2cfbfb0f6a10cbd7618cb0dbe7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-09 17:23:29 +00:00
Jarek Kobus
4c7032fb1e Make CppProjectUdpater a final class
Silence the warning:
"Call to virtual method 'CppProjectUdpater::cancel'
during destruction bypasses virtual dispatch".
CppProjectUpdater's d'tor calls cancelAndWaitForFinished(), and
the latter calls in turn virtual cancel() method.
As long as we don't have subclasses of CppProjectUdpater,
calling a virtual cancel() from the d'tor should be safe.

Change-Id: If2ebe6a190649319401d4e4b0f6977f547c51dac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-09 15:25:13 +00:00
Mahmoud Badri
91ad88205a Optimize checking keyframes in clipboard
Old implementation is expensive (~200ms) and this method is called
frequently. Also prevent pasting keyframes in the FormEditor.

Change-Id: Id083b553231893be31c7aab1d0da1809529316c8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-09 15:08:57 +00:00
Eike Ziller
6514e1b866 Fix lupdate issues
Change-Id: I1971f74a54e4afe2d106c105f6b38f415bef488f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-11-09 14:55:56 +00:00