Commit Graph

67787 Commits

Author SHA1 Message Date
Cristian Adam
a81b6b623e CMake Build: Update CMake minimum Version to 3.10
This is due to policy CMP0071 which affects AUTOMOC and
generated files.

With CMP0071 set to OLD (CMake 3.9) precompiled headers
would fail to work with GCC.

GCC and precompiled headers would still require the upcoming
3.18 CMake, but having CMP0071 set to NEW (CMake 3.10) is
a prerequisite.

Change-Id: I7c3c1f739877646a91ffa07e2a8006ab7d6f4d77
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-26 11:41:44 +00:00
Christian Stenger
0aa1a3ad4b Revert "JsonWizard: Fix restoreLastHistoryItem for LineEdit"
This reverts commit e3abd5b348 as it broke
updating evaluating line edits.

Change-Id: Ie729a63d6a2b87df7143aba26726b657cffb8148
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-26 09:23:09 +00:00
Christian Kandeler
949bb0e67b ClangCodeModel: Show value in tool tips, if possible
When hovering over a constant expression, it's probably helpful
to show that value to the user.
Requires clang 11 to fully work. For now, it only shows the value for
variable initializations.

Fixes: QTCREATORBUG-23967
Change-Id: I6b844231bac50993c2fa2fa82c552ad9cef590df
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 08:50:58 +00:00
Eike Ziller
227904d4a6 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ic39945a0e3e140a9467b4b4f572929257ff3a324
2020-05-26 09:00:05 +02:00
Eike Ziller
63df649655 Packaging: Get rid of binary-artifacts repository usage
We removed the cdbextension and wininterrupt binaries from there a long time
ago, and instead package these for the installer. Package newest jom version
from its actual release in the installer as well.

Task-number: QTCREATORBUG-23908
Change-Id: Ic9bdc97774cbeb894fc261e57af127d6cdc71205
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
2020-05-26 06:35:45 +00:00
Volodymyr Zibarov
bb418d2769 C++: fix cplusplus tools build with Qt 5.14
It's using QMapIterator that is disabled by default with
QT_NO_JAVA_STYLE_ITERATORS defined in cmake\QtCreatorAPIInternal.cmake.
Change to not use QMapIterator.
Another way would be to undefine QT_NO_JAVA_STYLE_ITERATORS before
including QMap, but that would not work with precompiled headers enabled

Change-Id: I26dcba64dc84b6c154f62ddd9520075b59f618b2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 05:44:31 +00:00
Volodymyr Zibarov
f82c794bfb C++: Fix paths passed to cplusplus-update-frontend on cmake build
Change-Id: I9e70d411d3944e4c7b3ae5fe722aaa2894f87602
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-26 05:44:03 +00:00
Ville Nummela
a36e031cf5 ProjectExplorer: Split deployment data using last colon on the line
The original approach does not work with absolute file paths on Windows

Change-Id: I9f284dfa7c0fe145a99e216a571d3f0eb1289f94
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-26 04:47:27 +00:00
Nikolai Kosjar
b193e3cea1 C++: Make cplusplus-update-frontend generate "nullptr"
The commit 2e14df7561 replaced some "0" by
"nullptr" on e.g. the generated ASTClone.cpp.

Running cplusplus-update-frontend reverts the changes for the generated
files again, so adapt cplusplus-update-frontend to generate "nullptr"
instead.

Change-Id: I16750da0df57692405c5b33462f1f63f05c175c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-26 04:25:36 +00:00
hjk
e71c0b7fe2 Debugger: Drop unnecessary use of ModuleNotFoundError
That's Python 3 only, and doesn't add value here.

Change-Id: I9b1702ea8b0b0ddb090fdfc393228b4430da0b07
Task-number: QTCREATORBUG-24004
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-25 23:53:47 +00:00
Eike Ziller
b3ffd8d1eb CMake build: Move documentation functions to re-usable location
Removes "install_..._docs" and "clean_docs" special targets.
Instead install documentation with "--install . --component qch_docs"
and "--install . --component html_docs" which have the advantage that
the install prefix can be specified later on with --prefix.
Also removes export of IDE_SOURCE_DIR, which is not used.

