Commit Graph

59385 Commits

Author SHA1 Message Date
hjk
19e1cf1520 Replace uses of qVariantFromValue with QVariant::fromValue
Deprecated in Qt 5.14, alternative has been around since Qt 4 at least.

Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 12:33:29 +00:00
hjk
f7d224bf58 Utils: Remove now-unused FileName::appendPath()
Change-Id: I9d429a1f60930e27e3926e1242114bed3485f000
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 12:22:08 +00:00
Tobias Hunger
feb9d578c5 CMake: Do not build .pri-file
Change-Id: Ife5889ad9475769028c898fd298e737aeab08d79
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 12:20:08 +00:00
Tobias Hunger
47f8fb0600 Translations: Fix generation of directory list to translate
Change-Id: Ib010fa74495a98eddce333d74e447bca9db34afc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 12:12:23 +00:00
Christian Kandeler
b1274d4b9c ProjectExplorer: Tighten the pattern for possible compiler file names
A number of tools were matched that weren't compilers.
Examples:
    - arm-none-eabi-gcc-ar (also: -nm, -ranlib, ...)
    - git-clang-format

Fixes: QTCREATORBUG-22439
Change-Id: Ic598daebb6cfd534690145a0446649a8906aff5d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 11:41:33 +00:00
Christian Stenger
411678048d CMake: Set the correct build system target to the project part
The internal build target key had changed again. Adapt and use
a more error proof pattern to be hopefully safe if it may
change again.
The wrong build target key led inside the AutoTest plugin to a
wrong comparison of build target of the project parts vs. the
build target of the run configuration which in turn ended up
in always deducing the run configuration for the test runner.

Change-Id: I32df578df85cc0206c2b8fdac00acc3a798f0d73
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 11:35:52 +00:00
Christian Stenger
84b34a41e7 Wizard: Make the default generated template runnable
If one uses the Python - Window template and does not explicitly
change the custom base class to an existing the generated project
lacks some essential stuff.
Make the generated main file usable even for first time users.

Change-Id: I898189fd4edff88f13987d6d1df9f77e2ef6bd68
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-05-27 11:35:37 +00:00
Christian Kandeler
f6ac2c8e75 ProjectExplorer: Improve "same file" detection for toolchains
Only use the file size heuristic on Windows, as it actually helps us
filter out duplicates there.
On Unix, there is no such compensation for the risk of false positives.
For instance, on my Linux machine, i686-w64-mingw32-gcc and x86_64-w64-
mingw32-gcc have the same file size, but they are not the same file.

Change-Id: I427d2ff36a33ffb045c71851c91312e129616f69
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 10:08:38 +00:00
Christian Kandeler
f3338b2dc8 ProjectExplorer: Abort file removal if the project changes in between
This is not a limitation in practice, as the condition is very hard to
trigger.

Change-Id: Ibe89fbca6e789c61b896f1aac7a55958567cddb9
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 09:49:49 +00:00
hjk
2ac89cba92 ProjectExplorer: Use an alias for QList<Abi>
Change-Id: I69231c5974620ae30296bfc4e0ab41c900d95a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:35:53 +00:00
Christian Kandeler
98c4994c38 ProjectExplorer: Fix removal of file that occurs more than once
The observable problem:
    - Create a qmake SUBDIRS project with e.g. two apps, or something
      corresponding to that in a different build system.
    - Add the same file to both sub-projects.
    - Click on the file node for that file in the *second* sub-project
      and select "Remove".
    - Watch the file disappear from the *first* sub-project.

The underlying problem:
    - Before the file is removed, there is a dialog asking the user
      for confirmation.
    - Afterwards, the code checks whether the currently selected node in
      the project tree is still the one that was selected before.
    - If it's not, then the node for that file path is re-retrieved from
      the tree.
    - However, after the dialog ran, there is no current node anymore,
      presumably because the focus was taken away from the tree widget.
    - As a result, the node we continue to work on is always the one
      from the first sub-project, no matter which one the original
      node belonged to.

The fix:
    - Keep working with the original node if it's still in the tree.

Change-Id: I6c76ed96db9f55edbc7626c4ea99f166736707b8
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 09:21:52 +00:00
hjk
7e2992453e Android: Remove remaining uses of FileName::appendPath()
Change-Id: I33fb650f357d93d177e5977b21b14b42894f571a
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-05-27 09:10:56 +00:00
hjk
dc9cbd8f57 More FileName::appendPath() -> .pathAppended() changes
Change-Id: Ibc7eb4eb3ffb64658e441aafa240b1ddc0061930
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 09:10:19 +00:00
hjk
061896a148 ProjectExplorer: Add an official way to connect aspects
Aspects are not completely orthogonal, e.g. working directory
depends usually on environment etc. So far handling this used
ad-hoc set up in the (Run)Configuration constructor. Lets make
this an official second phase, that also reduces the need to
use a specific construction order of aspects.

