Merge "Merge remote-tracking branch 'origin/11.0' into qds/dev" into qds/dev

This commit is contained in:
The Qt Project
2023-09-14 12:52:09 +00:00
40 changed files with 8404 additions and 6385 deletions

View File

@@ -15,7 +15,15 @@ if (yaml-cpp_FOUND)
unset(yaml_cpp_include_dir CACHE) unset(yaml_cpp_include_dir CACHE)
find_path(yaml_cpp_include_dir yaml-cpp/yaml.h) find_path(yaml_cpp_include_dir yaml-cpp/yaml.h)
endif() endif()
set_target_properties(yaml-cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${yaml_cpp_include_dir}") if(TARGET yaml-cpp::yaml-cpp)
# yaml-cpp >= 0.8
set_property(TARGET yaml-cpp::yaml-cpp PROPERTY IMPORTED_GLOBAL TRUE)
add_library(yaml-cpp ALIAS yaml-cpp::yaml-cpp)
set(yaml-cpp_TARGET yaml-cpp::yaml-cpp)
else()
set(yaml-cpp_TARGET yaml-cpp)
endif()
set_target_properties(${yaml-cpp_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${yaml_cpp_include_dir}")
else() else()
if(TARGET yaml-cpp) if(TARGET yaml-cpp)
return() return()

View File

@@ -1,6 +1,6 @@
set(IDE_VERSION "11.0.2") # The IDE version. set(IDE_VERSION "11.0.3") # The IDE version.
set(IDE_VERSION_COMPAT "11.0.0") # The IDE Compatibility version. set(IDE_VERSION_COMPAT "11.0.0") # The IDE Compatibility version.
set(IDE_VERSION_DISPLAY "11.0.2") # The IDE display version. set(IDE_VERSION_DISPLAY "11.0.3") # The IDE display version.
set(IDE_COPYRIGHT_YEAR "2023") # The IDE current copyright year. set(IDE_COPYRIGHT_YEAR "2023") # The IDE current copyright year.
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Allow debugging with terminal -->
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>

View File

@@ -100,21 +100,13 @@
\e{Windows} \e{Windows}
Check whether \QC has been compiled with OpenGL/Desktop, or ANGLE as By default Qt Quick uses Direct3D 11. If you have problems, try updating
a backend. The official binaries are always built with ANGLE (a library that your graphics drivers or update your DirectX version. Run \c dxdiag.exe to
maps OpenGL ES API to DirectX). check whether \e{Direct3D Acceleration} is indeed enabled.
\list You can also try setting the \c QSG_RHI_BACKEND environment variable to
\c vulkan or \c opengl. See \l {Qt for Windows - Graphics Acceleration}
\li ANGLE backend: This requires a Windows version newer than Windows XP. for details.
If you have problems, try updating your graphics drivers or update
your DirectX version. Run \c dxdiag.exe to check whether
\e{Direct3D Acceleration} is indeed enabled.
\li OpenGL backend: Make sure your graphics driver supports OpenGL 2.1 or
newer. Try to update your graphics driver.
\endlist
\e{Unix} \e{Unix}

View File

@@ -386,180 +386,6 @@
Roberto Raggi <roberto.raggi@gmail.com>\br Roberto Raggi <roberto.raggi@gmail.com>\br
QtCreator/src/libs/3rdparty/cplusplus\br\br QtCreator/src/libs/3rdparty/cplusplus\br\br
\li \b{ANGLE Library (Windows)}
Used on Windows to implement OpenGL ES on top of DirectX.
The source code of ANGLE is part of the Qt libraries. For more
information about the licenses used in Qt GUI, see
\l{https://doc.qt.io/qt-5.11/licenses-used-in-qt.html#qt-gui}{Qt GUI}.
\l{https://spdx.org/licenses/BSD-3-Clause.html}
{BSD 3-clause "New" or "Revised" License}
\badcode
Copyright (C) 2002-2013 The ANGLE Project Authors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
Ltd., nor the names of their contributors may be used to endorse
or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
\endcode
\li \b{ANGLE Array Bounds Clamper for WebKit (Windows)}
Implements clamping of array indexing expressions during shader
translation.
Used on Windows to implement OpenGL ES on top of DirectX. Configure with
\c {-no-opengl}, or \c {-opengl desktop} to exclude.
The sources can be found in
\c qtbase/src/3rdparty/angle/src/third_party/compiler.
BSD 2-clause "Simplified" License.
\badcode
Copyright (C) 2012 Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, INC. OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\endcode
\li \b{ANGLE: Murmurhash (Windows)}
Used on Windows to implement OpenGL ES on top of DirectX. Configure
with \c {-no-opengl}, or \c {-opengl desktop} to exclude.
The sources can be found in
\c qtbase/src/3rdparty/angle/src/third_party/murmurhash.
\badcode
MurmurHash3 was written by Austin Appleby, and is placed in the public
domain. The author hereby disclaims copyright to this source code.
\endcode
Public Domain.
\li \b{ANGLE: Systeminfo (Windows)}
Used on Windows to implement OpenGL ES on top of DirectX. Configure
with \c {-no-opengl}, or \c {-opengl desktop} to exclude.
The sources can be found in
\c qtbase/src/3rdparty/angle/src/third_party/systeminfo.
BSD 2-clause "Simplified" License.
\badcode
Copyright (C) 2009 Apple Inc. All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\endcode
\li \b{ANGLE: trace_event (Windows)}
Used on Windows to implement OpenGL ES on top of DirectX. Configure
with \c {-no-opengl}, or \c {-opengl desktop} to exclude.
The sources can be found in
\c qtbase/src/3rdparty/angle/src/third_party/trace_event.
BSD 3-clause "New" or "Revised" License.
\badcode
Copyright 2013 The Chromium Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\endcode
\li \b{SQLite (version 3.8.10.2)} \li \b{SQLite (version 3.8.10.2)}
SQLite is a C-language library that implements a small, fast, SQLite is a C-language library that implements a small, fast,
@@ -578,14 +404,6 @@
\li \l{https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/3rdparty/sqlite} \li \l{https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/3rdparty/sqlite}
\endlist \endlist
\li \b{three.js}
Copyright (C) 2010-2015 three.js authors
MIT License.
share/qtcreator/templates/wizards/projects/qmake/qtcanvas3dapplication
\li \b{OpenSSL} \li \b{OpenSSL}
The OpenSSL toolkit stays under a double license, i.e. both the conditions of The OpenSSL toolkit stays under a double license, i.e. both the conditions of

View File

@@ -6,10 +6,10 @@ import qbs.Utilities
Module { Module {
Depends { name: "cpp"; required: false } Depends { name: "cpp"; required: false }
property string qtcreator_display_version: '11.0.2' property string qtcreator_display_version: '11.0.3'
property string ide_version_major: '11' property string ide_version_major: '11'
property string ide_version_minor: '0' property string ide_version_minor: '0'
property string ide_version_release: '2' property string ide_version_release: '3'
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.'
+ ide_version_release + ide_version_release

View File

@@ -283,13 +283,12 @@ def std_1_string_dumper_v1(d, value):
charType = value['__l']['__data_'].dereference().type charType = value['__l']['__data_'].dereference().type
D = None D = None
try: # LLDB if d.isLldb:
D = value[0][0][0][0] D = value[0][0][0][0]
except: # GDB elif d.isGdb:
try: # std::string D = value["__r_"].members(True)[0][0][0]
D = value[0].members(True)[0][0][0] else:
except: # std::u16string, std::u32string raise Exception("Unknown debugger (neither gdb nor lldb)")
D = value[2].members(True)[0][0][0]
layoutDecider = D[0][0] layoutDecider = D[0][0]
if not layoutDecider: if not layoutDecider:

View File

@@ -1,40 +1,86 @@
How To add translations to Qt Creator How To add translations to Qt Creator
===================================== =====================================
- Coordinate over the mailing list to avoid duplicate work. - Coordinate over the [mailing list][1] to avoid duplicate work.
- Read the instructions at http://wiki.qt.io/Qt_Localization - Read the instructions at http://wiki.qt.io/Qt_Localization
- Add your language to the `set(languages ...` line in `CMakeLists.txt`. Don't ## Preparation
qualify it with a country unless it is reasonable to expect country-specific
variants. Skip this step if updating an existing translation. - It is preferred that you work on the current stable branch. That usually is
the branch with the same major and minor version number as the most recent
stable release (not beta or RC) of Qt Creator.
- Configure a Qt Creator build directory with CMake. - Configure a Qt Creator build directory with CMake.
- Run `cmake --build . --target ts_<lang>`. ## Adding a new language
If your Qt version is too old, you may create a template by running `lconvert - Create a new translation file by running
--drop-translations qtcreator_de.ts -o qtcreator_<yours>.ts` and adjusting the
language attribute in the new .ts file. The downside of this method is
that you will not be translating the newest Creator sources (unless
qtcreator_de.ts was completely up-to-date). Of course, this method is not
applicable if you are updating an existing translation.
You may also request an up-to-date template from us. cmake --build . -target ts_untranslated
in the build directory. This generates a file
share/qtcreator/translations/qtcreator_untranslated.ts
in the source directory.
- Rename the file `qtcreator_untranslated.ts` to `qtcreator_<lang>.ts`. (Where
`<lang>` is the language specifier for the language you add. Don't qualify it
with a country unless it is reasonable to expect country-specific variants.)
- Add `<lang>` to the `set(languages ...` line in `CMakeLists.txt` in
this directory.
## Updating translations
- Run
cmake --build . --target ts_<lang>
in the build directory. This updates the `.ts` file for the language `<lang>`
in the source directory with the new and changed translatable strings.
It includes entries for obsolete (= removed) items and the source locations
of the translatable strings. These can be useful during the translation
process, but need to be removed before creating the commit (see below).
If you do not need or want this information during the translation process,
you can also directly run
cmake --build . --target ts_<lang>_cleaned
instead of the `ts_<lang>` target.
- Start Qt Linguist and translate the strings. - Start Qt Linguist and translate the strings.
Start with translations in contexts starting with "QtC::". These are the most
essential ones.
Do not forget to "accept" finalized translations with the "Done" or "Done and
Next" action in Linguist, to remove the `untranslated` state from translations
before submitting.
- Prepare for committing. You need to remove the obsolete items and location
information before the file can be submitted to the source repository. Do this
by running
cmake --build . --target ts_<lang>_cleaned
in the build directory.
- Create a commit: - Create a commit:
- Discard the modifications to any `.ts` files except yours - Discard the modifications to any `.ts` files except yours
- Create a commit with your file - Create a commit with your file
- If needed, amend the commit with the modified `CMakeLists.txt` file - If you added a new language, amend the commit with the modified
`CMakeLists.txt` file
- Follow http://wiki.qt.io/Qt_Contribution_Guidelines to post the change for - Follow http://wiki.qt.io/Qt_Contribution_Guidelines to post the change for
review. review.
- .qm files are generated as part of the regular build. *Note:* `.qm` files are generated as part of the regular build. They are not
submitted to the repository.
_Note:_ QmlDesigner contains code from the Gradient Editor of Qt Designer. If an *Note:* QmlDesigner contains code from the Gradient Editor of Qt Designer. If an
official translation of Qt for your language exists, you can re-use the official translation of Qt for your language exists, you can re-use the
translation of those messages by merging Qt Creator's and Qt Designer's translation of those messages by merging Qt Creator's and Qt Designer's
translation using `lconvert`: translation using `lconvert`:
@@ -46,3 +92,5 @@ Editor's translations and update the file, passing the additional option
`-noobsolete` to `lupdate` (by temporarily modifying `-noobsolete` to `lupdate` (by temporarily modifying
`<qtcreator>/cmake/QtCreatorTranslations.cmake`). This will remove the now `<qtcreator>/cmake/QtCreatorTranslations.cmake`). This will remove the now
redundant messages originating from Qt Designer. redundant messages originating from Qt Designer.
[1]: https://lists.qt-project.org/listinfo/localization

View File

@@ -12437,7 +12437,7 @@ Siehe auch die Einstellungen für Google Test.</translation>
</message> </message>
<message> <message>
<source>The remote executable must be set in order to run a custom remote run configuration.</source> <source>The remote executable must be set in order to run a custom remote run configuration.</source>
<translation>Die entfernte ausführbare Datei muss eingestellt sein um eine benutzerdefinierte enternte Ausführungskonfiguration zu verwenden.</translation> <translation>Die entfernte ausführbare Datei muss gesetzt sein, um eine benutzerdefinierte entfernte Ausführungskonfiguration zu verwenden.</translation>
</message> </message>
<message> <message>
<source>Custom Executable</source> <source>Custom Executable</source>
@@ -14425,7 +14425,7 @@ Zum Beispiel bewirkt die Angabe &quot;Revision: 15&quot; dass der Branch auf Rev
</message> </message>
<message> <message>
<source>Set as the default CMake Tool to use when creating a new kit or when no value is set.</source> <source>Set as the default CMake Tool to use when creating a new kit or when no value is set.</source>
<translation>Als vorgegebenes CMake-Werkzeug einstellen, das verwendet wird, wenn eine neues Kit erstellt wird oder kein Wert eingestellt ist.</translation> <translation>Als vorgegebenes CMake-Werkzeug einstellen, das verwendet wird, wenn ein neues Kit erstellt wird oder kein Wert gesetzt ist.</translation>
</message> </message>
<message> <message>
<source>Clone of %1</source> <source>Clone of %1</source>
@@ -14481,7 +14481,7 @@ Zum Beispiel bewirkt die Angabe &quot;Revision: 15&quot; dass der Branch auf Rev
</message> </message>
<message> <message>
<source>A CMake tool must be set up for building. Configure a CMake tool in the kit options.</source> <source>A CMake tool must be set up for building. Configure a CMake tool in the kit options.</source>
<translation>Zum Erstellen muss ein CMake-Werkzeug eingestellt sein. Die Konfiguration erfolgt in den Kit Einstellungen.</translation> <translation>Zum Erstellen muss ein CMake-Werkzeug gesetzt sein. Die Konfiguration erfolgt in den Kit Einstellungen.</translation>
</message> </message>
<message> <message>
<source>There is a CMakeCache.txt file in &quot;%1&quot;, which suggest an in-source build was done before. You are now building in &quot;%2&quot;, and the CMakeCache.txt file might confuse CMake.</source> <source>There is a CMakeCache.txt file in &quot;%1&quot;, which suggest an in-source build was done before. You are now building in &quot;%2&quot;, and the CMakeCache.txt file might confuse CMake.</source>
@@ -32854,11 +32854,11 @@ Möchten Sie sie überschreiben?</translation>
</message> </message>
<message> <message>
<source>No device chosen. Select %1.</source> <source>No device chosen. Select %1.</source>
<translation>Kein Gerät eingestellt. Wählen Sie %1 aus.</translation> <translation>Kein Gerät ausgewählt. Wählen Sie %1 aus.</translation>
</message> </message>
<message> <message>
<source>No device chosen. Enable developer mode on a device.</source> <source>No device chosen. Enable developer mode on a device.</source>
<translation>Kein Gerät eingestellt. Aktivieren Sie den Entwicklungsmodus auf einem Gerät.</translation> <translation>Kein Gerät ausgewählt. Aktivieren Sie den Entwicklungsmodus auf einem Gerät.</translation>
</message> </message>
<message> <message>
<source>No device available.</source> <source>No device available.</source>
@@ -34785,7 +34785,7 @@ Dies ist hilfreich, wenn das Build-Verzeichnis beschädigt ist oder das Projekt
</message> </message>
<message> <message>
<source>Set as the default Meson executable to use when creating a new kit or when no value is set.</source> <source>Set as the default Meson executable to use when creating a new kit or when no value is set.</source>
<translation>Als vorgegebenes Meson-Werkzeug einstellen, das verwendet wird, wenn eine neues Kit erstellt wird oder kein Wert eingestellt ist.</translation> <translation>Als vorgegebenes Meson-Werkzeug einstellen, das verwendet wird, wenn ein neues Kit erstellt wird oder kein Wert gesetzt ist.</translation>
</message> </message>
</context> </context>
<context> <context>
@@ -41386,7 +41386,7 @@ Was soll %1 tun?</translation>
</message> </message>
<message> <message>
<source>No device set.</source> <source>No device set.</source>
<translation>Es ist kein Gerät eingestellt.</translation> <translation>Es ist kein Gerät gesetzt.</translation>
</message> </message>
<message> <message>
<source>Device is incompatible with this kit.</source> <source>Device is incompatible with this kit.</source>
@@ -43230,7 +43230,7 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D
</message> </message>
<message> <message>
<source>&lt;b&gt;qmake:&lt;/b&gt; No Qt version set. Cannot run qmake.</source> <source>&lt;b&gt;qmake:&lt;/b&gt; No Qt version set. Cannot run qmake.</source>
<translation>&lt;b&gt;qmake:&lt;/b&gt; Es ist keine Qt-Version eingestellt. qmake kann nicht ausgeführt werden.</translation> <translation>&lt;b&gt;qmake:&lt;/b&gt; Es ist keine Qt-Version gesetzt. qmake kann nicht ausgeführt werden.</translation>
</message> </message>
<message> <message>
<source>&lt;b&gt;qmake:&lt;/b&gt; %1 %2</source> <source>&lt;b&gt;qmake:&lt;/b&gt; %1 %2</source>
@@ -46061,7 +46061,7 @@ Are you sure?</source>
</message> </message>
<message> <message>
<source>Remote path not set</source> <source>Remote path not set</source>
<translation>Der entfernte Pfad ist nicht eingestellt</translation> <translation>Der entfernte Pfad ist nicht gesetzt</translation>
</message> </message>
<message> <message>
<source>Executable on host:</source> <source>Executable on host:</source>
@@ -46983,7 +46983,7 @@ Zusätzlich wird die Verbindung zum Gerät getestet.</translation>
</message> </message>
<message> <message>
<source>No device configuration set.</source> <source>No device configuration set.</source>
<translation>Es ist keine Gerätekonfiguration eingestellt.</translation> <translation>Es ist keine Gerätekonfiguration gesetzt.</translation>
</message> </message>
<message> <message>
<source>Cannot deploy: %1</source> <source>Cannot deploy: %1</source>
@@ -47504,7 +47504,7 @@ Der Kontrollprozess konnte nicht gestartet werden.</translation>
</message> </message>
<message> <message>
<source>The remote executable must be set in order to run a custom remote run configuration.</source> <source>The remote executable must be set in order to run a custom remote run configuration.</source>
<translation>Die entfernte ausführbare Datei muss eingestellt sein um eine benutzerdefinierte enternte Ausführungskonfiguration zu verwenden.</translation> <translation>Die entfernte ausführbare Datei muss gesetzt sein um eine benutzerdefinierte entfernte Ausführungskonfiguration zu verwenden.</translation>
</message> </message>
<message> <message>
<source>Custom Executable</source> <source>Custom Executable</source>

File diff suppressed because it is too large Load Diff

View File

@@ -3020,6 +3020,11 @@ bool Parser::parseInitDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_sp
if (!_languageFeatures.cxx11Enabled || LA(2) == T_NUMERIC_LITERAL) { if (!_languageFeatures.cxx11Enabled || LA(2) == T_NUMERIC_LITERAL) {
parseInitializer(node->initializer, &node->equal_token); parseInitializer(node->initializer, &node->equal_token);
} else { } else {
if (LA(2) != T_NUMERIC_LITERAL && LA(2) != T_DEFAULT && LA(2) != T_DELETE) {
error(cursor(), "expected 'default', 'delete' or '0', got '%s'", tok(2).spell());
return false;
}
node->equal_token = consumeToken(); node->equal_token = consumeToken();
IdExpressionAST *id_expr = new (_pool) IdExpressionAST; IdExpressionAST *id_expr = new (_pool) IdExpressionAST;

View File

@@ -184,34 +184,16 @@ bool UnixPtyProcess::startProcess(const QString &shellPath,
m_readMasterNotify->disconnect(); m_readMasterNotify->disconnect();
}); });
QStringList defaultVars;
defaultVars.append("TERM=xterm-256color");
defaultVars.append("ITERM_PROFILE=Default");
defaultVars.append("XPC_FLAGS=0x0");
defaultVars.append("XPC_SERVICE_NAME=0");
defaultVars.append("LANG=en_US.UTF-8");
defaultVars.append("LC_ALL=en_US.UTF-8");
defaultVars.append("LC_CTYPE=UTF-8");
defaultVars.append("INIT_CWD=" + QCoreApplication::applicationDirPath());
defaultVars.append("COMMAND_MODE=unix2003");
defaultVars.append("COLORTERM=truecolor");
QStringList varNames; QStringList varNames;
foreach (QString line, environment) { foreach (QString line, environment) {
varNames.append(line.split("=").first()); varNames.append(line.split("=").first());
} }
//append default env vars only if they don't exists in current env
foreach (QString defVar, defaultVars) {
if (!varNames.contains(defVar.split("=").first()))
environment.append(defVar);
}
QProcessEnvironment envFormat; QProcessEnvironment envFormat;
foreach (QString line, environment) { foreach (QString line, environment) {
envFormat.insert(line.split("=").first(), line.split("=").last()); envFormat.insert(line.split("=").first(), line.split("=").last());
} }
m_shellProcess.setWorkingDirectory(workingDir); m_shellProcess.setWorkingDirectory(workingDir);
m_shellProcess.setProcessEnvironment(envFormat); m_shellProcess.setProcessEnvironment(envFormat);
m_shellProcess.setReadChannel(QProcess::StandardOutput); m_shellProcess.setReadChannel(QProcess::StandardOutput);

View File

@@ -2053,14 +2053,14 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
return nullptr; return nullptr;
if (!value) { if (!value) {
// We omit M16 messages if the type using ImmediateProperties // We omit M16 messages if the enclosing type have ImmediateProperties classinfo.
// Ideally, we should obtain them through metaobject information // Ideally, we should get this information from metaobject by checking the index
const bool omitMessage = !m_typeStack.isEmpty() // metaObject->indexOfClassInfo("ImmediatePropertyNames"), for now it's hard coded.
&& ((m_typeStack.last() == "PropertyChanges") if ( !m_typeStack.isEmpty()
|| m_typeStack.last() == "Binding") && ((m_typeStack.last() != "PropertyChanges")
&& !m_idStack.isEmpty() && m_idStack.last().contains(propertyName); && m_typeStack.last() != "Binding")) {
if (!omitMessage)
addMessage(ErrInvalidPropertyName, id->identifierToken, propertyName); addMessage(ErrInvalidPropertyName, id->identifierToken, propertyName);
}
return nullptr; return nullptr;
} }

View File

@@ -884,6 +884,9 @@ bool UnixDeviceFileAccess::isFile(const FilePath &filePath) const
bool UnixDeviceFileAccess::isDirectory(const FilePath &filePath) const bool UnixDeviceFileAccess::isDirectory(const FilePath &filePath) const
{ {
if (filePath.isRootPath())
return true;
const QString path = filePath.path(); const QString path = filePath.path();
return runInShellSuccess({"test", {"-d", path}, OsType::OsTypeLinux}); return runInShellSuccess({"test", {"-d", path}, OsType::OsTypeLinux});
} }

View File

@@ -111,8 +111,6 @@ expected_str<qint64> ProcessStubCreator::startStubProcess(const ProcessSetupData
if (detached) if (detached)
QObject::connect(process, &Process::done, process, &Process::deleteLater); QObject::connect(process, &Process::done, process, &Process::deleteLater);
QObject::connect(process, &Process::done, m_interface, &TerminalInterface::onStubExited);
process->setWorkingDirectory(setupData.m_workingDirectory); process->setWorkingDirectory(setupData.m_workingDirectory);
if constexpr (HostOsInfo::isWindowsHost()) { if constexpr (HostOsInfo::isWindowsHost()) {

View File

@@ -83,7 +83,7 @@ QList<ITestConfiguration *> CTestTreeItem::testConfigurationsFor(const QStringLi
if (!project) if (!project)
return {}; return {};
const ProjectExplorer::Target *target = project->targets().value(0); const ProjectExplorer::Target *target = ProjectExplorer::ProjectManager::startupTarget();
if (!target) if (!target)
return {}; return {};

View File

@@ -184,15 +184,16 @@ static QString initialStagingDir(Kit *kit)
static bool supportsStageForInstallation(const Kit *kit) static bool supportsStageForInstallation(const Kit *kit)
{ {
IDeviceConstPtr runDevice = DeviceKitAspect::device(kit); IDeviceConstPtr runDevice = DeviceKitAspect::device(kit);
Id runDeviceType = DeviceTypeKitAspect::deviceTypeId(kit);
IDeviceConstPtr buildDevice = BuildDeviceKitAspect::device(kit); IDeviceConstPtr buildDevice = BuildDeviceKitAspect::device(kit);
QTC_ASSERT(runDevice, return false); QTC_ASSERT(runDeviceType.isValid(), return false);
QTC_ASSERT(buildDevice, return false); QTC_ASSERT(buildDevice, return false);
return runDevice->id() != buildDevice->id() return (!runDevice || runDevice->id() != buildDevice->id())
&& runDevice->type() != Android::Constants::ANDROID_DEVICE_TYPE && runDeviceType != Android::Constants::ANDROID_DEVICE_TYPE
&& runDevice->type() != Ios::Constants::IOS_DEVICE_TYPE && runDeviceType != Ios::Constants::IOS_DEVICE_TYPE
&& runDevice->type() != Ios::Constants::IOS_SIMULATOR_TYPE && runDeviceType != Ios::Constants::IOS_SIMULATOR_TYPE
&& runDevice->type() != BareMetal::Constants::BareMetalOsType && runDeviceType != BareMetal::Constants::BareMetalOsType
&& runDevice->type() != WebAssembly::Constants::WEBASSEMBLY_DEVICE_TYPE; && runDeviceType != WebAssembly::Constants::WEBASSEMBLY_DEVICE_TYPE;
} }
CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) : CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) :

View File

@@ -272,6 +272,8 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP
const int targetDefinitionLine = target.backtrace.last().line; const int targetDefinitionLine = target.backtrace.last().line;
// Have a fresh look at the CMake file, not relying on a cached value // Have a fresh look at the CMake file, not relying on a cached value
Core::DocumentManager::saveModifiedDocumentSilently(
Core::DocumentModel::documentForFilePath(targetCMakeFile));
expected_str<QByteArray> fileContent = targetCMakeFile.fileContents(); expected_str<QByteArray> fileContent = targetCMakeFile.fileContents();
cmListFile cmakeListFile; cmListFile cmakeListFile;
std::string errorString; std::string errorString;
@@ -397,6 +399,8 @@ CMakeBuildSystem::projectFileArgumentPosition(const QString &targetName, const Q
const FilePath targetCMakeFile = target.backtrace.last().path; const FilePath targetCMakeFile = target.backtrace.last().path;
// Have a fresh look at the CMake file, not relying on a cached value // Have a fresh look at the CMake file, not relying on a cached value
Core::DocumentManager::saveModifiedDocumentSilently(
Core::DocumentModel::documentForFilePath(targetCMakeFile));
expected_str<QByteArray> fileContent = targetCMakeFile.fileContents(); expected_str<QByteArray> fileContent = targetCMakeFile.fileContents();
cmListFile cmakeListFile; cmListFile cmakeListFile;
std::string errorString; std::string errorString;
@@ -657,7 +661,7 @@ FilePaths CMakeBuildSystem::filesGeneratedFrom(const FilePath &sourceFile) const
const QString generatedFileName = "ui_" + sourceFile.completeBaseName() + ".h"; const QString generatedFileName = "ui_" + sourceFile.completeBaseName() + ".h";
auto targetNode = this->project()->nodeForFilePath(sourceFile); auto targetNode = this->project()->nodeForFilePath(sourceFile);
while (!dynamic_cast<const CMakeTargetNode *>(targetNode)) while (targetNode && !dynamic_cast<const CMakeTargetNode *>(targetNode))
targetNode = targetNode->parentFolderNode(); targetNode = targetNode->parentFolderNode();
FilePaths generatedFilePaths; FilePaths generatedFilePaths;

View File

@@ -180,10 +180,10 @@ QVector<FolderNode::LocationInfo> extractBacktraceInformation(const BacktraceInf
return info; return info;
} }
static bool isChildOf(const FilePath &path, const QStringList &prefixes) static bool isChildOf(const FilePath &path, const FilePaths &prefixes)
{ {
for (const QString &prefix : prefixes) for (const FilePath &prefix : prefixes)
if (path.isChildOf(FilePath::fromString(prefix))) if (path == prefix || path.isChildOf(prefix))
return true; return true;
return false; return false;
} }

View File

@@ -35,7 +35,7 @@ const QStringList CMAKE_QUERY_FILENAMES = {"cache-v2", "codemodel-v2", "cmakeFil
// Helper: // Helper:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
static FilePath cmakeReplyDirectory(const FilePath &buildDirectory) FilePath FileApiParser::cmakeReplyDirectory(const FilePath &buildDirectory)
{ {
return buildDirectory.pathAppended(CMAKE_RELATIVE_REPLY_PATH); return buildDirectory.pathAppended(CMAKE_RELATIVE_REPLY_PATH);
} }
@@ -795,7 +795,7 @@ FilePath FileApiDetails::ReplyFileContents::jsonFile(const QString &kind, const
// FileApi: // FileApi:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
bool FileApiParser::setupCMakeFileApi(const FilePath &buildDirectory, Utils::FileSystemWatcher &watcher) bool FileApiParser::setupCMakeFileApi(const FilePath &buildDirectory)
{ {
// So that we have a directory to watch. // So that we have a directory to watch.
buildDirectory.pathAppended(CMAKE_RELATIVE_REPLY_PATH).ensureWritableDir(); buildDirectory.pathAppended(CMAKE_RELATIVE_REPLY_PATH).ensureWritableDir();
@@ -818,7 +818,6 @@ bool FileApiParser::setupCMakeFileApi(const FilePath &buildDirectory, Utils::Fil
} }
} }
watcher.addDirectory(cmakeReplyDirectory(buildDirectory).path(), FileSystemWatcher::WatchAllChanges);
return true; return true;
} }
@@ -842,7 +841,6 @@ FileApiData FileApiParser::parseData(QPromise<std::shared_ptr<FileApiQtcData>> &
QString &errorMessage) QString &errorMessage)
{ {
QTC_CHECK(errorMessage.isEmpty()); QTC_CHECK(errorMessage.isEmpty());
QTC_CHECK(!replyFilePath.needsDevice());
const FilePath replyDir = replyFilePath.parentDir(); const FilePath replyDir = replyFilePath.parentDir();
FileApiData result; FileApiData result;

View File

@@ -227,9 +227,9 @@ public:
const QString &cmakeBuildType, const QString &cmakeBuildType,
QString &errorMessage); QString &errorMessage);
static bool setupCMakeFileApi(const Utils::FilePath &buildDirectory, static bool setupCMakeFileApi(const Utils::FilePath &buildDirectory);
Utils::FileSystemWatcher &watcher);
static Utils::FilePath cmakeReplyDirectory(const Utils::FilePath &buildDirectory);
static Utils::FilePaths cmakeQueryFilePaths(const Utils::FilePath &buildDirectory); static Utils::FilePaths cmakeQueryFilePaths(const Utils::FilePath &buildDirectory);
static Utils::FilePath scanForCMakeReplyFile(const Utils::FilePath &buildDirectory); static Utils::FilePath scanForCMakeReplyFile(const Utils::FilePath &buildDirectory);

View File

@@ -59,7 +59,7 @@ void FileApiReader::setParameters(const BuildDirParameters &p)
// Reset watcher: // Reset watcher:
m_watcher.clear(); m_watcher.clear();
FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory, m_watcher); FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory);
resetData(); resetData();
} }
@@ -361,7 +361,10 @@ void FileApiReader::cmakeFinishedState(int exitCode)
if (m_lastCMakeExitCode != 0) if (m_lastCMakeExitCode != 0)
makeBackupConfiguration(false); makeBackupConfiguration(false);
FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory, m_watcher); FileApiParser::setupCMakeFileApi(m_parameters.buildDirectory);
m_watcher.addDirectory(FileApiParser::cmakeReplyDirectory(m_parameters.buildDirectory).path(),
FileSystemWatcher::WatchAllChanges);
endState(FileApiParser::scanForCMakeReplyFile(m_parameters.buildDirectory), endState(FileApiParser::scanForCMakeReplyFile(m_parameters.buildDirectory),
m_lastCMakeExitCode != 0); m_lastCMakeExitCode != 0);

View File

@@ -281,6 +281,8 @@ void CompilerOptionsBuilderTest::testClangHeadersAndCppIncludePathsOrderLinux()
t.builtIn("/usr/local/include"), t.builtIn("/usr/local/include"),
t.builtIn("/usr/lib/gcc/x86_64-linux-gnu/4.8/include"), t.builtIn("/usr/lib/gcc/x86_64-linux-gnu/4.8/include"),
t.builtIn("/usr/include/x86_64-linux-gnu"), t.builtIn("/usr/include/x86_64-linux-gnu"),
t.builtIn("/usr/lib64/clang/16/include"),
t.builtIn("/usr/lib/clang/15.0.7/include"),
t.builtIn("/usr/include")}; t.builtIn("/usr/include")};
CompilerOptionsBuilder compilerOptionsBuilder(t.finalize(), UseSystemHeader::No, CompilerOptionsBuilder compilerOptionsBuilder(t.finalize(), UseSystemHeader::No,
UseTweakedHeaderPaths::Yes, UseLanguageDefines::No, UseBuildSystemWarnings::No, UseTweakedHeaderPaths::Yes, UseLanguageDefines::No, UseBuildSystemWarnings::No,

View File

@@ -104,7 +104,7 @@ bool isClangSystemHeaderPath(const HeaderPath &headerPath)
// For example GCC on macOS uses system clang include path which makes clang code model // For example GCC on macOS uses system clang include path which makes clang code model
// include incorrect system headers. // include incorrect system headers.
static const QRegularExpression clangIncludeDir( static const QRegularExpression clangIncludeDir(
R"(\A.*/lib\d*/clang/\d+\.\d+(\.\d+)?/include\z)"); R"(\A.*/lib\d*/clang/\d+(\.\d+){0,2}/include\z)");
return clangIncludeDir.match(headerPath.path).hasMatch(); return clangIncludeDir.match(headerPath.path).hasMatch();
} }

