Commit Graph

76686 Commits

Author SHA1 Message Date
Miikka Heikkinen
73af75fe68 QmlDesigner: Fix crash in material browser
Task-number: QDS-7191
Change-Id: I9542a227aeb3f462ff3572e9a07a7473f98bfa61
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-28 09:55:39 +00:00
Jarek Kobus
2453f4e607 TestFrameworkManager: Don't leak test tools on shutdown
Detected by memory analyzer.

Change-Id: Ic3fd3d6661141c8bc2d8b03e72f53f253d6d9b83
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-28 09:50:11 +00:00
Eike Ziller
f95a1eca34 Merge remote-tracking branch 'origin/8.0'
Change-Id: Icef5e28557701243e686d35cf885412eb341e75a
2022-06-28 11:35:16 +02:00
Christian Stenger
ebf57d37b9 Debugger: Avoid crash when debugging with remote cdb engine
When trying to attach to an already running cdb session remotely we
currently fail.
When debugger is aborted on QC side and the remote cdb afterwards we
crashed when selecting a no more existing perspective.

Change-Id: I9d3c20f034b25ef85449b0b4e658aab2c3988db8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-06-28 08:37:07 +00:00
Leena Miettinen
b5066d71b8 Doc: Replace "Tools > Options" with "Edit > Preferences"
The menu was moved and renamed. The Options dialog was
also renamed "Preferences".

Change-Id: I05d187915382b3ce49699d91304cd447c87e2bd6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-28 08:32:44 +00:00
Eike Ziller
e46357a220 Adapt to move of options to Edit > Preferences
Change-Id: I6881f658db9eec5059b434bce12093667535d5ac
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-06-28 08:32:22 +00:00
Alessandro Portale
139e190d77 Android: Cleanup qtc.android.build.androiddeployqtstep logging
Reduce excess spacing and quoting.

Change-Id: I685d78a91494f5805a175552db36df92d3da3ca5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-06-27 19:31:19 +00:00
Cristian Adam
22b8f3bdcd scripts: Deploy clang-format tool
The beautifier plugin can use the clang-format tool, which is statically
build, and it's around 2-6 MB in size.

Fixes: QTCREATORBUG-25600
Change-Id: I900f0dbfc2ba2773d3ad986c149adb41a4103e94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-27 15:40:18 +00:00
hjk
2e85c48944 FakeVim: Partially implement multi repeat command (:g, :v)
Change-Id: Ifed113e80103b9fdd109cb4a5a6a31098f77d74c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-27 14:43:42 +00:00
hjk
9e363c6421 Add plugintr.h files to all plugins
Except FakeVim, which had it before.