Change-Id: Ic98b7d4e1ac9d46a32ec624bbbbfbbc32a40ab32
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:04:07 +00:00
Christian Kandeler
a9d6de5702 Core: Fix typo in OutputWindow
Change-Id: I61d091f24bb75412563085b777fb6661ef255c38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 08:41:42 +00:00
Christian Kandeler
a1dab694bb ProjectExplorer: Fix remove button state in toolchain widget
The non-deletable toolchains are the ones coming from the SDK.
Amends 3969a007c2.

Change-Id: I9586e2311378417c72c2eb6b55e6d5e29c65fba3
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 08:26:36 +00:00
Christian Kandeler
e59bcd9962 ProjectExplorer: Add a "product" tag to the ProjectNode class
A product is a project node from which a target binary is produced, such
as a Product item in qbs or a .pro file in qmake.

Change-Id: I6a0e6bed6c02684cb03b2b18fed6a1b493fa78b2
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 08:25:57 +00:00
hjk
a889669369 iOS: Use base IDevice::clone() instead of local toMap/fromMap
Some non-persistent data is handled in the base.

Change-Id: I5f6c5429b88178115bf26f885b80fa3daebf227e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 08:19:27 +00:00
hjk
967f20ab89 ProjectExplorer: Copy non-persistent IDevice members when cloning
Amends 555360c.

Change-Id: I0450366eb0936baa665572f63e45c35f4a18eb28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 08:19:12 +00:00
Orgad Shaneh
24c0fc7ea1 Qnx: Delete unneeded qnxdevicefactory.*
Change-Id: Iccac8e70683b80c7e0df287109d90700aecb36f1
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 06:50:23 +00:00
Orgad Shaneh
1e138fbe10 Remove excess blank lines after namespace
Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 06:50:16 +00:00
Christian Kandeler
b70d39a091 RemoteLinux: Let user specify the rsync flags
Task-number: QTCREATORBUG-22352
Change-Id: I11c16b5f7c58093bb89a9493a8742f338dbdd9c1
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 16:37:44 +00:00
hjk
f8e21037e3 Qbs: Move environment cache from runconfiguration to project
Change-Id: I2a987e55cde133931bb4578506bb26666eece601
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-24 14:05:21 +00:00
Eike Ziller
d492d14a92 CMake build/macOS: Add iostool
Task-number: QTCREATORBUG-22475
Change-Id: Ifd9a9dc1483d223c446fd25a45e3cd1778bc94d1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 13:15:19 +00:00
Eike Ziller
52d48c75ae CMake build/macOS: Centrally detect system libraries
And realize that at most places (except native help viewer) the code
using them is not optional on macOS.

Change-Id: I308406a0e8f176dad4151d23a33cd3fc0fb8635c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 13:04:15 +00:00
Orgad Shaneh
c4071d09ad Variant: Prepare for C++17 support
Change-Id: I8f96ce3afae050d4e58e7fe9b70a92155045b71b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-24 12:16:38 +00:00
Christian Kandeler
2439cfcbdb ProjectExplorer: Move filtering infrastructure up
... from AppOutputPane to IOutputPane. We want to have filtering in
other output panes too.

Change-Id: I805ec68baedf491b71d392c3370dee78ed4ab76c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-24 10:54:37 +00:00
Christian Kandeler
a9d2e14dca ProjectExplorer: Add executable() accessor to RunConfiguration
Amends f6c276daf0, which was a quick fix for 4.9.

Change-Id: I94281af6a9a0d0bfe197ce836488f708d5bd677d
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 09:12:42 +00:00
Christian Kandeler
b7755b18c3 RemoteLinux: Add explanatory message on MakeInstallStep failure
... for the case of a cmake project without an install target.

Change-Id: I599a10bc0683706dc7ced1e46e0adcdb9a44d6b7
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 09:11:10 +00:00
Christian Kandeler
6fa474ead8 Fix "open terminal with environment" functionality
... for RemoteLinux. We now open a *remote* terminal, as we should.

Change-Id: I84f73bbfcb6132717a30f5ef7c8d9d56d854a609
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 09:10:39 +00:00
Christian Kandeler
0a555018d1 SSH: Pass remote command as QString
The old implementation sent the command over the wire as-is, so we
declared it as a QByteArray and let the caller choose the encoding. This
doesn't make sense anymore, as the command is now passed to an external
process as a QString anyway.

Change-Id: Ib84bc0f871db2b45b93f71d924c4177cc28d3bb0
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 09:08:49 +00:00
Cristian Adam
be0d7aa3e9 CMake build: Use add_qtc_depends for all add_qtc_* functions
Also added current source directory as public include directory.

Change-Id: I6a23e02b84be3fc5f29ac33ef8ccd7d70a48f494
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-24 08:25:10 +00:00
Orgad Shaneh
69b3e34bdc ProParser: Fix inconsistent copy ctor/operator=
Detected by GCC9.