View File

@@ -162,8 +162,11 @@ void CtfVisualizerTool::loadJson()
auto *task = new QFuture<void>(futureInterface); auto *task = new QFuture<void>(futureInterface);
QThread *thread = QThread::create([this, filename, futureInterface]() { QThread *thread = QThread::create([this, filename, futureInterface]() {
m_traceManager->load(filename); try {
m_traceManager->load(filename);
} catch (...) {
// nlohmann::json can throw exceptions when requesting type that is wrong
}
m_modelAggregator->moveToThread(QApplication::instance()->thread()); m_modelAggregator->moveToThread(QApplication::instance()->thread());
m_modelAggregator->setParent(this); m_modelAggregator->setParent(this);
futureInterface->reportFinished(); futureInterface->reportFinished();

View File

@@ -1450,9 +1450,11 @@ void GdbEngine::handleStop2(const GdbMi &data)
void GdbEngine::handleStop3() void GdbEngine::handleStop3()
{ {
DebuggerCommand cmd("-thread-info", Discardable); if (!terminal() || state() != InferiorRunOk) {
cmd.callback = CB(handleThreadInfo); DebuggerCommand cmd("-thread-info", Discardable);
runCommand(cmd); cmd.callback = CB(handleThreadInfo);
runCommand(cmd);
}
} }
void GdbEngine::handleShowVersion(const DebuggerResponse &response) void GdbEngine::handleShowVersion(const DebuggerResponse &response)

View File

@@ -120,16 +120,15 @@ public:
applyCurrentSettings(); applyCurrentSettings();
LanguageClientManager::applySettings(); LanguageClientManager::applySettings();
for (BaseSettings *setting : m_model.removed()) { for (BaseSettings *setting : m_settings.removed()) {
for (Client *client : LanguageClientManager::clientsForSetting(setting)) for (Client *client : LanguageClientManager::clientsForSetting(setting))
LanguageClientManager::shutdownClient(client); LanguageClientManager::shutdownClient(client);
} }
int row = currentRow(); int row = currentRow();
m_model.reset(LanguageClientManager::currentSettings()); m_settings.reset(LanguageClientManager::currentSettings());
resetCurrentSettings(row); resetCurrentSettings(row);
} }
void finish() void finish()
{ {
m_settings.reset(LanguageClientManager::currentSettings()); m_settings.reset(LanguageClientManager::currentSettings());
@@ -148,7 +147,6 @@ private:
LanguageClientSettingsModel &m_settings; LanguageClientSettingsModel &m_settings;
QSet<QString> &m_changedSettings; QSet<QString> &m_changedSettings;
LanguageClientSettingsModel m_model;
}; };
QMap<Utils::Id, ClientType> &clientTypes() QMap<Utils::Id, ClientType> &clientTypes()
@@ -302,8 +300,6 @@ LanguageClientSettingsPage::LanguageClientSettingsPage()
void LanguageClientSettingsPage::init() void LanguageClientSettingsPage::init()
{ {
m_model.reset(LanguageClientSettings::fromSettings(Core::ICore::settings())); m_model.reset(LanguageClientSettings::fromSettings(Core::ICore::settings()));
apply();
finish();
} }
QList<BaseSettings *> LanguageClientSettingsPage::settings() const QList<BaseSettings *> LanguageClientSettingsPage::settings() const
@@ -603,6 +599,7 @@ static LanguageClientSettingsPage &settingsPage()
void LanguageClientSettings::init() void LanguageClientSettings::init()
{ {
settingsPage().init(); settingsPage().init();
LanguageClientManager::applySettings();
} }
QList<BaseSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn) QList<BaseSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn)

