Commit Graph

47434 Commits

Author SHA1 Message Date
Christian Kandeler
ef05f29940 ClangTools: Use built-in header paths again
This was broken in 7b6ab79f3e.

Change-Id: I037474ecce62bfebfe167d8dce15a6e7dbf7a001
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-27 09:04:41 +00:00
Assam Boudjelthia
3df31e9b4b Android: remove unnecessary setSummaryText for AndroidBuildApkStep
Amends 2d05822e27.

Change-Id: I24a9da450801953e1994384ae926c4f8b732b7b9
Reviewed-by: hjk <hjk@qt.io>
2020-11-27 08:28:02 +00:00
Assam Boudjelthia
6f17ad0562 Android: avoid QTC_ASSERT in addTask
Change-Id: I0b3eee749f21a031ff7b7f910b07719b03585759
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-26 19:03:01 +00:00
Assam Boudjelthia
2d05822e27 Android: move <b> from displayName to summaryText
In case or error QC will mention the name of the step where the error
happened, and it doesn't look right quoted in <b> tags.

Change-Id: I4b0b49367daeda845483c0bdbbc036c6d4c90f51
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-26 18:54:40 +00:00
hjk
5951b26f1a Android: Make compile with Qt6 again
Use the special exception to use 'auto' for the return type of
QXmlStreamAttributes::values() to avoid preprocessor use.

Task-number: QTCREATORBUG-24098
Change-Id: I52362e6af6db728cb296bba033f9bfa08e93ca1b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-26 15:59:28 +00:00
Christian Kandeler
0f31458624 Core::OutputWindow: Make auto-scrolling more robust
We relied on the scrollbar position as an invariant, which breaks if the
formatter writes into the text editor directly.
Instead, we update the "auto scroll" flag only if the user actively moves
the scrollbar, which is what the intention was anyway.