for i in [a-eg-z]*/*.json ; do
    upper=${i##*/}
    upper=${upper/.json/}
    lower=${i%/*}
    trfile=$lower/${lower}tr.h

    cat << EOT > $lower/${lower}tr.h
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/

namespace $upper {

struct Tr
{
    Q_DECLARE_TR_FUNCTIONS($upper)
};

} // namespace $upper
EOT

    git add $trfile

    perl -pi -e "s/(${lower}_global.h)/\1\n    ${lower}tr.h/"  $lower/CMakeLists.txt

    perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/"  $lower/$lower.qbs

done

Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 13:34:57 +00:00
Jarek Kobus
51c798b517 FancyTabBar: Don't leak fancy tabs on shutdown
Detected by memory analyzer.

Change-Id: I9709dd1f1c60d3d19939e66779bba7b17536a175
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 13:30:07 +00:00
Jarek Kobus
3a64f67f76 Remove reimplementation of AbstractProcessStep::doRun()
Remove those reimplementations that call parent implementation
and don't do anything more.

Change-Id: Ib74dd33b45c0027280de57b957c2f8f642f82d23
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-27 13:22:09 +00:00
David Schulz
bdfb07d701 Editor: Fix code folding marker visibility
... after split in new window.

Fixes: QTCREATORBUG-27748
Change-Id: Idc6270e3bbc39a5c1e679357ba0fbd840e5312c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-27 13:01:41 +00:00
Christian Stenger
8d3c2ab348 Tests: Disable SSE dumper test on arm macOS
Change-Id: Idc6f769a7967fa6afb27e419238a10d631bca0fd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-27 12:56:47 +00:00
David Schulz
fa0771549e Debugger: Fix interrupting remote cdb process
Since we can use the ctrlc stub for cdb now we also can use the
interrupt functionality to force the debugger to halt. This also works
for remote sessions.

Fixes: QTCREATORBUG-21657
Change-Id: I049aea781e984c31ac5744f87f9590f910234679
Reviewed-by: hjk <hjk@qt.io>
2022-06-27 12:54:07 +00:00
hjk
d1f2c8e612 Core: Name "Options" dialog "Preferences"
Also on non-*ac*.

Change-Id: I0b3498da8c56e97c60257bfa204fd10c9e917243
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-27 12:42:43 +00:00
Jarek Kobus
e981bedf68 BuildSystemOutputWindow: Don't leak actions on shutdown
Detected by memory analyzer.

Change-Id: I49f9f73b552ba89810105d79d98cfff035f7d37e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 12:41:49 +00:00
Jarek Kobus
3f8644abff IDocument: Don't leak MinimizableInfoBars on shutdown
Detected by memory analyzer.

Change-Id: I756cbc2aad60270ea1dafbf12157a610a514dbcb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 12:41:37 +00:00
Jarek Kobus
1a144b4bdd AssetExporterPlugin: Don't leak action on shutdown
Detected by memory analyzer.

Change-Id: Iddfe613e8c7267de24d8d9cc07e1e0c7357e383f
Reviewed-by: hjk <hjk@qt.io>
v8.0.0-beta2
2022-06-27 12:41:21 +00:00
David Schulz
1956fa0365 Python: prevent setting local env to remote pyls
Change-Id: Id0eea5420c897687e6931bf640e3a37ba2638b8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-27 11:23:54 +00:00
Christian Stenger
e7d90c23b6 Dumper: Fix dump of std::string on macOS
Try to handle the alternate layout of strings correctly.
Depending on the defines and the endianness the string structure
may vary quite a bit. Old approach just took care of the default
layout and the endianness.
In case of an alternate layout of strings we failed so far.

Fixes: QTCREATORBUG-26175
Done-with: Viktor Govako
Change-Id: I788eb5619408bca281eb887c3f6a269808c27d24
Reviewed-by: hjk <hjk@qt.io>
2022-06-27 11:00:43 +00:00
hjk
e1d2cbde24 ElfReader: Suppress a coverity message
Add two neutral enum values mimicing what llvm/BinaryFormat/ELF.h has.

*** CID 1518686:  Uninitialized variables  (UNINIT)
/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp: 3940 in Debugger::Internal::GdbEngine::handleGdbStarted()()
3934         // Addint executable to modules list.
3935         Module module;
3936         module.startAddress = 0;
3937         module.endAddress = 0;
3938         module.modulePath = rp.inferior.command.executable().toString();
3939         module.moduleName = "<executable>";
>>>    CID 1518686:  Uninitialized variables  (UNINIT)
>>>    Using uninitialized value "module.elfData.endian" when calling "updateModule".

Looks like a false positive, module.elfData.endian is not used
in updateModule() and surroundings.

Change-Id: Ic8071add87b1df894819d49ea55dfa705b81c3ce
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-27 10:28:51 +00:00
Eike Ziller
c7b724c4ca Merge remote-tracking branch 'origin/8.0'
Change-Id: Ia1c97d5949de607177a5a0632c7e8a37cbfd3475
2022-06-27 10:33:44 +02:00
Miikka Heikkinen
a627d43d39 QmlDesigner: Fix crash on mode change
Added model pointer validity checks into a few places.

Fixes: QDS-7191
Change-Id: I94beb134f4d9a0b1c7fc9dc87da1d02ad255beaa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-27 08:20:21 +00:00
Eike Ziller
06715441d6 Fix "save as" with same file path, involving symbolic links
We close all existing documents for the new file path, before renaming
the current document, but may not close the current document itself. We
already tried to prevent that, but didn't take symbolic links into
account (which could also involve directories that are symbolic links).

Use the same logic for determining if the two files are "the same" as in
DocumentModel::documentForFilePath.

Fixes: QTCREATORBUG-27741
Change-Id: I3f3984f1f761328ee373b34870e03a9fce30c190
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-27 08:00:28 +00:00
Jarek Kobus
c456572fa5 Add missing include
Amends: abccfe0646

Change-Id: Iab8b746ee0936024532e8da58189c027521c7edd
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-27 07:43:32 +00:00
hjk
0c10e54f68 Utils: Introduce a doCleanPath() helper function
Respecting :// separators, which QDir::cleanPath() breaks.

Note that this still uses the host-dependent QDir::cleanPath
in the implementation.

Change-Id: Icd6c41ee52b5a0c4ff7398863cb26811a61261ec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-27 07:37:45 +00:00
Cristian Adam
a26235dab9 ProjectExplorer: Fix abi detection of static Qt builds
Qt 6.2.4 static builds, both with MSVC 2019 and MinGW 11.2.0 are
having the coff headers at the 66 offset instead of 60.

I determined the value empirically, I haven't managed to find
a reference about the magic 60 or 66 values.

Fixes: QTCREATORBUG-27735
Change-Id: Ie2e9f8d6456e765acffce4991955067964b8c0fc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-27 07:33:23 +00:00
Eike Ziller
c95cf1c0cf Fix crash handler executable name
Amends 17129dc931

Change-Id: I28f8fca14857454ada7c0a1cbce6d5db6a5ab37e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-06-27 07:06:33 +00:00
Eike Ziller
ff96ea41b2 CMake build: Don't exclude GTEST tests for dependency checking
Also Googletest based tests should be disabled if dependencies
are missing.

Amends aac0f2a8f5

Change-Id: I3be6165b8a28428ba34556a1bf438b3000c00056
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-27 07:05:59 +00:00
Eike Ziller
ae2e57b167 Ignore .json.in and .svg files for translations
Amends 30bb32d9af
which added the .json.in files to the list of target sources.

Change-Id: I7282cfcda50cbd156403a23cce06baed9698bb4d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-27 07:05:29 +00:00
Eike Ziller
92c74abbf1 Fix lupdate issues
Change-Id: I7256c8aff5eb77b264b76ba24e79c26ab2924e84
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-27 07:05:22 +00:00
David Schulz
abccfe0646 Callgrind: modernize callgrind marks
Use annotions instead of custom icons on marks and show tooltip on
annotations

Change-Id: I153caefb997e9688902c0ec1a8090ff741416431
Reviewed-by: hjk <hjk@qt.io>
2022-06-27 04:35:03 +00:00
Orgad Shaneh
67f98c0c83 Valgrind: Stop parsing if file open failed
Reported by Coverity.

Change-Id: Ibf12c563cb2cab50183c62a4e51cdbe238d0127e
Reviewed-by: hjk <hjk@qt.io>
2022-06-24 15:31:55 +00:00
Adam Treat
5c0ad89d91 RemoteLinux: Change the displayed names to 'Remote' instead of 'Generic'
Change-Id: I0e6edd24f10c69caf376379e1cec05bf90da9579
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-24 15:24:43 +00:00
hjk
2496ffe3ce Code cosmetics
Mostly unused #include's, also sort them or reduce scope.

A few namespaces, ...

Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-06-24 14:44:13 +00:00
hjk
31db28601b CPlusPlus: Use a global variable for the undefined type instance
... and split the FullySpecifiedType in two overloads.

Initially:

        29 [1]  FullySpecifiedType::FullySpecifiedType(Type *type) :
                <+   24>        41 54                 push   %r12
                <+   26>        55                    push   %rbp
        34 [1]          static UndefinedType t;
                <+   27>        48 8b 2d 26 68 13 00  mov    0x136826(%rip),%rbp
        29 [1]  FullySpecifiedType::FullySpecifiedType(Type *type) :
                <+   34>        53                    push   %rbx
                <+   35>        48 89 fb              mov    %rdi,%rbx
        34 [1]          static UndefinedType t;
                <+   38>        0f b6 45 00           movzbl 0x0(%rbp),%eax
                <+   42>        84 c0                 test   %al,%al
                <+   44>        74 12                 je     0x7fffc135c620 <_ZN9CPlusPlus18FullySpecifiedTypeC2EPNS_4TypeE+64>
                <+   46>        4c 8b 25 5b 66 13 00  mov    0x13665b(%rip),%r12
        35 [1]          return &t;
                <+   53>        4c 89 23              mov    %r12,(%rbx)
        34 [1]  }
                <+   56>        5b                    pop    %rbx
                <+   57>        5d                    pop    %rbp
                <+   58>        41 5c                 pop    %r12
                <+   60>        c3                    ret

After making it a global variable:

        29 [1]  FullySpecifiedType::FullySpecifiedType(Type *type) :
                                f3 0f 1e fa           endbr64
        30 [1]      _type(type), _flags(0)
                <+    4>        c7 47 08 00 00 00 00  movl   $0x0,0x8(%rdi)
        32 [1]      if (! type)
                <+   11>        48 85 f6              test   %rsi,%rsi
                <+   14>        74 08                 je     0x7fffc14675f8 <_ZN9CPlusPlus18FullySpecifiedTypeC2EPNS_4TypeE+24>
                <+   16>        48 89 37              mov    %rsi,(%rdi)
        34 [1]  }
                <+   19>        c3                    ret
                <+   20>        0f 1f 40 00           nopl   0x0(%rax)
        33 [1]          _type = &UndefinedType::instance;
                <+   24>        48 8b 35 49 67 13 00  mov    0x136749(%rip),%rsi        # 0x7fffc159dd48
                <+   31>        48 89 37              mov    %rsi,(%rdi)
        34 [1]  }
                <+   34>        c3                    ret

The no-parameters branch after splitting:

        29 [1]  FullySpecifiedType::FullySpecifiedType() :
                                f3 0f 1e fa           endbr64
        30 [1]      _type(&UndefinedType::instance), _flags(0)
                <+    4>        48 8b 05 5d 67 13 00  mov    0x13675d(%rip),%rax        # 0x7fffc159dd48
                <+   11>        c7 47 08 00 00 00 00  movl   $0x0,0x8(%rdi)
                <+   18>        48 89 07              mov    %rax,(%rdi)
        31 [1]  {}
                <+   21>        c3                    ret

Change-Id: I61439d68921cf9fa422304033b75de16bb4aa0d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-24 14:44:06 +00:00
Ippei Sugita
290c86f55c Partially update Japanese translations
This is meant to rescue/review the translated strings.
lupdate has not been used yet.

Change-Id: Ia5a3acc25ba59709b0f638c19f6e9f40afeff7be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-06-24 13:40:45 +00:00
Marcus Tillmanns
30f9f68b15 iostool: Cleanup and improve debug output
Replaced the custom command line arg parsing code
with QCommandLineParser

Change-Id: I14e8695b5ee327b1d111558271bf98afd0c942b0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-24 13:18:09 +00:00
Christian Kandeler
b122c1905f Update qbs submodule to HEAD of 1.23 branch
Change-Id: I049c37052ea9006a87b4cab85c5288512526eff4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 12:03:25 +00:00
Alessandro Portale
90e691251f Fix install command in wizard generated CMake files for Android
"error: install TARGETS given no LIBRARY DESTINATION for module target
<...>."

Change-Id: I9b283e342b32c7d3df44bb5aed231b843e3e54ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-24 11:53:17 +00:00
hjk
ffa3aad576 CPlusPlus: Inline some simple central functions
Depending on context, callgrind sees contributions of >8% to
the total cost of project parsing for these functions. The
functional are actualy executed executed out-of-line, often
for a function body of one "payload" instruction only.

Inlining removes the call/endbr64/ret overhead.

Change-Id: I6886f08e322fcaa4e0f54d424279e0a8c24e4718
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-24 11:49:41 +00:00
Henning Gruendl
85cd97a334 QmlProjectManager: Update landing page
* Make landing page responsive
* Use QtCreator welcome page theme colors
* Remove CMake from landing page
* Separate colors from values to make mocking data less redundant
* Add quick version to qt version check
* Use qml singleton for backend instead of using the root context item

Change-Id: Ic303d4713c348e34197716031b303720702f3e98
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-24 11:48:35 +00:00
David Schulz
e3cfbc0a7b Python: improve initializing python run configuration
Sets main.py as the default script. If we cannot find a main.py we
create a runconfig for every py file in the project.

Change-Id: I93f4c9a5c9e2825a592eee3707439e69a8aea566
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 11:24:18 +00:00
David Schulz
6c8605ced2 Python: automatically disable outdated pyls settings
Change-Id: I301c6df3fdd9cf634a1abff20c6f24b9bc5fc23b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 11:23:52 +00:00
Christian Kandeler
e2b99e6b31 Unit test: Remove libclang test remains
Change-Id: Ifa2cd2727ecf80d3b29dc2bc2a10af11baa2f1dc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 11:01:01 +00:00
Christian Kandeler
224be9add8 ClangTools: Move over a test from unittest
Change-Id: Id61a0bdb8e46ead4de8ad0298e62afb7b9fbcfb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 10:05:54 +00:00
David Schulz
e4d692a689 Python: only add python files as targets
Change-Id: I21f0ca6035aed6306d6cbe55a6c6df0838e49f45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-24 09:53:52 +00:00
Brook Cronin
21ef02a016 update fixed version of icon font
Change-Id: Iedf945b3718d4df245e24ac1ba756b20f6ed9cf1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-24 09:46:21 +00:00
Jarek Kobus
9fde8511e2 QtcProcess: Be idle when incoming data is empty
Don't forward and flush empty data

Change-Id: Idb153695d7eb62905c000b70efdfb0c68f0df9ad
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-24 09:41:10 +00:00