Commit Graph

66382 Commits

Author SHA1 Message Date
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
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
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
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
Orgad Shaneh
203a3138b6 Utils: Replace use of deprecated result_of_t
Fixes MSVC warnings.

Change-Id: Id9b44c211a29e2bc1776a8d341a16b5bb2e8d75e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-11 10:45:14 +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
Marco Bubke
6fc3f65ce0 Sqlite: Add swap for ConstIterator
Otherwise we get an recursion.

Change-Id: Ia8dfcbeae30b25d9d347404ae85b852c4c11c921
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-11 08:42:16 +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
Eike Ziller
9d38e22a9f cmake build: Copy/install correct branding file
When changing branding, we need to copy and install that different
branding file instead of the standard one.

Change-Id: I3a2f8391b5e5ed1c4c79b81294ed6221df5e7ddc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-10 15:52:21 +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
d1d95e78d6 UnitTests: Fix double deletion
Change-Id: Id28f739a3f6b0c200386edf67914886ae06e2999
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:41:54 +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
2ee63af4cd UnitTests: Setup an environment for every test run
So there are no old file an temporary file.

Change-Id: Ida22703b5842b094f9a0f26562cd0908542e044f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:34:18 +00:00
Marco Bubke
f90bc7fa37 QmlDesigner: Improving SessionChangeSets
Task-number: QDS-2998
Change-Id: I9b559bf593dd968172649d1f6c45fb9fb454f1a5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:32:39 +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
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
8edae33b42 macOS: Fix deployment of QML2 imports
Amends e101e83f84

Change-Id: I43ee85d9e0c144ec9a25d811d17604c91e709cd8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-10 12:08:06 +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
Eike Ziller
5dff6434e5 Move translations README to markdown and adapt for CMake
Change-Id: I7c66afbd8cf84ec9cfe9bfe22e8cacf47d9f2bf8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-11-10 10:33:50 +00:00
Eike Ziller
88498101a0 Build scripts: Fix path format for cmake calls
Make sure to pass posix style paths to CMAKE_PREFIX_PATH,
CMAKE_MODULE_PATH and CMAKE_INSTALL_PREFIX. Otherwise this can lead to
funny "Unknown control sequence \U" kind of errors.

Follow-up of fceaff1a6f

Change-Id: I1c8445f9c298a17115bca6b42f099a99e33d6de2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-10 09:50:23 +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
Leena Miettinen
ac6bfd0620 Doc: Fix changed IncrediBuild settings accordingly
Change-Id: Ie704bea887bf77461be07f7332087e2413134e09
Reviewed-by: hjk <hjk@qt.io>
2020-11-10 07:37:18 +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
Tim Jenssen
fceaff1a6f cmake expects forward slashes here - even on windows
Change-Id: Ia31727b703745e01d6def91237a0bc46ea37261a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-09 17:35:51 +00:00