Task-number: QTCREATORBUG-24728
Change-Id: Ic747391b3206d6a5ba8eaf4e3cac9a70fed6dfbc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-11-26 14:24:31 +00:00
Eike Ziller
af4e74a972 CMake: Create build directory when user changes configuration
When opening and configuring a project, Qt Creator first tries to
configure the project in a temporary directory (if the build directory
doesn't exist anyhow). This is nice if you just open a project for
browsing, and the initial arguments are set up correctly for parsing a
project.

But if the user starts changing the configuration, either by changing
variables and applying the change, or by choosing a "QML debugging and
profiling" option, we should create the actual build directory and do
the configuration there.
Otherwise we have issues with redoing the correct configuration in the
actual build directory later on.

Fixes: QTCREATORBUG-24936
Change-Id: I54013a14f68eb7785e866cc2a9c09bbc43b44233
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-26 11:30:54 +00:00
Ville Voutilainen
23501b4271 Android: Don't remove icons or splashes if files with similar names exist
Task-number: QTCREATORBUG-24879
Change-Id: Ie13a8a94534889c473414b5a5e771aae11d0f167
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-26 10:52:53 +00:00
Eike Ziller
6172fc8a9d Merge remote-tracking branch 'origin/4.14'
Change-Id: I8543d87779c0da6a876caa046f6852737c9ae680
2020-11-26 10:53:34 +01:00
The Qt Project
97c67fcf6c Merge "Merge remote-tracking branch 'origin/4.14'" 2020-11-26 09:50:12 +00:00
David Schulz
786c131beb ClangTools: compare file names host os case sensitive
Change-Id: I31b889ca5e722bd565bde9b742e24da39151e8bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-26 08:02:16 +00:00
David Schulz
b40dcf6d29 ClangTools: Fix crash in document tool runner
Prevent removing refactor markers from already destroyed widgets.

Fixes: QTCREATORBUG-24982
Change-Id: Icf8950f8f8407fa8733a1ef30d05abb4a2b44dd4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-26 07:58:53 +00:00
Eike Ziller
3ef279450b CMake: Don't overwrite existing builds when changing build dir
When changing a build configuration's build directory to a directory
with an existing build (i.e. CMakeCache.txt), do not overwrite it, but
just parse it (running CMake as needed to generate the fileapi
response). Do not ask funny questions in that case.

This solves the pattern that you want to use some preconfigured build
but configured the right kit already with the default parameters.
Switching to a different build directory should simply never "kill"
an existing build in any case (and running CMake with the
"initial arguments" basically kills the existing build in the
not-so-uncommon case).

Change-Id: I54ca1f14d72a11a3bfe5b09ce340b28be321f80e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-26 06:48:42 +00:00
Marco Bubke
1b477cbadb QmlDesigner: Don't copy the target
It is to costly. It is not thread save but we think there will be no race
condition. To improve the code we should capture only the needed data
and copy that.

Change-Id: Ide9c640a98c2aab6fbf25beedc9f533b695b9f02
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-25 19:38:57 +00:00
Eike Ziller
b243a794aa CMake: Fix missing run of CMake after saving sub-CMakeLists.txt
If you have a project with subdirs, changing and saving on of the
subdirs CMakeLists.txt would just "reparse" the existing project
data again.
Instead run CMake first, so the change actually takes effect.

Change-Id: Ia2b0f8b5681f10d426229470fdc420b3234eccec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-25 16:19:38 +00:00
Jarek Kobus
e83a6f6610 Remove unused TypeSpecificDeviceConfigurationListModel class
Change-Id: I658e447d49bfd78b76c32f635f284eba859a0e94
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-25 13:52:59 +00:00
Thomas Hartmann
9939b1844d Fix crash in ManhattanStyle
The widget can be a nullptr.

const bool isComboBox = widget->inherits("QComboBox");
Was crashing in the iso icon browser.

Task-number: QDS-3079
Change-Id: Ie7efa08ff5be094b94a835db895929158918bfcf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-25 13:17:15 +00:00
Christian Kandeler
a10a1acd23 ClangTools: Fix terminology
Make it clear we don't disable specific diagnostics, but the checks that
triggered them.

Change-Id: Ie9b5568a1749f59d80827e342cb5299ebfc63227
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-25 11:27:04 +00:00
Eike Ziller
8245523653 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/designer/cpp/formclasswizard.h
	src/plugins/designer/cpp/formclasswizarddialog.h

Change-Id: I9f9d166e1a9249022305503f9cbe571136c2a2b1
2020-11-25 11:25:34 +01:00
Thomas Hartmann
edef529df6 QmlDesigner: Fix crash
ToFront/ToBack is not always available.

Task-number: QDS-3167
Change-Id: Idfd4049e28505d4d87cb724c5efc46209e3be3aa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-25 10:11:22 +00:00
Christian Stenger
02c876f6e8 PE: Fix handling of compiler command on Windows
Broke with c60c642fe5 and resulted in losing the
compiler command for Qbs and CMake for MSVC based tool
chains.

Change-Id: I400fda14869ebf11dc7ddc2fda7d5a52a2fc096a
Reviewed-by: hjk <hjk@qt.io>
2020-11-25 09:05:29 +00:00
Thomas Hartmann
ecfa623ee8 QmlDesigner: Default canvas of 40000 is sufficient
Change-Id: I238cddd277739860fb32a89e3521b61cf488aa8b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-25 07:22:59 +00:00
Thomas Hartmann
d14fe41bc1 QmlDesigner: Reduce calls to updateGeometry
Those calls can really become slow in large flows
and do not seem to be required.

Change-Id: Ibd3cda917c2d71db10bc90ad2ca58351e8bf7d0f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-24 19:48:30 +00:00
Thomas Hartmann
95ae082404 QmlDesigner: Set the correct root item rect in flow mode
This method is called when showing the form editor again, after a hide.
Without this the RootItemRect is not set correctly in this case.

Change-Id: Ia2339daebb2b2cbcafc223b29878d24cbe371708
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-24 19:48:22 +00:00
Aleksei German
a118dc4836 QmlDesigner: Fix for Annotations dialogs crashes
Change-Id: I161dfcf1181af4a45dd98f71fea08fc8ec56e3f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-24 15:40:55 +00:00
David Schulz
5cd057d9fe Debugger: Prevent calling windows lldb on startup
The LLVM package on windows contains an LLDB linked against python but
misses a python library. Calling this lldb to get the version number
results in an ugly error message that python36.dll cannot be found. Use
the file version info instead.

Fixes: QTCREATORBUG-23848
Change-Id: I6d8e6cac07b427de564eaaedf7de369391aed37e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 13:52:58 +00:00
Jarek Kobus
3b93ade234 Don't call virtual method from c'tor
This patch fixes the following issues:

1. The c'tor of NonInternalLibraryDetailsController
called slotLibraryTypeChanged(), which called in turn
virtual updateWindowsOptionsEnablement(). This method
is reimplemented in subclasses, so we can't easily
make this method final.

The solution is to reorganize the code so that we don't
call anymore updateWindowsOptionsEnablement() from the
NonInternalLibraryDetailsController c'tor, but instead
we rely on the fact that it will be called indirectly through
updateGui, called for each leaf subclass from its c'tor.

2. Don't call multiple times updateGui when constructing
the subclass of NonInternalLibraryDetailsController or
when changing library type (from combo box). Before, each
time that happened, the updateGui was called three times.

3. Provide an ugly hack to nicely resize the wizard when
showing more widgets (if needed). This also eliminates flickering
between transitioning from Type to Details page.
It makes the layout much better, as it respects the reasonable
minimum size (when resizing to smaller size by the user).
The request to unhack addressed here: QTBUG-88666.

4. Mark all virtual methods with final for all
subclasses of LibraryDetailsController, where appropriate.

Change-Id: Ief7e5e9e1efdbfca5a06eaeeb1528018c29c39ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-24 13:04:35 +00:00
David Schulz
8f4be88eea ClangTools: prevent creating duplicated diagnostic marks
If we already have marks from the analysis for the open file we do not
need to create marks for the explicit analysis.

Fixes: QTCREATORBUG-24955
Change-Id: Id550566c6e9a2dbd4e4eb3e9b9460a7778e39a50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-24 12:48:31 +00:00
David Schulz
c5c3214cfb TextEditor: add action to paste without autoFormat
Fixes: QTCREATORBUG-20887
Change-Id: Iedc6b584c9c1cc48804025653d0749e054a406f8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 12:20:05 +00:00
Alessandro Portale
dc8edcefba WebAssembly: Fix WebAssemblyPlugin::testEmSdkEnvParsing for non-Windows
The ':' in "c:\" got confused with the paths list separator ':' on
Linux/Mac.

Let's add a non-Windows specific emsdk_env output to be parsed by the
autotest.

Change-Id: I900e13065237bc0d68eca5582b286177e90cc0af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 12:18:06 +00:00
Christian Kandeler
bcf900e29b ClangCodeModel: Prevent outdated fix-its from getting applied
The code locations might no longer be correct.

Fixes: QTCREATORBUG-21818
Change-Id: I866a29d2fd63ff65cf33168024f7788c5f6e3547
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 11:24:08 +00:00
Jarek Kobus
4c9361124d Fix compile warnings about missing overrides
Add missing overrides.
Remove validateCurrentPage() completely,
since it didn't do anything useful.
This method is not overridden in any superclass up to QWizard.

Task-number: QTCREATORBUG-24098
Change-Id: Iffa335c471469c56e830b6160da49359fc5d6bc2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-24 08:10:41 +00:00
Assam Boudjelthia
b52ad29f3a Android: fix logcat not fetched when app exits/crash at start
Application output from logcat might not work if an app
crashes at the start, so with this patch we avoid that by
making logcat process fetch logs faster by not getting
the full logs but only the logs starting from the moment
we start the app (using -T arg).

This can be very annoying bug, because when starting the
app from QC it usually only prints "app_package_name died."
which forces the user to go into the logcat manually and
search for an error from thousands of lines.

Change-Id: Ic5ac0389cb28e7c80586490877a697272f3648af
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-24 07:51:26 +00:00
Assam Boudjelthia
bc5ffdb56b Android: fix copy gradle files button function
The the value was being set before the checkbox is connected, which
is useless.

Change-Id: Ifdbbccc1fe190e4dd646e77303af78757fadebb2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-23 19:31:31 +00:00
David Schulz
a8ceeaf7df ClangTools: remove already existing temporary files
If we already have a temporary saved file for a modified document in the
VFSO remove the old one.

Change-Id: I748cd05a45dc74e5d84faa48a574983a628b050f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 12:23:47 +00:00
Christian Stenger
6b62a99a8a cmake: Fix building debug with release libclang
Parts of QC cannot be linked against a release build of clangTooling
libs and vice versa when building on Windows.
Check whether the provided libs match the current build mode and
disable respective parts if necessary.
Re-use this information to decide whether unittest should be build
or not.

Change-Id: Ibc2aab0d7886e78ebbf8f15a43152efad49f1eff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-23 11:07:49 +00:00
Christian Kandeler
d3fafcde0f CppEditor: Support decl/def switch for conversion operators
Fixes: QTCREATORBUG-21168
Change-Id: I515fe146a679e007c96fa8d23f1457dadf07db3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 10:07:20 +00:00
Christian Stenger
fc216b4838 QmlDesigner: Fix compile on Linux
Change-Id: I44c0899ff65aa640c7bb2f94ea8084fb200d191b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-23 08:33:07 +00:00
Assam Boudjelthia
34a7f6f9f2 Android: remove newline chars before adding output in error/warning pane
The output of androiddeployqt that is picked by QC, can contain newline
char at the start of the received line like:
"\nNote: Recompile with -Xlint:deprecation for details."
Such output is sould be only a warning
and not an error, that's we try to remove the newline from the start to
avdoid this behavior.

Fixes: QTCREATORBUG-24881
Change-Id: Iad7556917cb0f53dc691dfb316f999ad504976e9
Reviewed-by: hjk <hjk@qt.io>
2020-11-23 07:23:07 +00:00
Jarek Kobus
8cee978e55 Don't declare override when final is declared
Amends: eccebe41dc

Change-Id: I93c5be09fd47a591a5b797f529c74f76bd975b50
Reviewed-by: hjk <hjk@qt.io>
2020-11-23 07:04:00 +00:00
Christian Kandeler
f4450c4b72 MCU: Fix qbs build
Change-Id: Ie235f0242d7d67130031ad342695ae38edda79a1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-20 17:27:24 +00:00
Eike Ziller
f534624fce Fix build with newest Qt 6
No implicit casts from QString to QFileInfo anymore, and a few more
QChar(int) fixes.

Task-number: QTCREATORBUG-24098
Change-Id: I3326fc0701a9259c7bdd2d8c3025de0a4774f8aa
Reviewed-by: hjk <hjk@qt.io>
2020-11-20 15:43:25 +00:00
Jarek Kobus
01331893ad Don't call virtual method from Exception c'tor
In case a static s_shouldAssert is true, we were calling
virtual description() method from the c'tor of base Exception
class, which was reimplemented in subclasses.
This could cause a crash, since reimplementations
were using not initialized yet private fields.

We fix it by de-virtualizing the description() method
and instead we pass the description in overloaded, protected
c'tors. Original c'tors still use the default description
that was used for base Exception class.

In addition we make all private fields const, and
make showException method non-virtual, as it didn't have
any overrides.

Change-Id: I7ebae1809ab423e990276e500f9c0db569d10e2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-20 15:09:48 +00:00
Jarek Kobus
d97f663e3b Fix includes
Change-Id: I8eeade519a874df0c1dc3c2c6213c66d1df001f6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 14:25:32 +00:00
Jarek Kobus
6b588d7227 Remove unused variables
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.

Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 13:58:46 +00:00
Alessandro Portale
6108479040 McuSupport: Fix CMake build
Baremetal -> BareMetal

Change-Id: I083c75a03513b8b8f8635e2e60212e6f600b1a34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-20 13:19:37 +00:00
hjk
c2090d101b EditorManager: Introduce a DoNotRaise EditorManager::OpenEditorFlag
In some situations it might be beneficial to set up the editor
as usual but do not raise the application window.

This is opt-in, existing behavior is not affected.

Task-number: QTCREATORBUG-12769
Change-Id: If9826717bba06283187d10073c02a748b638c3f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-20 13:13:22 +00:00
Dawid Sliwa
3929917ecb McuSupport: Add support for kits with IAR compiler defined
- added IAR toolchain factory similar to ARM GCC one
- extended kitName with used compiler name
- added Unsupported toolchain type to fix crash after creating kit with not
  recognized toolchainID

Fixes: QTCREATORBUG-24898
Change-Id: I28b8376ca4bc88d3d75e17bd242ac49f0ee09845
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <christiaan.janssen@qt.io>
2020-11-20 12:50:11 +00:00
Jarek Kobus
c9f5ce51e0 Don't use iterators to temporary containers
Fix a clazy warning, like:
Don't call QVector::begin() on temporary [clazy-temporary-iterator]

Indeed, we may pass begin and end iterators for 2 different
instances of temporary vector (shared though).

In addition: use const iterators.

Change-Id: Iac1055d9fc226f1b48ca72ee4f3aab433addfe7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-20 12:25:31 +00:00
Eike Ziller
8d67dd57e8 Merge remote-tracking branch 'origin/4.14'
Change-Id: I5e138bb7883c0436fee14ca6af20e99396676af1
2020-11-20 13:00:37 +01:00