View File

@@ -152,7 +152,7 @@ FilePath SysRootKitAspect::sysRoot(const Kit *k)
return FilePath(); return FilePath();
if (!k->value(SysRootKitAspect::id()).toString().isEmpty()) if (!k->value(SysRootKitAspect::id()).toString().isEmpty())
return FilePath::fromString(k->value(SysRootKitAspect::id()).toString()); return FilePath::fromSettings(k->value(SysRootKitAspect::id()));
for (ToolChain *tc : ToolChainKitAspect::toolChains(k)) { for (ToolChain *tc : ToolChainKitAspect::toolChains(k)) {
if (!tc->sysRoot().isEmpty()) if (!tc->sysRoot().isEmpty())

View File

@@ -584,6 +584,8 @@ public:
void setKit(Kit *k) void setKit(Kit *k)
{ {
qDeleteAll(m_labels);
m_labels.clear();
qDeleteAll(m_widgets); qDeleteAll(m_widgets);
m_widgets.clear(); m_widgets.clear();
@@ -596,8 +598,10 @@ public:
for (KitAspect *aspect : KitManager::kitAspects()) { for (KitAspect *aspect : KitManager::kitAspects()) {
if (k && k->isMutable(aspect->id())) { if (k && k->isMutable(aspect->id())) {
KitAspectWidget *widget = aspect->createConfigWidget(k); KitAspectWidget *widget = aspect->createConfigWidget(k);
auto label = new QLabel(aspect->displayName());
m_labels << label;
m_widgets << widget; m_widgets << widget;
grid.addItems({aspect->displayName(), widget, Layouting::br}); grid.addItems({label, widget, Layouting::br});
} }
} }
grid.attachTo(this); grid.attachTo(this);
@@ -638,6 +642,7 @@ private:
} }
Kit *m_kit = nullptr; Kit *m_kit = nullptr;
QList<QWidget *> m_labels;
QList<KitAspectWidget *> m_widgets; QList<KitAspectWidget *> m_widgets;
}; };