Change-Id: I4fce0b9aa8c7fc40b7e94e065777ddf4c0b76c41
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-05-25 11:31:06 +00:00
Ville Voutilainen
52188918c0 Android: add service editor to manifest editor
Task-number: QTCREATORBUG-23937
Change-Id: Iec0435721504df744ec985bd3e5cefcc0700e852
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-25 11:18:09 +00:00
hjk
14666c801a Debugger: Drop 'set print object on' for GDB
This does not seem to affect the code paths we are using through
Python.

Task-number: QTCREATORBUG-23965
Change-Id: I2e20d6d3c1937d56293e81b74c453e83a92ddc4c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-25 10:01:03 +00:00
Christian Kandeler
4ecb87f2f9 C++: Do not mis-align function arguments that are initializer lists
Fixes: QTCREATORBUG-24035
Change-Id: I93598ff64fc6fd74008c942b8755da5e481c63c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-25 09:22:30 +00:00
Christian Kandeler
d4c31cef74 C++: Fix wrong formatting
... when using a shift operator inside an initializer list.

Fixes: QTCREATORBUG-16977
Change-Id: I8992162c05345b713c665e3601ae593af5007211
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-25 08:54:47 +00:00
Eike Ziller
e7b319fbc1 Doc: Fix naming of .index files
Qt Creator Manual and Extending Qt Creator had the same project name,
and therefore the same index file name.
Also qdoc's "depends" configuration requires the index file to have
the same name as the directory.
Adapt the project names accordingly.

Change-Id: Ie1ec8ede360e19e3ffd5c7dbea44344f0a631f68
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-05-25 08:50:54 +00:00
hjk
cf91b2c033 LSP: Do not accumulate connections during signal emission
Amends cdeac76df3.

During the execution of updateProject() triggered by a fileListChanged()
emission new connections to the fileListChanged() were added, effectively
making the emit never return and gobbling up all available memory.

Change-Id: I18a1ab9b32c2e797e990449385a5353782211560
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-25 07:54:42 +00:00
Alessandro Portale
49ac9bb517 WebAssembly: Fix run configuration for Qt 5.15 app with emsdk 1.39.x
With Emscripten SDK 1.39.x, emrun quits and shuts down the web server
before the complete WebAssembly application can be fetched by the
browser.

Adding "--serve_after_close" to the emrun call restores the original
behavior. That parameter is accepted by previous Emscripten SDK versions
and seems to not change how it used behave in earlier versions.

Task-number: QTCREATORBUG-24072
Change-Id: Ie43604d42eb9c5a7cccd09fdf1c33391dc31098d
Reviewed-by: hjk <hjk@qt.io>
2020-05-25 06:32:51 +00:00
Orgad Shaneh
c25a8c0a58 Locator: Fix regression of filesystem lookup with line/column
This amends commit 40921421ae.

Change-Id: Ib546813e77395c8816758f9adb21a71f072abd49
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-05-25 02:58:59 +00:00
Nikolai Kosjar
f6210b3569 qbs build: Clang: Adapt llvm-config variants to check for
Change-Id: Ib961efe9b72acdfc383cade2053a4a1126e99132
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 13:21:44 +00:00
Assam Boudjelthia
d38a6fe1df Android: allow sdkmanager to parse all generic packages
Task-number: QTCREATORBUG-23829
Change-Id: I29bd70a6703b9537e4a884e5acc53e2e2dd020cb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-05-22 11:01:21 +00:00
Ulf Hermann
20c387f636 QmlPreview: Don't use MainFileAspect if it doesn't exist
We only need to choose the main file if we're dealing with a qmlproject.

Fixes: QTCREATORBUG-24056
Change-Id: I5b5dfa29a46fa07de7ee570fa033d978e72dfdb5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-05-22 09:28:29 +00:00
Nikolai Kosjar
0bf7bacb4f Clang: Disable a clangformat test for vanilla clang
...that requires a custom patch to work.

Change-Id: I954286f47112b660dc6ee681dac2250a9e8da0df
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 08:59:28 +00:00
hjk
036e8611eb CppTools: Fix license file path persistence
Broke with ea6da69e8.

