Commit Graph

62421 Commits

Author SHA1 Message Date
Marco Bubke
9204607d28 QmlDesigner: Explicit disable qmldom
It disables some other experimential code which has to be
exchanged too.

Change-Id: If2ea4e4c466a9aa031c425e0792a506cb751e2c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-28 14:42:32 +00:00
Leena Miettinen
14965f5792 UI text: Fix grammar errors and capitalization issues
Change-Id: Iefb1075cc0b14eb8c0e99b6c96c31a91c2b079f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-28 13:54:10 +00:00
hjk
56eba24222 CPlusPlus: Drop the OverView::operator() overloads
Use the named members instead. The operator() versions have been used
only in a handful places, not using them makes things clearer on the
user code side.

Change-Id: I9b44371e094d498ff6ebfa9ecbe32f8654a63d4d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-28 13:46:55 +00:00
Marco Bubke
96caffb8cf QmlDesigner: Fix qmldom dependency
Because we moved 6aa826436c to master
some changes got lost and the merge
c4e94c2c9c added some old code. This patch
is removing again this code.

Change-Id: I336654f71ebe12f7f5ccb5bf6706f33fa6148440
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-28 12:42:16 +00:00
hjk
d45104f5db QmlJS: Improve parser performance
Detaching the rawString_stack alone shows up at 0.85% when loading
Creator inside Creator. One write access is actually used from
qmljs.g:699, so making the whole function const would need more work.

Take a short cut and replace the unneeded reference counted container
with a non-reference counted one.

Change-Id: I081bf5741899a01e4126b7ffe4f36e4844f0b19e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2022-06-28 11:50:27 +00:00
David Schulz
84ef111847 Editor: only close proposal widgets after updates
To prevent closing function hint widgets after the completion processor
did not return a proposal.

Change-Id: I1901f3f21917d348ef12a6db846739e3c54752fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-28 11:47:34 +00:00
hjk
551d458605 RemoteLinux: Use path on device for fallback gdbserver
This was using a gdbserver from the local system which appeared
to work with "local remote" test setups, but failed in real life.

Fixes: QTCREATORBUG-27752
Change-Id: I24c46dd737fc5396caeeedb55258e4edb465cbb0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-28 11:31:49 +00:00
hjk
e2bb204d4d CPlusPlus: Inline more simple Type related functions
Change-Id: I2103e8047b385b438e58072e8a2689f1889d2724
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-28 11:02:22 +00:00
hjk
27d51e9804 CPlusPlus: Inline some Scope related simple functions
Change-Id: I23486fdfa749fe864c04d5c1a7cede21fb16005b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-28 11:02:06 +00:00
Christian Stenger
6b32f58225 QmlDesigner: Fix qbs build
Change-Id: Ie83a9e67f63aa2424423710140c65b4bec6770bf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-28 10:20:19 +00:00
Christian Stenger
c1c255059e Debugger: Fix handling of stepping while debugging QML/JS
Amends 3341fa827f.

Fixes: QTCREATORBUG-27728
Change-Id: I96398d3ebaa33b10ec90cce4df9e9af809cd29a9
Reviewed-by: hjk <hjk@qt.io>
2022-06-28 10:10:11 +00:00
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
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
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
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>
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
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
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
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
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
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