View File

@@ -623,6 +623,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
painter->save(); painter->save();
m_doc.setHtml(options.text); m_doc.setHtml(options.text);
m_doc.setTextWidth(options.rect.width());
options.text = ""; options.text = "";
options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter); options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter);
painter->translate(options.rect.left(), options.rect.top()); painter->translate(options.rect.left(), options.rect.top());
@@ -650,9 +651,12 @@ QSize TaskDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelInd
return QStyledItemDelegate::sizeHint(option, index); return QStyledItemDelegate::sizeHint(option, index);
QStyleOptionViewItem options = option; QStyleOptionViewItem options = option;
options.initFrom(options.widget);
initStyleOption(&options, index); initStyleOption(&options, index);
m_doc.setHtml(options.text); m_doc.setHtml(options.text);
m_doc.setTextWidth(options.rect.width()); const auto view = qobject_cast<const QTreeView *>(options.widget);
QTC_ASSERT(view, return {});
m_doc.setTextWidth(view->width() * 0.85 - view->indentation());
return QSize(m_doc.idealWidth(), m_doc.size().height()); return QSize(m_doc.idealWidth(), m_doc.size().height());
} }

View File

@@ -512,7 +512,7 @@ QWidget *QMakeStep::createConfigWidget()
connect(abisListWidget, &QListWidget::itemChanged, this, [this] { connect(abisListWidget, &QListWidget::itemChanged, this, [this] {
if (m_ignoreChanges.isLocked()) if (m_ignoreChanges.isLocked())
return; return;
updateAbiWidgets(); abisChanged();
if (QmakeBuildConfiguration *bc = qmakeBuildConfiguration()) if (QmakeBuildConfiguration *bc = qmakeBuildConfiguration())
BuildManager::buildLists({bc->cleanSteps()}); BuildManager::buildLists({bc->cleanSteps()});
}); });