Fixes: QTCREATORBUG-24024
Change-Id: If097c4bc824c1a6b6c005bcf32aef09229804be2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 08:49:44 +00:00
Nikolai Kosjar
aa1caac270 ClangTools: Fix referencing wrong counter for summary text
Fixes: QTCREATORBUG-23585
Change-Id: Icb3002434a728bd0d157190b7079b35bb639d0df
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 08:42:30 +00:00
Nikolai Kosjar
8df8502090 Clang: Disable a completion test for LLVM/Clang 10
For the case

  struct Foo;
  void f(Foo *foo) { foo->/*COMPLETE-HERE*/ }

no completions are expected as "Foo" is only forward declared.

This seems to be handled correctly in current LLVM/Clang master
(upcoming version 11), but wasn't with previous versions as pointless
non-member-completions were returned.

As our workaround is not applicable anymore with LLVM/Clang 10, disable
the corresponding test for that version as we cannot do anything about
it.

Change-Id: Ia02696175d0d532e16bc16a1010821b4aed20f8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-22 08:42:09 +00:00
Eike Ziller
146d3dc7e3 Bump version to 4.12.2
Change-Id: I734d8571ab672cbbccaebe6d3d1a97cd15f31831
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-22 08:13:13 +00:00
hjk
82be99a53e Utils: Rename FilePath::rawFileName to rawFilePath
Change-Id: Idf8cad2b18087f511aa1efe54adbb5a427660016
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-22 07:24:51 +00:00
Christian Kamm
40dd6fc185 QmlJS: Add workaround for missing imports in Qt >=5.15.0
The QtQuick module plugins.qmltypes in Qt 5.15.0 do not contain
QML types like QtObject. Instead, they are found in the QtQml module.

Something similar applies to QtQml and QtQml.Models and
QtQml.WorkerScript.

As Qt 5.15 can't use the "import" command in the qmldir file, this code
instead detects the 5.15 QtQuick and QtQml modules and adds the
dependent imports manually, as a workaround.

Change-Id: I982e349298eb7200372390dfc384fb43a762b253
Task-number: QTCREATORBUG-23986
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-05-21 07:54:08 +00:00
Christian Kamm
f64146741d QmlJS: Use "import" commands from qmldir files
qmldir files can have lines like "import QtQml". These were already
parsed, but not stored in LibraryInfo. Store them.

When imports are resolved in Link and a library has such an import, also
load the module it refers to, with the same version and "as" scope.

Add a test to verify the behavior works.

Change-Id: I80b260bfaa36a9e5de0849fa5632b3361077ef01
Task-number: QTCREATORBUG-23986
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-05-21 07:53:44 +00:00
Christian Kamm
338fa26bc3 QmlJS: Scan import paths, even if there is only one
Previously a single QML import path would not be scanned. This did not
usually happen to users, as there's almost always more than one path.
But it could lead to unexpected behavior in tests that explicitly
controled import paths.

Change-Id: I015f44f183ad484c333ab7a4e5e98b87098620a7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-05-21 07:53:24 +00:00
Christian Kamm
96c860159b QmlJS: Track futures to allow testing
Tests often want to wait for all async tasks to finish before
progressing.

Change-Id: I61738df730ca341b5c9d227569d961cd1991b296
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Philip Van Hoof <philip@codeminded.be>
2020-05-21 07:53:11 +00:00
Christian Kamm
037ff590e6 QmlJS: Fix loading builtin library info
The condition was always false, since projectInfoForPath always returns
an empty project member. This meant the the fallback builtins that ship
with Qt Creator were used, instead of the builtins that shipped with the
Qt version.

Change-Id: I9c3bf949d0046bcf687c913e32ddac95734f6c43
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-21 07:52:51 +00:00
Christian Stenger
6a1d678db7 Wizards: Fix typo
Amends 829faf7eef.

Change-Id: Id09b5eca3a2c6a4a90d4402383723b8a03a59594
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-20 14:37:06 +00:00
Christian Stenger
36020e3e47 Avoid qmake error when using MinGW
...or if failing to detect cdb.

Change-Id: I479e82064bfb95189c9fd608519226bbf38859fc
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 14:36:48 +00:00
hjk
4c2e76385c Android: Settings widget code shuffling and cosmetics
Avoid a few casts, consts, #include