Change-Id: Iff80e2b55e490dc1d16ae2ac000b761ad94c1297
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-05-24 07:45:40 +00:00
hjk
274bbefeff iOS: Remove remaining FileName::appendPath uses
Change-Id: Ia550151bbcad696a3bd59e630e80a8f89a908e08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-24 07:32:17 +00:00
Christian Stenger
389fd37a68 AutoTest: Improve handling unexpected output
If tests prints out non-XML data to stdout the XML parser gets
nuts and refuses to handle the result.
Ignore unexpected output as it will be printed out on the
command line view anyhow.

Task-number: QTCREATORBUG-22354
Change-Id: I96f453fadd834d21572080857c86d25b2d6f6aa9
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-24 07:27:08 +00:00
Eike Ziller
d987c3ba67 CMake build: Read QTC_BUILD_PLUGIN_${NAME} environment as default
for BUILD_PLUGIN_${NAME}. This is only used as the default for the CMake
cache, so only if you haven't run CMake before.
The disadvantage is that just changing the environment variable after
the fact will not change anything.
The advantage is that the CMake cache keeps reflecting the actual state,
which is great for ccmake, the UI in Qt Creator, and other configuration
tools.

Change-Id: I25448270c29afa31d240072f58f981b8776597f2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 07:13:43 +00:00
Eike Ziller
25adc78f6d CMake build/macOS: Generate app and project icons
Fixes: QTCREATORBUG-22473
Change-Id: Ice1d01569e320cac51a741e911a08a036702bc31
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 07:13:10 +00:00
Christian Stenger
675ac662e9 Wizard: Fix AutoTest wizard for Boost with CMake
While at it use the same environment variable used for
Qmake or Qbs based project.

Change-Id: Ieefb4e1da4ce4155863b80a1b275b67e664273c6
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-24 06:58:41 +00:00
hjk
7418c4f1ee Debugger: Adapt to new qt_v4StackTraceFromEngine helper function
Change-Id: I3d3dbd837e1b73117524e286ae4ea09e652e4a5c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-05-24 06:45:08 +00:00
Christian Stenger
b86c05b96a AutoTest: Add unit test for parsing boost tests
To execute them you need - beside the former prerequisites -
either have boost installed installed at system level (UNIX)
or you must specify BOOST_INCLUDE_DIR as environment variable
otherwise the respective test will be skipped.

Change-Id: I6bd8472e554132ab05e58b56e3ccbd5e9dffada9
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-24 06:27:22 +00:00
Christian Stenger
5c6eb0a2ba AutoTest: Further adaption following official terms
GoogleTest started using the term Test Suite for grouping
related tests and Test Case for general tests.
This patch adapts the visual strings as well as some
internal API which used the same terms.
This completes 6189745a3b.

Change-Id: I0307c10b8b5f8574f31a68ee4320732f3e829532
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-24 06:24:44 +00:00
Eike Ziller
d8ab335e51 CMake build: Add new files in compilation database plugin
Change-Id: I4d83d77e70a99d8e9fb76e09fa95a70f24e4162f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-23 14:32:01 +00:00
Tobias Hunger
784fdb506d Clangbackend: Remove useless default constructor
Not all members can be default constructed, so neither can this class.

Change-Id: I6e3593bdbb9905bc4fb39aaf7cc290e30dda8300
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-05-23 13:14:45 +00:00
Tobias Hunger
73b5cede73 Translations: Remove translation for Qt Quick wizards
These wizards no longer exist.

Change-Id: I053a90eb9d61df6d6e6f11311d460e10c4f39c1c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-23 13:14:22 +00:00
Tobias Hunger
6352e3c27d Translations: Remove translations for qml wizards
We have no such wizards anymore.

Change-Id: I220ae873d4cb3694a843dfcf4035f167628ac542
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-23 13:14:12 +00:00
Tobias Hunger
3051fd2b2d Translations: Do not translate *.mimetypes.xml files
There are no such files anymore.

Change-Id: I9e5a744f3cb5d5bc8000fc5c8da202302fff50d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-23 13:14:00 +00:00
Christian Kandeler
39ffd00744 CompilationDbProjectmanager: Fix build for older compilers
Change-Id: Ie84e5d06b672a335c68528fb1acf4b7492d998cd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-23 12:45:22 +00:00
Christian Stenger
3fe4e5448d AutoTest: Update unit test projects
Replaced deprecated API by nowadays recommended code.
Add missing include.

Change-Id: I4012ea3ada02cd874fe534ae45d6a1c37ccbdbc7
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-23 12:21:07 +00:00
Christian Stenger
561d857c35 AutoTest: Improve options and environment variable handling
Filter out all interfering options and environment variables when
running tests.

Task-number: QTCREATORBUG-21169
Change-Id: I0cac36907d79aa74ac96873f868eb7a7a3666794
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-23 12:20:52 +00:00
Christian Stenger
d1e00284a8 AutoTest: Rename internally used struct
Change-Id: Ibf6d1f11c8d4cf77b44aded3aae212b84b492bcb
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-23 12:20:27 +00:00