View File

@@ -321,6 +321,8 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
m_timeoutSpinBox->setValue(sshParams.timeout); m_timeoutSpinBox->setValue(sshParams.timeout);
m_userLineEdit->setText(sshParams.userName()); m_userLineEdit->setText(sshParams.userName());
m_keyFileLineEdit->setFilePath(sshParams.privateKeyFile); m_keyFileLineEdit->setFilePath(sshParams.privateKeyFile);
m_keyFileLineEdit->setEnabled(
sshParams.authenticationType == SshParameters::AuthenticationTypeSpecificKey);
m_gdbServerLineEdit->setFilePath(device()->debugServerPath()); m_gdbServerLineEdit->setFilePath(device()->debugServerPath());
m_qmlRuntimeLineEdit->setFilePath(device()->qmlRunCommand()); m_qmlRuntimeLineEdit->setFilePath(device()->qmlRunCommand());

View File

@@ -1284,8 +1284,10 @@ private:
QByteArray batchData; QByteArray batchData;
const FilePaths dirs = dirsToCreate(m_setup.m_files); const FilePaths dirs = dirsToCreate(m_setup.m_files);
for (const FilePath &dir : dirs) for (const FilePath &dir : dirs) {
batchData += "-mkdir " + ProcessArgs::quoteArgUnix(dir.path()).toLocal8Bit() + '\n'; if (!dir.exists())
batchData += "-mkdir " + ProcessArgs::quoteArgUnix(dir.path()).toLocal8Bit() + '\n';
}
for (const FileToTransfer &file : m_setup.m_files) { for (const FileToTransfer &file : m_setup.m_files) {
FilePath sourceFileOrLinkTarget = file.m_source; FilePath sourceFileOrLinkTarget = file.m_source;
@@ -1459,6 +1461,11 @@ private:
FileTransferInterface *LinuxDevice::createFileTransferInterface( FileTransferInterface *LinuxDevice::createFileTransferInterface(
const FileTransferSetupData &setup) const const FileTransferSetupData &setup) const
{ {
if (Utils::anyOf(setup.m_files,
[](const FileToTransfer &f) { return f.m_source.needsDevice(); })) {
return new GenericTransferImpl(setup);
}
switch (setup.m_method) { switch (setup.m_method) {
case FileTransferMethod::Sftp: return new SftpTransferImpl(setup, sharedFromThis()); case FileTransferMethod::Sftp: return new SftpTransferImpl(setup, sharedFromThis());
case FileTransferMethod::Rsync: return new RsyncTransferImpl(setup, sharedFromThis()); case FileTransferMethod::Rsync: return new RsyncTransferImpl(setup, sharedFromThis());

View File

@@ -89,8 +89,13 @@ GroupItem RsyncDeployStep::mkdirTask()
{ {
const auto setupHandler = [this](Process &process) { const auto setupHandler = [this](Process &process) {
QStringList remoteDirs; QStringList remoteDirs;
for (const FileToTransfer &file : std::as_const(m_files)) for (const FileToTransfer &file : std::as_const(m_files)) {
remoteDirs << file.m_target.parentDir().path(); const QString parentDir = file.m_target.parentDir().path();
if (!parentDir.isEmpty())
remoteDirs << parentDir;
}
if (remoteDirs.isEmpty())
return SetupResult::StopWithDone;
remoteDirs.sort(); remoteDirs.sort();
remoteDirs.removeDuplicates(); remoteDirs.removeDuplicates();
process.setCommand({deviceConfiguration()->filePath("mkdir"), process.setCommand({deviceConfiguration()->filePath("mkdir"),
@@ -98,6 +103,7 @@ GroupItem RsyncDeployStep::mkdirTask()
connect(&process, &Process::readyReadStandardError, this, [this, proc = &process] { connect(&process, &Process::readyReadStandardError, this, [this, proc = &process] {
handleStdErrData(QString::fromLocal8Bit(proc->readAllRawStandardError())); handleStdErrData(QString::fromLocal8Bit(proc->readAllRawStandardError()));
}); });
return SetupResult::Continue;
}; };
const auto errorHandler = [this](const Process &process) { const auto errorHandler = [this](const Process &process) {
QString finalMessage = process.errorString(); QString finalMessage = process.errorString();

View File

@@ -149,6 +149,13 @@ void TerminalWidget::setupPty()
Environment env = m_openParameters.environment.value_or(Environment{}) Environment env = m_openParameters.environment.value_or(Environment{})
.appliedToEnvironment(shellCommand.executable().deviceEnvironment()); .appliedToEnvironment(shellCommand.executable().deviceEnvironment());
// Set some useful defaults
env.setFallback("TERM", "xterm-256color");
env.setFallback("TERM_PROGRAM", QCoreApplication::applicationName());
env.setFallback("COLORTERM", "truecolor");
env.setFallback("COMMAND_MODE", "unix2003");
env.setFallback("INIT_CWD", QCoreApplication::applicationDirPath());
// For git bash on Windows // For git bash on Windows
env.prependOrSetPath(shellCommand.executable().parentDir()); env.prependOrSetPath(shellCommand.executable().parentDir());
if (env.hasKey("CLINK_NOAUTORUN")) if (env.hasKey("CLINK_NOAUTORUN"))

View File

@@ -25,6 +25,7 @@
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
#include <sys/ptrace.h> #include <sys/ptrace.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/prctl.h>
#endif #endif
#include <iostream> #include <iostream>
@@ -210,6 +211,38 @@ void onInferiorErrorOccurered(QProcess::ProcessError error)
qCWarning(log) << "Inferior error: " << error << inferiorProcess.errorString(); qCWarning(log) << "Inferior error: " << error << inferiorProcess.errorString();
} }
#ifdef Q_OS_LINUX
QString statusToString(int status)
{
if (WIFEXITED(status))
return QString("exit, status=%1").arg(WEXITSTATUS(status));
else if (WIFSIGNALED(status))
return QString("Killed by: %1").arg(WTERMSIG(status));
else if (WIFSTOPPED(status)) {
return QString("Stopped by: %1").arg(WSTOPSIG(status));
} else if (WIFCONTINUED(status))
return QString("Continued");
return QString("Unknown status");
}
bool waitFor(int signalToWaitFor)
{
int status = 0;
waitpid(inferiorId, &status, WUNTRACED);
if (!WIFSTOPPED(status) || WSTOPSIG(status) != signalToWaitFor) {
qCCritical(log) << "Unexpected status during startup:" << statusToString(status)
<< ", aborting";
sendCrash(0xFF);
return false;
}
return true;
}
#endif
void onInferiorStarted() void onInferiorStarted()
{ {
inferiorId = inferiorProcess.processId(); inferiorId = inferiorProcess.processId();
@@ -222,23 +255,21 @@ void onInferiorStarted()
if (!debugMode) if (!debugMode)
sendPid(inferiorId); sendPid(inferiorId);
#else #else
qCInfo(log) << "Detaching ...";
ptrace(PTRACE_DETACH, inferiorId, 0, SIGSTOP);
// Wait until the process actually finished detaching if (debugMode) {
int status = 0; qCInfo(log) << "Waiting for SIGTRAP from inferiors execve ...";
waitpid(inferiorId, &status, WUNTRACED); if (!waitFor(SIGTRAP))
if (log().isInfoEnabled()) { return;
if (WIFEXITED(status))
qCInfo(log) << "inferior exited, status=" << WEXITSTATUS(status); qCInfo(log) << "Detaching ...";
else if (WIFSIGNALED(status)) ptrace(PTRACE_DETACH, inferiorId, 0, SIGSTOP);
qCInfo(log) << "inferior killed by signal" << WTERMSIG(status);
else if (WIFSTOPPED(status)) // Wait until the process actually finished detaching
qCInfo(log) << "inferior stopped by signal" << WSTOPSIG(status); if (!waitFor(SIGSTOP))
else if (WIFCONTINUED(status)) return;
qCInfo(log) << "inferior continued";
} }
qCInfo(log) << "Sending pid:" << inferiorId;
sendPid(inferiorId); sendPid(inferiorId);
#endif #endif
} }
@@ -258,7 +289,11 @@ void setupUnixInferior()
}); });
#else #else
// PTRACE_TRACEME will stop execution of the child process as soon as execve is called. // PTRACE_TRACEME will stop execution of the child process as soon as execve is called.
inferiorProcess.setChildProcessModifier([] { ptrace(PTRACE_TRACEME, 0, 0, 0); }); inferiorProcess.setChildProcessModifier([] {
ptrace(PTRACE_TRACEME, 0, 0, 0);
// Disable attachment restrictions so we are not bound by yama/ptrace_scope mode 1
prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY);
});
#endif #endif
} }
#endif #endif

View File

@@ -686,7 +686,7 @@ QVariantMap AddKitData::addKit(const QVariantMap &map,
if (!m_buildDevice.isNull()) if (!m_buildDevice.isNull())
data << KeyValuePair({kit, DATA, BUILDDEVICE_ID}, QVariant(m_buildDevice)); data << KeyValuePair({kit, DATA, BUILDDEVICE_ID}, QVariant(m_buildDevice));
if (!m_sysRoot.isNull()) if (!m_sysRoot.isNull())
data << KeyValuePair({kit, DATA, SYSROOT}, QVariant(QDir::cleanPath(m_sysRoot))); data << KeyValuePair({kit, DATA, SYSROOT}, QVariant(cleanPath(m_sysRoot)));
for (auto i = m_tcs.constBegin(); i != m_tcs.constEnd(); ++i) for (auto i = m_tcs.constBegin(); i != m_tcs.constEnd(); ++i)
data << KeyValuePair({kit, DATA, TOOLCHAIN, i.key()}, QVariant(i.value())); data << KeyValuePair({kit, DATA, TOOLCHAIN, i.key()}, QVariant(i.value()));
if (!qtId.isNull()) if (!qtId.isNull())

View File

@@ -190,6 +190,7 @@ private slots:
void enumDeclaration(); void enumDeclaration();
void invalidEnumClassDeclaration(); void invalidEnumClassDeclaration();
void invalidEnumWithDestructorId(); void invalidEnumWithDestructorId();
void invalidFunctionInitializer();
}; };
void tst_AST::gcc_attributes_1() void tst_AST::gcc_attributes_1()
@@ -2052,6 +2053,14 @@ void tst_AST::invalidEnumWithDestructorId()
QVERIFY(diag.errorCount != 0); QVERIFY(diag.errorCount != 0);
} }
void tst_AST::invalidFunctionInitializer()
{
QSharedPointer<TranslationUnit> unit(parse(
"int main() { a t=b; c d(e)=\"\"; }", TranslationUnit::ParseTranlationUnit, false, false, true));
QVERIFY(diag.errorCount != 0);
}
void tst_AST::initTestCase() void tst_AST::initTestCase()
{ {
control.setDiagnosticClient(&diag); control.setDiagnosticClient(&diag);

View File

@@ -28,11 +28,22 @@ Window {
Text { Text {
id: innerText id: innerText
} }
states: State { states: [
name: "widerText" State {
PropertyChanges { myText.width: undefined } name: "widerText"
AnchorChanges { innerRect.width: undefined } // 16 29 37 PropertyChanges { myText.width: undefined }
} AnchorChanges { innerRect.width: undefined } // 16 29 37
},
State {
when: root.visible
PropertyChanges {
// change an object property that is not an ancestor
innerRect {
color: "blue"
}
}
}
]
} }
Binding {rect.width: innerText.width} Binding {rect.width: innerText.width}