Change-Id: I803d0b728ce6f7502893d07679f638c2504629e3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-20 11:24:22 +00:00
hjk
ee43a323e3 LanguageClient: Use a new ListModel convienience function
Change-Id: I5cf806f40264b5c10bb3b31c153a52760346d40d
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 11:07:44 +00:00
Christian Kandeler
90499d5a53 CompilationDbPM: Do not change the kit's toolchain
Amends 45d42d4518.

Fixes: QTCREATORBUG-24047
Change-Id: I115eaf06fb3c055069918d20f360bd027f15d680
Reviewed-by: hjk <hjk@qt.io>
2020-05-20 10:18:17 +00:00
hjk
7419e09d0f Android: Settings widget code cosmetics
unnecessary indirections, const, namespaces, ...

Change-Id: I7955a81eafdce3fbb14646a57ce8436b00045278
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-05-20 10:03:24 +00:00
Leena Miettinen
99dde07495 Doc: Update information about supported devices
Change-Id: I17aed738f147dedee69acaa9c3794394f92d12d3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-20 08:11:28 +00:00
hjk
1b3920452a Android: Use Utils::ListModel for AvdModel
Change-Id: Iebbe137658288e60954bc63a97ddda948736fb09
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 07:52:36 +00:00
hjk
3a8bedf60b Android: Fix AvdModel::indexForAvdName
This was using serialNumber instead of avdname, whereas the
reverse function avdName() actually used avdname.

Change-Id: Ieb91f97323f2adcf9306c90c91b145e494f177c0
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 07:52:28 +00:00
hjk
8017c0763e Utils: Rename ListModel::forItems to ListModel::forAllData
This is more consistent with allData() and setAllData().

Adjust its only user.

Change-Id: Idd5cea3f37c6a84d052bd56a4a413a35d80289ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 07:52:13 +00:00
hjk
b2f06b7695 Python: Use new ListModel convenience functions for interpreter model
Change-Id: I98cbfd255fe35a9a9dd23f6c09c472c505ed271e
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 07:31:44 +00:00
hjk
d475daecf0 Utils: Add some convenience functions to ListModel
allData(), setAllData(), and findIndex(<predicate>)

Change-Id: I1f43e3b5c3810f219057e7e09338e06a66e1858a
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-20 07:29:22 +00:00
David Schulz
317d0a77a1 Revert "Debugger: use correct environment for the cdb process"
This reverts commit 4749550fbc.

Reason for revert: The debugger environment doesn't contain all path adjustments from the run settings in the project mode.

Fixes: QTCREATORBUG-24045
Change-Id: Ic714e7b99d51d51f74297f916817f302e8c4e1bb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-20 06:21:30 +00:00
Assam Boudjelthia
9ee24391e6 Android: warn about essential packages not found
Task-number: QTCREATORBUG-23829
Change-Id: Ic3ebd606bfde48b0f7152869a437f2f711ce1d03
Reviewed-by: hjk <hjk@qt.io>
2020-05-19 21:41:20 +00:00
Cristian Adam
a2273f9f82 LanguageServerProtocol: Compilation fix for MinGW 8.1
Change-Id: I5b7d643e529217a1077777ee542a48a237fa42b3
Reviewed-by: hjk <hjk@qt.io>
2020-05-19 18:02:28 +00:00
Denis Shienkov
29a67b57e5 BareMetal: Save 'platform codegen flags' for Keil compiler
Previous commit 071f998 skipped {re}storing of the platform
codegen flags in the Keil compiler.

Change-Id: I483f92a15017ba0471691d25685a2a8e9bd7d93c
Reviewed-by: hjk <hjk@qt.io>
2020-05-19 16:17:57 +00:00
Denis Shienkov
fdfa68cc7a BareMetal: Tune IAR compiler using 'platform codegen flags' feature
Previously we did a predefined macros generation for a some default
target CPU, which is hardcoded in a compiler.

Right now we have added the new text field in the IAR compiler settings
page, called "Platform codegen flags". In this field we can specify the
desired CPU or FPU target flags to generate an appropriate predefined
macros (e.g. such as --cpu=, --core= and so forth).

Change-Id: Ie38e077d8bac1851957085cde32661bcd189ddd2
Reviewed-by: hjk <hjk@qt.io>
2020-05-19 16:17:31 +00:00