Merge remote-tracking branch 'origin/13.0' into qds/dev
Change-Id: I242c01e82fc1b0db1f5e88c35d526f91dd022337
@@ -13,20 +13,22 @@
|
||||
# [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
|
||||
# [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
#
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/clang-format.json
|
||||
#
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignConsecutiveDeclarations: None
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AlignOperands: true
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
@@ -108,7 +110,7 @@ SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInAngles: Never
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
|
49
.github/workflows/build_cmake.yml
vendored
@@ -14,7 +14,7 @@ env:
|
||||
CMAKE_VERSION: 3.21.1
|
||||
NINJA_VERSION: 1.10.2
|
||||
BUILD_TYPE: Release
|
||||
CCACHE_VERSION: 4.6
|
||||
CCACHE_VERSION: 4.9
|
||||
QT_MIRRORS: download.qt.io;mirrors.ocf.berkeley.edu/qt;ftp.fau.de/qtproject;mirror.bit.edu.cn/qtproject
|
||||
|
||||
jobs:
|
||||
@@ -49,7 +49,8 @@ jobs:
|
||||
}
|
||||
- {
|
||||
name: "macOS Latest Clang", artifact: "macos-universal",
|
||||
os: macos-latest,
|
||||
# TODO: move back to macos-latest when macos-latest is 13 or higher
|
||||
os: macos-13,
|
||||
cc: "clang", cxx: "clang++"
|
||||
}
|
||||
|
||||
@@ -437,15 +438,32 @@ jobs:
|
||||
- name: Download ccache
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
set(ccache_url "https://github.com/cristianadam/ccache/releases/download/v$ENV{CCACHE_VERSION}/${{ runner.os }}.tar.xz")
|
||||
foreach(retry RANGE 10)
|
||||
file(DOWNLOAD "${ccache_url}" ./ccache.tar.xz SHOW_PROGRESS)
|
||||
file(SIZE ./ccache.tar.xz fileSize)
|
||||
if (fileSize GREATER 0)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./ccache.tar.xz)
|
||||
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||
set(ccache_dir "ccache-$ENV{CCACHE_VERSION}-windows-x86_64")
|
||||
set(ccache_archive "${ccache_dir}.zip")
|
||||
elseif ("${{ runner.os }}" STREQUAL "Linux")
|
||||
set(ccache_dir "ccache-$ENV{CCACHE_VERSION}-linux-x86_64")
|
||||
set(ccache_archive "${ccache_dir}.tar.xz")
|
||||
elseif ("${{ runner.os }}" STREQUAL "macOS")
|
||||
set(ccache_dir "ccache-$ENV{CCACHE_VERSION}-darwin")
|
||||
set(ccache_archive "${ccache_dir}.tar.gz")
|
||||
endif()
|
||||
|
||||
set(ccache_url "https://github.com/ccache/ccache/releases/download/v$ENV{CCACHE_VERSION}/${ccache_archive}")
|
||||
file(DOWNLOAD "${ccache_url}" ./${ccache_archive} SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./${ccache_archive})
|
||||
|
||||
# Add to PATH environment variable
|
||||
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/${ccache_dir}" ccache_dir)
|
||||
set(path_separator ":")
|
||||
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||
set(path_separator ";")
|
||||
endif()
|
||||
file(APPEND "$ENV{GITHUB_PATH}" "$ENV{GITHUB_WORKSPACE}${path_separator}${ccache_dir}")
|
||||
|
||||
if (NOT "${{ runner.os }}" STREQUAL "Windows")
|
||||
execute_process(COMMAND chmod +x ${ccache_dir}/ccache)
|
||||
endif()
|
||||
|
||||
- name: Prepare ccache archive name
|
||||
id: ccache
|
||||
@@ -586,6 +604,14 @@ jobs:
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(llvm_link_exe llvm-link PATHS "${{ steps.libclang.outputs.libclang_dir }}/bin")
|
||||
set(WITH_LLVM_LINK --add-config=-DCMAKE_LINKER=${llvm_link_exe})
|
||||
|
||||
# Not for MSVC
|
||||
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x")
|
||||
unset(WITH_LLVM_LINK)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND python
|
||||
-u
|
||||
@@ -600,6 +626,7 @@ jobs:
|
||||
${CDB_OPTION}
|
||||
${ELFUTILS_OPTION}
|
||||
${NO_DMG}
|
||||
${WITH_LLVM_LINK}
|
||||
--add-config=-DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
--add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
--add-config=-DIDE_REVISION_URL=https://github.com/$ENV{GITHUB_REPOSITORY}/commits/$ENV{GITHUB_SHA}
|
||||
|
3
.gitignore
vendored
@@ -58,8 +58,8 @@ CMakeLists.txt.user*
|
||||
/src/plugins/**/*.json
|
||||
!/src/plugins/**/wizard.json
|
||||
/src/plugins/coreplugin/ide_version.h
|
||||
/src/libs/qt-breakpad/bin
|
||||
/.cmake/
|
||||
/.vs/
|
||||
app_version.h
|
||||
phony.c
|
||||
|
||||
@@ -286,3 +286,4 @@ tmp/
|
||||
# qbs builds
|
||||
/*-debug/
|
||||
/*-release/
|
||||
/out/
|
||||
|
@@ -30,6 +30,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
qtc_handle_compiler_cache_support()
|
||||
qtc_handle_llvm_linker()
|
||||
|
||||
option(BUILD_LINK_WITH_QT "Link with Qt from the parent Qt Creator" OFF)
|
||||
qtc_link_with_qt()
|
||||
|
707
README.md
@@ -329,708 +329,9 @@ Note that the plugin is disabled by default.
|
||||
Qt Creator is available under commercial licenses from The Qt Company,
|
||||
and under the GNU General Public License version 3,
|
||||
annotated with The Qt Company GPL Exception 1.0.
|
||||
See [LICENSE.GPL-EXCEPT](LICENSE.GPL-EXCEPT) for the details.
|
||||
See [LICENSE.GPL3-EXCEPT](LICENSE.GPL3-EXCEPT) for the details.
|
||||
|
||||
Qt Creator furthermore includes the following third-party components,
|
||||
we thank the authors who made this possible:
|
||||
For more information about the third-party components that Qt Creator
|
||||
includes, see the
|
||||
[Acknowledgements section in the documentation](https://doc.qt.io/qtcreator/creator-acknowledgements.html).
|
||||
|
||||
### YAML Parser yaml-cpp (MIT License)
|
||||
|
||||
https://github.com/jbeder/yaml-cpp
|
||||
|
||||
QtCreator/src/libs/3rdparty/yaml-cpp
|
||||
|
||||
Copyright (c) 2008-2015 Jesse Beder.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
### KSyntaxHighlighting
|
||||
|
||||
Syntax highlighting engine for Kate syntax definitions
|
||||
|
||||
This is a stand-alone implementation of the Kate syntax highlighting
|
||||
engine. It's meant as a building block for text editors as well as
|
||||
for simple highlighted text rendering (e.g. as HTML), supporting both
|
||||
integration with a custom editor as well as a ready-to-use
|
||||
QSyntaxHighlighter sub-class.
|
||||
|
||||
Distributed under the:
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
The source code of KSyntaxHighlighting can be found here:
|
||||
https://cgit.kde.org/syntax-highlighting.git
|
||||
QtCreator/src/libs/3rdparty/syntax-highlighting
|
||||
https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/3rdparty/syntax-highlighting
|
||||
|
||||
### Clazy
|
||||
|
||||
https://github.com/KDE/clazy
|
||||
|
||||
Copyright (C) 2015-2018 Clazy Team
|
||||
|
||||
Distributed under GNU LIBRARY GENERAL PUBLIC LICENSE Version 2 (LGPL2).
|
||||
|
||||
Integrated with patches from
|
||||
https://code.qt.io/cgit/clang/clazy.git/.
|
||||
|
||||
### LLVM/Clang
|
||||
|
||||
https://github.com/llvm/llvm-project.git
|
||||
|
||||
Copyright (C) 2003-2019 LLVM Team
|
||||
|
||||
Distributed under the Apache 2.0 License with LLVM exceptions,
|
||||
see https://github.com/llvm/llvm-project/blob/main/clang/LICENSE.TXT
|
||||
|
||||
With backported/additional patches from https://code.qt.io/cgit/clang/llvm-project.git
|
||||
|
||||
### std::span implementation for C++11 and later
|
||||
|
||||
A single-header implementation of C++20's std::span, conforming to the C++20
|
||||
committee draft. It is compatible with C++11, but will use newer language
|
||||
features if they are available.
|
||||
|
||||
https://github.com/martinmoene/span-lite
|
||||
|
||||
QtCreator/src/libs/3rdparty/span
|
||||
|
||||
Copyright 2018-2021 Martin Moene
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
### Open Source front-end for C++ (license MIT), enhanced for use in Qt Creator
|
||||
|
||||
Roberto Raggi <roberto.raggi@gmail.com>
|
||||
|
||||
QtCreator/src/libs/3rdparty/cplusplus
|
||||
|
||||
Copyright 2005 Roberto Raggi <roberto@kdevelop.org>
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
KDEVELOP TEAM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
### Open Source tool for generating C++ code that classifies keywords (license MIT)
|
||||
|
||||
Roberto Raggi <roberto.raggi@gmail.com>
|
||||
|
||||
QtCreator/src/tools/3rdparty/cplusplus-keywordgen
|
||||
|
||||
Copyright (c) 2007 Roberto Raggi <roberto.raggi@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
### SQLite (version 3.8.10.2)
|
||||
|
||||
SQLite is a C-language library that implements a small, fast, self-contained,
|
||||
high-reliability, full-featured, SQL database engine.
|
||||
|
||||
SQLite (https://www.sqlite.org) is in the Public Domain.
|
||||
|
||||
### ClassView and ImageViewer plugins
|
||||
|
||||
Copyright (C) 2016 The Qt Company Ltd.
|
||||
|
||||
All rights reserved.
|
||||
Copyright (C) 2016 Denis Mingulov.
|
||||
|
||||
Contact: http://www.qt.io
|
||||
|
||||
This file is part of Qt Creator.
|
||||
|
||||
You may use this file under the terms of the BSD license as follows:
|
||||
|
||||
"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 The Qt Company Ltd and its Subsidiary(-ies) 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."
|
||||
|
||||
### Source Code Pro font
|
||||
|
||||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
|
||||
with Reserved Font Name 'Source'. All Rights Reserved. Source is a
|
||||
trademark of Adobe Systems Incorporated in the United States
|
||||
and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
The font and license files can be found in QtCreator/src/libs/3rdparty/fonts.
|
||||
|
||||
### JSON Library by Niels Lohmann
|
||||
|
||||
Used by the Chrome Trace Format Visualizer plugin instead of QJson
|
||||
because of QJson's current hard limit of 128 Mb object size and
|
||||
trace files often being much larger.
|
||||
|
||||
The sources can be found in `QtCreator/src/libs/3rdparty/json`.
|
||||
|
||||
The class is licensed under the MIT License:
|
||||
|
||||
Copyright © 2013-2019 Niels Lohmann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the “Software”), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
The class contains the UTF-8 Decoder from Bjoern Hoehrmann which is
|
||||
licensed under the MIT License (see above). Copyright © 2008-2009 Björn
|
||||
Hoehrmann bjoern@hoehrmann.de
|
||||
|
||||
The class contains a slightly modified version of the Grisu2 algorithm
|
||||
from Florian Loitsch which is licensed under the MIT License (see above).
|
||||
Copyright © 2009 Florian Loitsch
|
||||
|
||||
### litehtml
|
||||
|
||||
The litehtml HTML/CSS rendering engine is used as a help viewer backend
|
||||
to display help files.
|
||||
|
||||
The sources can be found in:
|
||||
* QtCreator/src/plugins/help/qlitehtml
|
||||
* https://github.com/litehtml
|
||||
|
||||
Copyright (c) 2013, Yuri Kobets (tordex)
|
||||
|
||||
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 the <organization> 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 <COPYRIGHT HOLDER> 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.
|
||||
|
||||
### gumbo
|
||||
|
||||
The litehtml HTML/CSS rendering engine uses the gumbo parser.
|
||||
|
||||
Copyright 2010, 2011 Google
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
### gumbo/utf8.c
|
||||
|
||||
The litehtml HTML/CSS rendering engine uses gumbo/utf8.c parser.
|
||||
|
||||
Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
### SourceCodePro fonts
|
||||
|
||||
Qt Creator ships with the following fonts licensed under OFL-1.1:
|
||||
|
||||
* SourceCodePro-Regular.ttf
|
||||
* SourceCodePro-It.ttf
|
||||
* SourceCodePro-Bold.ttf
|
||||
|
||||
SIL OPEN FONT LICENSE
|
||||
|
||||
Version 1.1 - 26 February 2007
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting - in part or in whole - any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
### Qbs
|
||||
|
||||
Qt Creator installations deliver Qbs. Its licensing and third party
|
||||
attributions are listed in Qbs Manual at
|
||||
https://doc.qt.io/qbs/attributions.html
|
||||
|
||||
### conan.cmake
|
||||
|
||||
CMake script used by Qt Creator's auto setup of package manager dependencies.
|
||||
|
||||
The sources can be found in:
|
||||
* QtCreator/src/share/3rdparty/package-manager/conan.cmake
|
||||
* https://github.com/conan-io/cmake-conan
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 JFrog
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
### TartanLlama/expected
|
||||
|
||||
Implementation of std::expected compatible with C++11/C++14/C++17.
|
||||
|
||||
https://github.com/TartanLlama/expected
|
||||
|
||||
To the extent possible under law, the author(s) have dedicated all
|
||||
copyright and related and neighboring rights to this software to the
|
||||
public domain worldwide. This software is distributed without any warranty.
|
||||
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
### WinPty
|
||||
|
||||
Implementation of a pseudo terminal for Windows.
|
||||
|
||||
https://github.com/rprichard/winpty
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2016 Ryan Prichard
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
||||
|
||||
### ptyqt
|
||||
|
||||
Pty-Qt is small library for access to console applications by pseudo-terminal interface on Mac,
|
||||
Linux and Windows. On Mac and Linux it uses standard PseudoTerminal API and on Windows it uses
|
||||
WinPty(prefer) or ConPty.
|
||||
|
||||
https://github.com/kafeg/ptyqt
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Vitaly Petrov, v31337@gmail.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
### libvterm
|
||||
|
||||
An abstract C99 library which implements a VT220 or xterm-like terminal emulator.
|
||||
It doesn't use any particular graphics toolkit or output system, instead it invokes callback
|
||||
function pointers that its embedding program should provide it to draw on its behalf.
|
||||
It avoids calling malloc() during normal running state, allowing it to be used in embedded kernel
|
||||
situations.
|
||||
|
||||
https://www.leonerd.org.uk/code/libvterm/
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2008 Paul Evans <leonerd@leonerd.org.uk>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
### terminal/shellintegrations
|
||||
|
||||
The Terminal plugin uses scripts to integrate with the shell. The scripts are
|
||||
located in the Qt Creator source tree in src/plugins/terminal/shellintegrations.
|
||||
|
||||
https://github.com/microsoft/vscode/tree/main/src/vs/workbench/contrib/terminal/browser/media
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015 - present Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
### terminal/shellintegrations/clink
|
||||
|
||||
The Terminal plugin uses a lua script to integrate with the cmd shell when using clink.
|
||||
|
||||
https://github.com/chrisant996/clink-gizmos
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Chris Antos
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
### QrCodeGenerator
|
||||
|
||||
The QML Designer plugin uses QR Code Generator for Design Viewer integration.
|
||||
|
||||
https://github.com/alex-spataru/Qt-QrCodeGenerator
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Alex Spataru
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
### cmake
|
||||
|
||||
The CMake project manager uses the CMake lexer code for parsing CMake files
|
||||
|
||||
https://gitlab.kitware.com/cmake/cmake.git
|
||||
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2023 Kitware, Inc. and Contributors
|
||||
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 Kitware, Inc. nor the names of 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
|
||||
HOLDER 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.
|
||||
|
||||
### RSTParser
|
||||
|
||||
RSTParser is an open-source C++ library for parsing reStructuredText
|
||||
|
||||
https://github.com/vitaut-archive/rstparser
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Copyright (c) 2013, Victor Zverovich
|
||||
|
||||
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 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.
|
||||
|
@@ -46,6 +46,7 @@ option(QTC_SEPARATE_DEBUG_INFO "Extract debug information from binary files." OF
|
||||
option(WITH_SCCACHE_SUPPORT "Enables support for building with SCCACHE and separate debug info with MSVC, which SCCACHE normally doesn't support." OFF)
|
||||
option(WITH_CCACHE_SUPPORT "Enables support for building with CCACHE and separate debug info with MSVC, which CCACHE normally doesn't support." "${ENV_WITH_CCACHE_SUPPORT}")
|
||||
option(QTC_STATIC_BUILD "Builds libraries and plugins as static libraries" OFF)
|
||||
option(QTC_USE_LLVM_LINKER "Uses llvm-link linker if found." OFF)
|
||||
|
||||
# If we provide a list of plugins, executables, libraries, then the BUILD_<type>_BY_DEFAULT will be set to OFF
|
||||
# and for every element we set BUILD_<type>_<elment> to ON
|
||||
|
@@ -31,7 +31,10 @@ if (WIN32)
|
||||
|
||||
if (NOT BUILD_WITH_PCH)
|
||||
list(APPEND DEFAULT_DEFINES
|
||||
WIN32_LEAN_AND_MEAN)
|
||||
WIN32_LEAN_AND_MEAN
|
||||
WINVER=0x0A00
|
||||
_WIN32_WINNT=0x0A00
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -141,6 +144,15 @@ function(qtc_handle_compiler_cache_support)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(qtc_handle_llvm_linker)
|
||||
if (QTC_USE_LLVM_LINKER)
|
||||
find_program(LLVM_LINK_PROGRAM llvm-link)
|
||||
if(LLVM_LINK_PROGRAM)
|
||||
set(CMAKE_LINKER "${LLVM_LINK_PROGRAM}" CACHE STRING "LLVM linker" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(qtc_link_with_qt)
|
||||
# When building with Qt Creator 4.15+ do the "Link with Qt..." automatically
|
||||
if (BUILD_LINK_WITH_QT AND DEFINED CMAKE_PROJECT_INCLUDE_BEFORE)
|
||||
|
@@ -225,7 +225,7 @@ endfunction()
|
||||
|
||||
function(add_qtc_documentation qdocconf_file)
|
||||
cmake_parse_arguments(_arg "" ""
|
||||
"INCLUDE_DIRECTORIES;FRAMEWORK_PATHS" ${ARGN})
|
||||
"INCLUDE_DIRECTORIES;FRAMEWORK_PATHS;ENVIRONMENT_EXPORTS" ${ARGN})
|
||||
if (_arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "add_qtc_documentation has unknown arguments: ${_arg_UNPARSED_ARGUMENTS}.")
|
||||
endif()
|
||||
@@ -262,6 +262,7 @@ function(add_qtc_documentation qdocconf_file)
|
||||
QTC_DOCS_DIR QTC_VERSION QTC_VERSION_TAG
|
||||
QTCREATOR_COPYRIGHT_YEAR
|
||||
QT_INSTALL_DOCS QDOC_INDEX_DIR
|
||||
${_arg_ENVIRONMENT_EXPORTS}
|
||||
)
|
||||
|
||||
qdoc_build_qdocconf_file(${qdocconf_file} ${_qch_params} ${_qdoc_params}
|
||||
@@ -269,3 +270,25 @@ function(add_qtc_documentation qdocconf_file)
|
||||
FRAMEWORK_PATHS ${_arg_FRAMEWORK_PATHS}
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(add_qtc_doc_attribution target attribution_file output_file qdocconf_file)
|
||||
get_filename_component(doc_target "${qdocconf_file}" NAME_WE)
|
||||
set(html_target "html_docs_${doc_target}")
|
||||
if (NOT TARGET ${html_target})
|
||||
# probably qdoc is missing, so other documentation targets are not there
|
||||
return()
|
||||
endif()
|
||||
# make sure output directory exists
|
||||
get_filename_component(output_dir "${output_file}" DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${output_dir})
|
||||
# add target
|
||||
add_custom_target(${target}
|
||||
Qt6::qtattributionsscanner -o "${output_file}" ${attribution_file}
|
||||
COMMENT "Create attributions ${output_file} from ${attribution_file}"
|
||||
DEPENDS "${attribution_file}"
|
||||
SOURCES "${attribution_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
VERBATIM
|
||||
)
|
||||
add_dependencies(${html_target} ${target})
|
||||
endfunction()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
set(IDE_VERSION "12.0.2") # The IDE version.
|
||||
set(IDE_VERSION_COMPAT "12.0.0") # The IDE Compatibility version.
|
||||
set(IDE_VERSION_DISPLAY "12.0.2") # The IDE display version.
|
||||
set(IDE_COPYRIGHT_YEAR "2023") # The IDE current copyright year.
|
||||
set(IDE_VERSION "12.0.82") # The IDE version.
|
||||
set(IDE_VERSION_COMPAT "12.0.82") # The IDE Compatibility version.
|
||||
set(IDE_VERSION_DISPLAY "13.0.0-beta1") # The IDE display version.
|
||||
set(IDE_COPYRIGHT_YEAR "2024") # The IDE current copyright year.
|
||||
|
||||
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
|
||||
set(IDE_DISPLAY_NAME "Qt Creator") # The IDE display name.
|
||||
|
163
dist/changelog/changes-12.0.2.md
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
Qt Creator 12.0.2
|
||||
=================
|
||||
|
||||
Qt Creator version 12.0.2 contains bug fixes.
|
||||
|
||||
The most important changes are listed in this document. For a complete list of
|
||||
changes, see the Git log for the Qt Creator sources that you can check out from
|
||||
the public Git repository. For example:
|
||||
|
||||
git clone git://code.qt.io/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline origin/v12.0.1..v12.0.2
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
### External Tools
|
||||
|
||||
* Fixed that the output could be interspersed with newlines
|
||||
([QTCREATORBUG-29977](https://bugreports.qt.io/browse/QTCREATORBUG-29977))
|
||||
|
||||
Editing
|
||||
-------
|
||||
|
||||
* Fixed that modified documents lost their file icon, which potentially included
|
||||
a short freeze
|
||||
([QTCREATORBUG-29999](https://bugreports.qt.io/browse/QTCREATORBUG-29999))
|
||||
* Fixed a crash when opening bookmarks
|
||||
([QTCREATORBUG-30283](https://bugreports.qt.io/browse/QTCREATORBUG-30283))
|
||||
|
||||
### C++
|
||||
|
||||
* Clang Format
|
||||
* Fixed the update of the preview when settings change
|
||||
([QTCREATORBUG-30089](https://bugreports.qt.io/browse/QTCREATORBUG-30089))
|
||||
* Fixed an issue with `CRLF` line endings
|
||||
* Fixed a freeze when looking up symbols
|
||||
([QTCREATORBUG-30155](https://bugreports.qt.io/browse/QTCREATORBUG-30155))
|
||||
* Fixed a crash while parsing
|
||||
([QTCREATORBUG-30044](https://bugreports.qt.io/browse/QTCREATORBUG-30044))
|
||||
|
||||
### Language Server Protocol
|
||||
|
||||
* Fixed a crash when completing
|
||||
|
||||
### Markdown
|
||||
|
||||
* Fixed that clicking on file links cleared the preview instead of opening the
|
||||
file
|
||||
([QTCREATORBUG-30120](https://bugreports.qt.io/browse/QTCREATORBUG-30120))
|
||||
|
||||
Projects
|
||||
--------
|
||||
|
||||
* Fixed that trying to stop remote processes that were no longer reachable
|
||||
resulted in a broken run control state
|
||||
* Fixed a potential infinite loop
|
||||
([QTCREATORBUG-30067](https://bugreports.qt.io/browse/QTCREATORBUG-30067))
|
||||
* Fixed a crash when navigating in the Projects view
|
||||
([QTCREATORBUG-30035](https://bugreports.qt.io/browse/QTCREATORBUG-30035))
|
||||
* Fixed that custom compiler settings could vanish after restart
|
||||
([QTCREATORBUG-30133](https://bugreports.qt.io/browse/QTCREATORBUG-30133))
|
||||
* Fixed the restoring of per project C++ file name settings
|
||||
|
||||
### CMake
|
||||
|
||||
* Fixed that automatic re-configuration on saving files while a build is
|
||||
running could fail
|
||||
([QTCREATORBUG-30048](https://bugreports.qt.io/browse/QTCREATORBUG-30048))
|
||||
* Fixed that the automatically added library path was wrong for targets with
|
||||
the same name as special CMake targets (like "test")
|
||||
([QTCREATORBUG-30050](https://bugreports.qt.io/browse/QTCREATORBUG-30050))
|
||||
* Fixed that the `cm` locator filter did not show all targets
|
||||
([QTCREATORBUG-29946](https://bugreports.qt.io/browse/QTCREATORBUG-29946))
|
||||
* Fixed adding files with the wizards when triggered through `File > New File`
|
||||
([QTCREATORBUG-30170](https://bugreports.qt.io/browse/QTCREATORBUG-30170))
|
||||
* Fixed adding QML files to CMake files when variables like `${PROJECT_NAME}`
|
||||
are used for the target name
|
||||
([QTCREATORBUG-30218](https://bugreports.qt.io/browse/QTCREATORBUG-30218))
|
||||
* Fixed adding files to `OBJECT` libraries
|
||||
([QTCREATORBUG-29914](https://bugreports.qt.io/browse/QTCREATORBUG-29914))
|
||||
* CMake Presets
|
||||
* Fixed that display names were not updated when reloading presets
|
||||
([QTCREATORBUG-30237](https://bugreports.qt.io/browse/QTCREATORBUG-30237))
|
||||
|
||||
### Conan
|
||||
|
||||
* Fixed that macOS sysroot was not passed on to Conan
|
||||
([QTCREATORBUG-29978](https://bugreports.qt.io/browse/QTCREATORBUG-29978))
|
||||
* Fixed that the MSVC runtime library was not passed on to Conan
|
||||
([QTCREATORBUG-30169](https://bugreports.qt.io/browse/QTCREATORBUG-30169))
|
||||
|
||||
### Autotools
|
||||
|
||||
* Fixed that makefiles where no longer recognized as project files
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
### CMake
|
||||
|
||||
* Fixed that debugging required a successful build first
|
||||
([QTCREATORBUG-30045](https://bugreports.qt.io/browse/QTCREATORBUG-30045))
|
||||
|
||||
Terminal
|
||||
--------
|
||||
|
||||
* Fixed a crash when double-clicking
|
||||
([QTCREATORBUG-30144](https://bugreports.qt.io/browse/QTCREATORBUG-30144))
|
||||
|
||||
Platforms
|
||||
---------
|
||||
|
||||
### Android
|
||||
|
||||
* Fixed that the prompt for configuring the Android setup was no longer shown
|
||||
([QTCREATORBUG-30131](https://bugreports.qt.io/browse/QTCREATORBUG-30131))
|
||||
* Fixed that Qt ABI detection could be wrong
|
||||
([QTCREATORBUG-30146](https://bugreports.qt.io/browse/QTCREATORBUG-30146))
|
||||
|
||||
### iOS
|
||||
|
||||
* Fixed that multiple dialogs informing about devices that are not in developer
|
||||
mode were opened simultaneously
|
||||
* Fixed that a wrong warning about the provisioning profile could be shown
|
||||
([QTCREATORBUG-30158](https://bugreports.qt.io/browse/QTCREATORBUG-30158))
|
||||
|
||||
### Remote Linux
|
||||
|
||||
* Fixed that deployment could fail when trying to kill the potentially running
|
||||
application
|
||||
([QTCREATORBUG-30024](https://bugreports.qt.io/browse/QTCREATORBUG-30024))
|
||||
|
||||
### Boot2Qt
|
||||
|
||||
* Fixed that SSH operations could silently fail after the connection got lost
|
||||
([QTCREATORBUG-29982](https://bugreports.qt.io/browse/QTCREATORBUG-29982))
|
||||
|
||||
### WASM
|
||||
|
||||
* Fixed issues with spaces in the `emsdk` path
|
||||
([QTCREATORBUG-29981](https://bugreports.qt.io/browse/QTCREATORBUG-29981))
|
||||
|
||||
Credits for these changes go to:
|
||||
--------------------------------
|
||||
Alessandro Portale
|
||||
André Pönitz
|
||||
Artem Sokolovskii
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
Cristian Adam
|
||||
Cristián Maureira-Fredes
|
||||
David Faure
|
||||
David Schulz
|
||||
Eike Ziller
|
||||
Fabian Vogt
|
||||
Jaroslaw Kobus
|
||||
Leena Miettinen
|
||||
Marcus Tillmanns
|
||||
Mathias Hasselmann
|
||||
Robert Löhning
|
||||
Sivert Krøvel
|
||||
Thiago Macieira
|
||||
Yasser Grimes
|
270
dist/changelog/changes-13.0.0.md
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
Qt Creator 13
|
||||
=============
|
||||
|
||||
Qt Creator version 13 contains bug fixes and new features.
|
||||
|
||||
The most important changes are listed in this document. For a complete list of
|
||||
changes, see the Git log for the Qt Creator sources that you can check out from
|
||||
the public Git repository. For example:
|
||||
|
||||
git clone git://code.qt.io/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline origin/12.0..v13.0.0
|
||||
|
||||
What's new?
|
||||
-----------
|
||||
|
||||
* Added Qt Application Manager support
|
||||
|
||||
### Qt Application Manager
|
||||
|
||||
Adds support for Qt 6 based applications with CMake for creating, building,
|
||||
deploying, running, and debugging on devices that use the
|
||||
[Qt Application Manager](https://doc.qt.io/QtApplicationManager/).
|
||||
|
||||
([Documentation](https://doc.qt.io/qtcreator/creator-overview-qtasam.html))
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
* Improved docking (Debug mode, Widget Designer)
|
||||
* Fixed the style of titles and changed them to always be visible
|
||||
(removed `View > Views > Automatically Hide View Titlebars`)
|
||||
* Added an option to collapse panels
|
||||
* Changed `Hide/Show Left/Right Sidebar` to hide and show the corresponding
|
||||
dock area
|
||||
* Added the option to show file paths relative to the active project to the
|
||||
search results view
|
||||
(QTCREATORBUG-29462)
|
||||
* Added a `Current` button for selecting the directory of the current document
|
||||
for searching in `Files in File System`
|
||||
* Added `Copy to Clipboard` to the `About Qt Creator` dialog
|
||||
(QTCREATORBUG-29886)
|
||||
|
||||
Editing
|
||||
-------
|
||||
|
||||
* Made syntax highlighting asynchronous
|
||||
* Fixed that `Shift+Tab` did not always unindent
|
||||
(QTCREATORBUG-29742)
|
||||
* Fixed that `Surround text selection with brackets` did nothing for `<`
|
||||
* Fixed following links without a file name in documents without a file name
|
||||
|
||||
### C++
|
||||
|
||||
* Added the `Move Definition Here` refactoring action that moves an existing
|
||||
function definition to its declaration
|
||||
(QTCREATORBUG-9515)
|
||||
* Enabled the completion inside comments and strings by falling back to the
|
||||
built-in code model
|
||||
(QTCREATORBUG-20828)
|
||||
* Improved the position of headers inserted by refactoring operations
|
||||
(QTCREATORBUG-21826)
|
||||
* Improved the coding style settings by separating Clang Format and other coding
|
||||
style settings, and using a plain text editor for custom Clang Format settings
|
||||
* Fixed that the class wizards used the class name for the include guard
|
||||
instead of the file name
|
||||
(QTCREATORBUG-30140)
|
||||
* Fixed that renaming classes did not change the include directive for the
|
||||
renamed header in the source file
|
||||
(QTCREATORBUG-30154)
|
||||
* Fixed issues with refactoring template functions
|
||||
(QTCREATORBUG-29408)
|
||||
* Clangd
|
||||
* Fixed that `Follow Symbol Under Cursor` only worked for exact matches
|
||||
(QTCREATORBUG-29814)
|
||||
|
||||
### QML
|
||||
|
||||
* Added navigation from QML components to the C++ code in the project
|
||||
(QTCREATORBUG-28086)
|
||||
* Added a button for launching the QML Preview on the current document to
|
||||
the editor tool bar
|
||||
* Added color previews when hovering Qt color functions
|
||||
(QTCREATORBUG-29966)
|
||||
|
||||
### Python
|
||||
|
||||
* Fixed that global and virtual environments were polluted with `pylsp` and
|
||||
`debugpy` installations
|
||||
|
||||
### Language Server Protocol
|
||||
|
||||
* Added automatic setup up of language servers for `YAML`, `JSON`, and `Bash`
|
||||
(requires `npm`)
|
||||
|
||||
### Widget Designer
|
||||
|
||||
* Fixed the indentation of the code that is inserted by `Go to slot`
|
||||
(QTCREATORBUG-11730)
|
||||
|
||||
### Compiler Explorer
|
||||
|
||||
* Added highlighting of the matching source lines when hovering over the
|
||||
assembly
|
||||
|
||||
### Markdown
|
||||
|
||||
* Added the common text editor tools (line and column, encoding, and line
|
||||
endings) to the tool bar
|
||||
* Added support for following links to the text editor
|
||||
|
||||
Projects
|
||||
--------
|
||||
|
||||
* Added a section `Vanished Targets` to `Projects` mode in case the project
|
||||
was configured for kits that have vanished, as a replacement for the automatic
|
||||
creation of "Replacement" kits
|
||||
* Added the status of devices to the device lists
|
||||
(QTCREATORBUG-20941)
|
||||
* Added the `Preferences > Build & Run > General > Application environment`
|
||||
option for globally modifying the environment for all run configurations
|
||||
(QTCREATORBUG-29530)
|
||||
* Added a file wizard for Qt translation (`.ts`) files
|
||||
(QTCREATORBUG-29775)
|
||||
* Increased the maximum width of the target selector
|
||||
(QTCREATORBUG-30038)
|
||||
* Fixed that the `Left` cursor key did not always collapse the current item
|
||||
(QTBUG-118515)
|
||||
* Fixed inconsistent folder hierarchies in the project tree
|
||||
(QTCREATORBUG-29923)
|
||||
|
||||
### CMake
|
||||
|
||||
* Added support for custom output parsers for the configuration of projects
|
||||
(QTCREATORBUG-29992)
|
||||
* Made cache variables available even if project configuration failed
|
||||
|
||||
### Python
|
||||
|
||||
* Added `Generate Kit` to the Python interpreter preferences for generating a
|
||||
Python kit with this interpreter
|
||||
* Added the target setup page when loading unconfigured Python projects
|
||||
* Fixed that the same Python interpreter could be auto-detected multiple times
|
||||
under different names
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
### C++
|
||||
|
||||
* Fixed that breakpoints were not hit while the message dialog about missing
|
||||
debug information was shown
|
||||
(QTCREATORBUG-30168)
|
||||
|
||||
### Debug Adapter Protocol
|
||||
|
||||
* Added support for function breakpoints
|
||||
|
||||
Analyzer
|
||||
--------
|
||||
|
||||
### Clang
|
||||
|
||||
* Added `Edit Checks as Strings` for Clazy
|
||||
(QTCREATORBUG-24846)
|
||||
|
||||
### Axivion
|
||||
|
||||
* Added fetching and showing issues
|
||||
|
||||
Terminal
|
||||
--------
|
||||
|
||||
* Added `Select All` to the context menu
|
||||
(QTCREATORBUG-29922)
|
||||
* Fixed the startup performance on Windows
|
||||
(QTCREATORBUG-29840)
|
||||
* Fixed the integration of the `fish` shell
|
||||
* Fixed that `Ctrl+W` closed the terminal even when shortcuts were blocked
|
||||
(QTCREATORBUG-30070)
|
||||
|
||||
Version Control Systems
|
||||
-----------------------
|
||||
|
||||
### Git
|
||||
|
||||
* Added the upstream status for untracked branches to `Branches` view
|
||||
|
||||
Test Integration
|
||||
----------------
|
||||
|
||||
### Qt Test
|
||||
|
||||
* Added a locator filter for Qt Test data tags (`qdt`)
|
||||
|
||||
Platforms
|
||||
---------
|
||||
|
||||
### Android
|
||||
|
||||
* Add support for target-based android-build directories (??? is that ready? Qt 6.8+ ???)
|
||||
(QTBUG-117443)
|
||||
|
||||
### iOS
|
||||
|
||||
* Fixed the detection of iOS 17 devices
|
||||
* Fixed deployment and running applications for iOS 17 devices
|
||||
(application output, debugging, and profiling are not supported)
|
||||
(QTCREATORBUG-29682)
|
||||
|
||||
### Remote Linux
|
||||
|
||||
* Fixed that debugging unnecessarily downloaded files from the remote system
|
||||
(QTCREATORBUG-29614)
|
||||
|
||||
Credits for these changes go to:
|
||||
--------------------------------
|
||||
Aaron McCarthy
|
||||
Aleksei German
|
||||
Alessandro Portale
|
||||
Alexey Edelev
|
||||
Ali Kianian
|
||||
Amr Essam
|
||||
Andre Hartmann
|
||||
André Pönitz
|
||||
Andreas Loth
|
||||
Artem Sokolovskii
|
||||
Brook Cronin
|
||||
Burak Hancerli
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
Cristian Adam
|
||||
Daniel Trevitz
|
||||
David Faure
|
||||
David Schulz
|
||||
Dominik Holland
|
||||
Eike Ziller
|
||||
Esa Törmänen
|
||||
Fabian Kosmale
|
||||
Friedemann Kleint
|
||||
Henning Gruendl
|
||||
Jaroslaw Kobus
|
||||
Johanna Vanhatapio
|
||||
Karim Abdelrahman
|
||||
Knud Dollereder
|
||||
Leena Miettinen
|
||||
Mahmoud Badri
|
||||
Marco Bubke
|
||||
Marcus Tillmanns
|
||||
Mathias Hasselmann
|
||||
Mats Honkamaa
|
||||
Mehdi Salem
|
||||
Miikka Heikkinen
|
||||
Mitch Curtis
|
||||
Olivier De Cannière
|
||||
Orgad Shaneh
|
||||
Pranta Dastider
|
||||
Robert Löhning
|
||||
Sami Shalayel
|
||||
Samuel Jose Raposo Vieira Mira
|
||||
Serg Kryvonos
|
||||
Shrief Gabr
|
||||
Sivert Krøvel
|
||||
Tasuku Suzuki
|
||||
Thomas Hartmann
|
||||
Tim Jenßen
|
||||
Vikas Pachdha
|
||||
Volodymyr Zibarov
|
||||
Xavier Besson
|
||||
Yasser Grimes
|
||||
Yuri Vilmanis
|
@@ -33,25 +33,30 @@ function(_find_all_includes _ret_includes _ret_framework_paths)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (WITH_DOCS)
|
||||
add_qtc_documentation(${IDE_DOC_FILE})
|
||||
function(_add_doc _doc_file _dev_doc_file)
|
||||
set(GENERATED_ATTRIBUTIONS_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated_attributions)
|
||||
add_qtc_documentation(${_doc_file}
|
||||
ENVIRONMENT_EXPORTS GENERATED_ATTRIBUTIONS_DIR
|
||||
)
|
||||
add_qtc_doc_attribution(doc_attributions
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../qt_attributions.json"
|
||||
"${GENERATED_ATTRIBUTIONS_DIR}/creator-attributions.qdoc"
|
||||
${_doc_file}
|
||||
)
|
||||
if (BUILD_DEVELOPER_DOCS)
|
||||
_find_all_includes(_all_includes _framework_paths)
|
||||
add_qtc_documentation("qtcreatordev/qtcreator-dev.qdocconf"
|
||||
add_qtc_documentation(${_dev_doc_file}
|
||||
INCLUDE_DIRECTORIES ${_all_includes}
|
||||
FRAMEWORK_PATHS ${_framework_paths}
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (WITH_DOCS)
|
||||
_add_doc(${IDE_DOC_FILE} "qtcreatordev/qtcreator-dev.qdocconf")
|
||||
endif()
|
||||
if(WITH_ONLINE_DOCS)
|
||||
add_qtc_documentation(${IDE_DOC_FILE_ONLINE})
|
||||
if (BUILD_DEVELOPER_DOCS)
|
||||
_find_all_includes(_all_includes _framework_paths)
|
||||
add_qtc_documentation("qtcreatordev/qtcreator-dev-online.qdocconf"
|
||||
INCLUDE_DIRECTORIES ${_all_includes}
|
||||
FRAMEWORK_PATHS ${_framework_paths}
|
||||
)
|
||||
endif()
|
||||
_add_doc(${IDE_DOC_FILE_ONLINE} "qtcreatordev/qtcreator-dev-online.qdocconf")
|
||||
endif()
|
||||
|
||||
install(DIRECTORY config
|
||||
|
@@ -13,7 +13,8 @@ ignorewords += \
|
||||
MinGW
|
||||
|
||||
headerdirs =
|
||||
sourcedirs = ../src
|
||||
sourcedirs = ../src \
|
||||
$$GENERATED_ATTRIBUTIONS_DIR
|
||||
|
||||
imagedirs = ../images
|
||||
|
||||
@@ -27,6 +28,7 @@ depends += qtwidgets \
|
||||
qtcore \
|
||||
qtqml \
|
||||
qtquick \
|
||||
qtquickcontrols \
|
||||
qmake \
|
||||
qtdesigner \
|
||||
qtdoc \
|
||||
|
@@ -17,27 +17,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sectionlist normallist">
|
||||
<div class="heading">
|
||||
<h2>Managing Projects</h2>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="creator-project-creating.html">Creating Projects</a></li>
|
||||
<li><a href="creator-version-control.html">Using Version Control Systems</a></li>
|
||||
<li><a href="creator-configuring-projects.html">Configuring Projects</a></li>
|
||||
<li><a href="creator-project-managing-sessions.html">Managing Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sectionlist normallist">
|
||||
<div class="heading">
|
||||
<h2>Designing User Interfaces</h2>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="creator-visual-editor.html">Developing Qt Quick Applications</a></li>
|
||||
<li><a href="creator-using-qt-designer.html">Developing Widget Based Applications</a></li>
|
||||
<li><a href="creator-usability.html">Optimizing Applications for Mobile Devices</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sectionlist normallist">
|
||||
<div class="heading">
|
||||
<h2>Coding</h2>
|
||||
|
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 174 B |
BIN
doc/qtcreator/images/icons/final.png
Normal file
After Width: | Height: | Size: 290 B |
BIN
doc/qtcreator/images/icons/history.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
doc/qtcreator/images/icons/parallel.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
doc/qtcreator/images/icons/state.png
Normal file
After Width: | Height: | Size: 166 B |
BIN
doc/qtcreator/images/icons/transition.png
Normal file
After Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 9.7 KiB |
BIN
doc/qtcreator/images/qtcreator-code-model-inspector.webp
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator/images/qtcreator-code-style-built-in-indenter.webp
Normal file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.8 KiB |
BIN
doc/qtcreator/images/qtcreator-editor-multicursor.webp
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
doc/qtcreator/images/qtcreator-editor-open-files.webp
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
doc/qtcreator/images/qtcreator-editor-symbols.webp
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
doc/qtcreator/images/qtcreator-editor-toolbar.webp
Normal file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 6.8 KiB |
BIN
doc/qtcreator/images/qtcreator-language-server-json.webp
Normal file
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-fakevim-general.webp
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-nim-code-style.webp
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
doc/qtcreator/images/qtcreator-preferences-nim-tools.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator/images/qtcreator-projects-settings-clangd.webp
Normal file
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
BIN
doc/qtcreator/images/qtcreator-projects-vanished-targets.webp
Normal file
After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 4.5 KiB |
BIN
doc/qtcreator/images/qtcreator-scxml-editor-state-toolbar.webp
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 36 KiB |
BIN
doc/qtcreator/images/qtcreator-scxml-editor.webp
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
doc/qtcreator/images/qtquick-designer.webp
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
doc/qtcreator/images/qtquick-ui-prototype-run-settings.webp
Normal file
After Width: | Height: | Size: 5.1 KiB |
@@ -54,7 +54,7 @@
|
||||
Detect problems in memory management by using the Memcheck
|
||||
tool and find cache misses in the code by using the Callgrind tool.
|
||||
|
||||
\li \l{Using Clang Tools}{Clang Tools}
|
||||
\li \l{Clang Tools}
|
||||
|
||||
Detect problems in C, C++, and Objective-C programs by
|
||||
using Clang-Tidy and Clazy.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
// **********************************************************************
|
||||
@@ -8,13 +8,14 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage creator-running-valgrind-remotely.html
|
||||
\page creator-clang-tools.html
|
||||
\nextpage creator-heob.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\title Using Clang Tools
|
||||
\ingroup creator-how-to-analyze
|
||||
|
||||
\QC integrates the following Clang tools for finding problems in C, C++, and
|
||||
\title Analyze code with Clang-Tidy and Clazy
|
||||
|
||||
\QC comes with the following Clang tools for finding problems in C, C++, and
|
||||
Objective-C source code by using static analysis:
|
||||
|
||||
\list
|
||||
@@ -34,14 +35,7 @@
|
||||
the checks, you must create a custom configuration for the Clang tools and
|
||||
enable them for Clang-Tidy.
|
||||
|
||||
\QC comes with the Clang tools, so you do not need to set them up separately.
|
||||
|
||||
In addition to running the tools to collect diagnostics, you can select
|
||||
\inlineimage icons/open.png
|
||||
to load diagnostics from \l{https://yaml.org/}{YAML} files that you exported
|
||||
using the \c {-export fixes} option.
|
||||
|
||||
\section1 Running Clang-Tidy and Clazy
|
||||
\section1 Analyze the current file
|
||||
|
||||
To run Clang-Tidy or Clazy to analyze the currently open file:
|
||||
|
||||
@@ -54,6 +48,8 @@
|
||||
\uicontrol {Analyze Current File with Clazy}.
|
||||
\endlist
|
||||
|
||||
\section1 Analyze an open project
|
||||
|
||||
To run Clang-Tidy or Clazy to analyze an open project:
|
||||
|
||||
\list 1
|
||||
@@ -69,9 +65,12 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 View diagnostics
|
||||
|
||||
The \uicontrol {Clang-Tidy} or \uicontrol {Clazy} view shows the issues:
|
||||
|
||||
\image qtcreator-clang-tidy-view.webp {Clang-Tidy view}
|
||||
\caption Diagnostics in the Clang-Tidy view.
|
||||
|
||||
\note If you select \uicontrol Debug in the mode selector to open the
|
||||
\uicontrol Debug mode and then select \uicontrol {Clang-Tidy} or
|
||||
@@ -91,21 +90,68 @@
|
||||
\inlineimage icons/refactormarker.png
|
||||
icon, hover the mouse pointer over the line.
|
||||
|
||||
Select the \inlineimage icons/settings.png
|
||||
button to customize diagnostics for the current project.
|
||||
|
||||
\section1 Disable checks
|
||||
|
||||
To disable checks of a particular type either globally or for a
|
||||
particular project, select \uicontrol {Disable This Check} or
|
||||
\uicontrol {Disable These Checks} in the context menu.
|
||||
|
||||
Select the \inlineimage icons/settings.png
|
||||
button to customize Clang diagnostics for the current project.
|
||||
\section1 Load diagnostics from YAML files
|
||||
|
||||
\image qtcreator-clang-tools-settings.webp {Clang Tools customized settings}
|
||||
In addition to running the tools to collect diagnostics, you can select
|
||||
\inlineimage icons/open.png
|
||||
to load diagnostics from \l{https://yaml.org/}{YAML} files that you exported
|
||||
using the \c {-export fixes} option.
|
||||
|
||||
\sa {Configure Clang Diagnostics}, {Speficy Clang tools settings},
|
||||
{Clang Tools}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-override-clang-tools-preferences.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-projects-configure
|
||||
|
||||
\title Speficy Clang tools settings
|
||||
|
||||
To set Clang-Tidy and Clazy checks to run for the current project:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Projects > \uicontrol {Project Settings} >
|
||||
\uicontrol {Clang Tools}.
|
||||
\image qtcreator-clang-tools-settings.webp {Clang Tools customized settings}
|
||||
\li Deselect \uicontrol {Use global settings}.
|
||||
\li Specify \uicontrol preferences for the project.
|
||||
\li In \uicontrol {Suppressed diagnostics}, you can view the suppression
|
||||
list for a project and to remove diagnostics from it.
|
||||
\endlist
|
||||
|
||||
To restore the global settings, select \uicontrol {Restore Global Settings}.
|
||||
To view and modify the global settings, select the link in
|
||||
\uicontrol {Use global settings}. To open the Clang static analyzer,
|
||||
select \uicontrol {Go to Analyzer}.
|
||||
\uicontrol {Use global settings}.
|
||||
|
||||
\section1 Configuring Clang Tools
|
||||
To open the \uicontrol Clang-Tidy view, select \uicontrol {Go to Clang-Tidy}.
|
||||
To open the \uicontrol Clazy view, select \uicontrol {Go to Clazy}.
|
||||
|
||||
\sa {Configure Clang diagnostics}, {Analyze code with Clang-Tidy and Clazy}, {Clang Tools}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-preferences-analyzer-clang-tools.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-preferences-analyzer
|
||||
|
||||
\title Clang Tools
|
||||
|
||||
\brief Set preferences for Clang-Tidy and Clazy.
|
||||
|
||||
Detect problems in C, C++, and Objective-C programs with Clang-Tidy
|
||||
and Clazy.
|
||||
|
||||
To configure Clang diagnostics globally for Clang tools:
|
||||
|
||||
@@ -119,6 +165,14 @@
|
||||
\li In the \uicontrol Clang-Tidy and \uicontrol Clazy-Standalone fields,
|
||||
set the paths to the executables to use.
|
||||
|
||||
\li The \uicontrol {Diagnostic configuration} field shows the
|
||||
checks to perform. Click the value of the field to open the
|
||||
\uicontrol {Diagnostic Configurations} dialog, where you can
|
||||
select and edit the checks to perform.
|
||||
|
||||
To perform checks from a Clang-Tidy configuration file instead,
|
||||
select \uicontrol {Prefer .clang-tidy file, if present}.
|
||||
|
||||
\li To build the project before running the Clang tools, select the
|
||||
\uicontrol {Build the project before analysis} check box. The Clang
|
||||
tools do not require that you build the project before analysis, but
|
||||
@@ -132,6 +186,31 @@
|
||||
\li In the \uicontrol {Parallel jobs} field, select the number of jobs
|
||||
to run in parallel to make the analysis faster on multi-core
|
||||
processors.
|
||||
\endlist
|
||||
|
||||
\sa {Configure Clang diagnostics}, {Analyze code with Clang-Tidy and Clazy},
|
||||
{Speficy Clang tools settings}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-configure-clang-diagnostics.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-analyze
|
||||
|
||||
\title Configure Clang diagnostics
|
||||
|
||||
Detect problems in C, C++, and Objective-C programs with Clang-Tidy
|
||||
and Clazy.
|
||||
|
||||
To select and edit the Clang checks to perform:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Select \preferences > \uicontrol Analyzer >
|
||||
\uicontrol {Clang Tools}.
|
||||
|
||||
\image qtcreator-preferences-analyzer-clang-tools.webp {Clang Tools preferences}
|
||||
|
||||
\li The \uicontrol {Diagnostic configuration} field shows the
|
||||
checks to perform. Click the value of the field to open the
|
||||
@@ -140,7 +219,7 @@
|
||||
|
||||
\image qtcreator-clang-tools-diagnostics-configuration.png {Diagnostics Configuration dialog}
|
||||
|
||||
To perform checks from a Clang Tidy configuration file instead,
|
||||
To perform checks from a Clang-Tidy configuration file instead,
|
||||
select \uicontrol {Prefer .clang-tidy file, if present} in the
|
||||
\uicontrol {Clang Tools} tab.
|
||||
|
||||
@@ -188,6 +267,8 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\section2 Suppressing Diagnostics
|
||||
|
||||
To suppress diagnostics, select \uicontrol {Suppress This Diagnostic} in the
|
||||
context menu. To view the suppression list for a project and to remove
|
||||
diagnostics from it, select \uicontrol Projects >
|
||||
@@ -225,4 +306,6 @@
|
||||
To add more checks using \QC later on, copy the checks from your .clang-tidy
|
||||
file into the \uicontrol {Edit Checks as String} field, select additional
|
||||
checks, and copy-paste the contents of the field to the .clang-tidy file.
|
||||
|
||||
\sa {Analyze code with Clang-Tidy and Clazy}, {Speficy Clang tools settings}, {Clang Tools}
|
||||
*/
|
||||
|
@@ -85,5 +85,5 @@
|
||||
\li Implicit Manual Coverage Validation
|
||||
\endlist
|
||||
|
||||
\sa {Enable and disable plugins}, {Specifying Text Editor Settings}
|
||||
\sa {Enable and disable plugins}, {Font & Colors}
|
||||
*/
|
||||
|
@@ -50,4 +50,5 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\sa {Specify Valgrind settings for a project}
|
||||
*/
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
To enable helpful code editing features for Java, such as code completion,
|
||||
highlighting, function tooltips, and navigating in code, add a
|
||||
\l{Java Language Server}{Java language server}.
|
||||
\l{Add a Java language server}{Java language server}.
|
||||
|
||||
\QC integrates the Android Debug Bridge (\c adb) command-line tool for
|
||||
deploying applications to Android devices, running them, and reading their
|
||||
|
@@ -1,16 +1,27 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
//! [run settings android]
|
||||
\page creator-run-settings-android.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\section1 Specifying Run Settings for Android Devices
|
||||
\ingroup creator-reference-run-configurations
|
||||
|
||||
\title Android Run Settings
|
||||
|
||||
\brief Settings for running applications on Android devices.
|
||||
|
||||
Specify settings for running applications on the \l {kits-tab}{Run device} that
|
||||
you select for a kit in \uicontrol Projects > \uicontrol {Build & Run} >
|
||||
\uicontrol Run > \uicontrol {Run Settings}.
|
||||
|
||||
To run and debug an application on an Android device, you must create
|
||||
connections from the development host to the device, as instructed in
|
||||
\l {Connecting Android Devices}.
|
||||
|
||||
A default set of Android Activity manager (am) start options is applied when
|
||||
\section1 am Start Options
|
||||
|
||||
\QC applies a default set of Android Activity manager (am) start options when
|
||||
starting applications. You can specify additional start options in the
|
||||
\uicontrol {Activity manager start arguments} field. However, if the default
|
||||
options conflict with the added options, the application might not start.
|
||||
@@ -30,10 +41,12 @@
|
||||
For example, to run the application as a particular user, enter the start
|
||||
option \c {--user 10}, where \c 10 is the user ID of the user account.
|
||||
|
||||
\image qtcreator-android-run-settings.png
|
||||
\image qtcreator-android-run-settings.png {Run Settings for an Android device}
|
||||
|
||||
You can specify shell commands to run before the application is started
|
||||
and after it is quit. For example, enter the following commands into
|
||||
\section1 Shell Commands
|
||||
|
||||
You can specify shell commands to run before the application starts
|
||||
and after it quits. For example, enter the following commands into
|
||||
\uicontrol{Pre-launch on-device shell commands} to unlock the screen and
|
||||
to switch to the user account \c 10 on the device before running the
|
||||
application:
|
||||
@@ -52,5 +65,6 @@
|
||||
input keyevent 82
|
||||
\endcode
|
||||
|
||||
//! [run settings android]
|
||||
\sa {Activate kits for a project}, {Configure projects for running},
|
||||
{Connecting Android Devices}
|
||||
*/
|
@@ -36,7 +36,7 @@
|
||||
\uicontrol {Build Android APK} > \uicontrol Details.
|
||||
|
||||
For more information about options that you have for running applications,
|
||||
see \l {Specifying Run Settings for Android Devices}.
|
||||
see \l {Android Run Settings}.
|
||||
|
||||
\section1 Packaging Applications
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
\uicontrol Manage.
|
||||
|
||||
For more information about specifying additional start options for
|
||||
applications, see \l{Specifying Run Settings for Android Devices}.
|
||||
applications, see \l{Android Run Settings}.
|
||||
|
||||
To remove previously installed files from the device, select
|
||||
\uicontrol {Uninstall the existing app before deployment}.
|
||||
|
@@ -2,19 +2,26 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-build-settings.html
|
||||
\page creator-build-settings-cmake.html
|
||||
\nextpage creator-build-settings-cmake-presets.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-build-configurations
|
||||
|
||||
\title CMake Build Configuration
|
||||
|
||||
\brief Settings for building applications with CMake.
|
||||
|
||||
Specify build settings for the selected \l{glossary-buildandrun-kit}{kit} in
|
||||
\uicontrol Projects > \uicontrol {Build & Run} > \uicontrol Build >
|
||||
\uicontrol {Build Settings}.
|
||||
|
||||
Configuring medium-sized to large CMake projects in \QC can be a
|
||||
challenge due to the number of variables that you need to pass to
|
||||
CMake to configure the project correctly. To make this easier,
|
||||
\QC creates an initial configuration for you based on the kit
|
||||
settings and displays it in \uicontrol {Initial Configuration} in
|
||||
the \l{Specifying Build Settings}{Build Settings} of the project.
|
||||
Alternatively, you can use CMake presets to configure CMake.
|
||||
the \uicontrol {Build Settings} of the project.
|
||||
Or, you can use CMake presets to configure CMake.
|
||||
|
||||
The \uicontrol Configure field displays the effective CMake call that
|
||||
\QC constructs using the values of the \uicontrol {Build directory} and
|
||||
@@ -243,8 +250,8 @@
|
||||
|
||||
\section1 Using CMake with Conan
|
||||
|
||||
\QC can automatically set up the \l {Setting Up Conan}
|
||||
{Conan package manager} for use with CMake.
|
||||
\QC can automatically set up the \l {Conan Package Manager} for use with
|
||||
CMake.
|
||||
|
||||
Select \preferences > \uicontrol CMake
|
||||
\uicontrol General > \uicontrol {Package manager auto setup} to set the
|
||||
@@ -267,4 +274,7 @@
|
||||
\image qtcreator-cmake-clean-steps.webp {CMake clean steps}
|
||||
|
||||
The build errors and warnings are parsed and displayed in \l Issues.
|
||||
|
||||
\sa {Activate kits for a project}, {Configure projects for building},
|
||||
{Configure projects for running}, {Open projects}, {CMake}
|
||||
*/
|
||||
|
@@ -2,12 +2,15 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-build-settings-cmake.html
|
||||
\page creator-build-settings-cmake-presets.html
|
||||
\nextpage creator-build-settings-qmake.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-build-configurations
|
||||
|
||||
\title CMake Presets
|
||||
|
||||
\brief Examples of supported CMake presets.
|
||||
|
||||
\c CMakePresets.json has options for project-wide builds, whereas
|
||||
\c CMakeUserPresets.json has options for your local builds.
|
||||
|
||||
@@ -224,4 +227,6 @@
|
||||
]
|
||||
}
|
||||
\endcode
|
||||
|
||||
\sa {CMake Build Configuration}, {CMake}
|
||||
*/
|
||||
|
@@ -37,20 +37,20 @@
|
||||
\list
|
||||
\li For CMake version 3.5 or later, generate a
|
||||
\l{CMake: CMAKE_EXPORT_COMPILE_COMMANDS}{compilation database} and
|
||||
open that in \QC, as described in \l{Using Compilation Databases}.
|
||||
open that in \QC, as described in \l{Use compilation databases}.
|
||||
\li Create an ad-hoc project file for a qmake build using
|
||||
\c{qmake -project} and \l{Open projects}{open} that in \QC.
|
||||
Typically, you cannot compile such projects without manual changes.
|
||||
\li Manually create an ad-hoc project file for a
|
||||
\l{Setting Up a Generic Project}{generic project} and
|
||||
\l{Import an existing project}{generic project} and
|
||||
open that in \QC.
|
||||
Typically, you cannot compile such projects without manual changes.
|
||||
\endlist
|
||||
|
||||
\sa {Build with CMake}{How To: Build with CMake}, {Open projects},
|
||||
{CMake Build Configuration}, {Debug CMake project files},
|
||||
{Specifying Build Settings}, {Specifying Run Settings},
|
||||
{Deploying to Remote Linux}
|
||||
\sa {Build with CMake}{How To: Build with CMake}, {CMake Build Configuration},
|
||||
{Configure projects for building}, {Configure projects for running},
|
||||
{Debug CMake project files}, {Deploying to Remote Linux}, {Open projects},
|
||||
{Use compilation databases}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
\image qtcreator-kits-cmake.png {Kits preferences}
|
||||
|
||||
\sa {CMake}, {Add kits}, {Kits}
|
||||
\sa {CMake}, {Add kits}, {kits-tab}{Kits}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -235,7 +235,7 @@
|
||||
Warnings and errors are displayed in \l {Issues}.
|
||||
|
||||
\sa {CMake}, {Add libraries to CMake projects}, {Complete CMake code},
|
||||
{Completing Code Snippets}, {Format CMake files}
|
||||
{Format CMake files}, {Completion}, {Snippets}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -260,8 +260,10 @@
|
||||
\li \c{$ENV} for environment variables
|
||||
\endlist
|
||||
|
||||
\sa {CMake}, {Completing Code}, {Completing Code Snippets},
|
||||
{Edit CMake configuration files}
|
||||
Press \key Tab or \key Enter to accept the selected suggestion and complete
|
||||
the code.
|
||||
|
||||
\sa {CMake}, {Edit CMake configuration files}, {Completion}, {Snippets}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -286,17 +288,17 @@
|
||||
\c {cmake-format.exe}.
|
||||
\li Select \uicontrol {Automatic formatting on file save} to automatically
|
||||
format CMake files when you save them.
|
||||
\li In \uicontrol {Restrict to MIME types}, add the \l{Editing MIME Types}
|
||||
{MIME types} of the files to format, separated by semicolons. The
|
||||
default value, \c {text/x-cmake} formats CMake files. If the field is
|
||||
empty, all files are formatted.
|
||||
\li In \uicontrol {Restrict to MIME types}, add the MIME types of the
|
||||
files to format, separated by semicolons. The default value,
|
||||
\c {text/x-cmake} formats CMake files. If the field is empty, all
|
||||
files are formatted.
|
||||
\li Select the \uicontrol {Restrict to files contained in the current
|
||||
project} check box to only format CMake files that belong to the
|
||||
current project.
|
||||
\endlist
|
||||
|
||||
\sa {CMake},{Complete CMake code}, {Edit CMake configuration files},
|
||||
{Editing MIME Types}
|
||||
{Edit MIME types}
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -364,7 +366,7 @@
|
||||
For CMake projects that have external dependencies, use
|
||||
\l{CMake: Find Modules}{Find<package>.cmake} modules that
|
||||
expose imported targets. You can use the pre-defined \c sample_find_module
|
||||
\l{Completing Code Snippets}{code snippet} to add sample commands
|
||||
\l{Snippets}{code snippet} to add sample commands
|
||||
to a \c .cmake file. You can then change the commands as necessary.
|
||||
|
||||
Place Find modules in the \c ${CMAKE_CURRENT_SOURCE_DIR}/cmake directory, and
|
||||
@@ -376,5 +378,5 @@
|
||||
\endcode
|
||||
|
||||
\sa {CMake}, {Edit CMake configuration files}, {Complete CMake code},
|
||||
{Completing Code Snippets}
|
||||
{Completion}, {Snippets}
|
||||
*/
|
||||
|
@@ -2,22 +2,23 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-build-settings-incredibuild.html
|
||||
\page creator-build-settings-conan.html
|
||||
\nextpage creator-run-settings.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-build-configurations
|
||||
|
||||
\title Conan Build Configuration
|
||||
|
||||
You can specify build steps for Conan.
|
||||
\brief Settings for building applications with the Conan package manager.
|
||||
|
||||
For more information about configuring Conan, see \l{Setting Up Conan}.
|
||||
|
||||
\section1 Conan Build Steps
|
||||
Specify build settings for the selected \l{glossary-buildandrun-kit}{kit} in
|
||||
\uicontrol Projects > \uicontrol {Build & Run} > \uicontrol Build >
|
||||
\uicontrol {Build Settings}.
|
||||
|
||||
To configure a project to be built using the Conan package manager, select
|
||||
\uicontrol {Add Build Step} > \uicontrol {Run Conan Install}.
|
||||
|
||||
\image qtcreator-build-steps-conan-install.png "Conan Install build step"
|
||||
\image qtcreator-build-steps-conan-install.png {Conan Install build step}
|
||||
|
||||
In the \uicontrol {Conan file} field, enter the location of the
|
||||
\e conanfile.txt file for the project.
|
||||
@@ -28,4 +29,6 @@
|
||||
|
||||
Select \uicontrol {Build missing} to build packages from source if binary
|
||||
packages are not found.
|
||||
|
||||
\sa {Conan Package Manager}
|
||||
*/
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
\ingroup creator-reference-build-systems
|
||||
|
||||
\title Setting Up Conan
|
||||
\title Conan Package Manager
|
||||
|
||||
\brief The experimental Conan plugin integrates the Conan package manager.
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
{conanfile.txt} file that specifies the needed libraries and packages.
|
||||
Then, you must edit the build settings of the project to specify the
|
||||
location of the file and the contents of the Conan install command.
|
||||
For more information, see \l {Conan Build Steps}.
|
||||
|
||||
Alternatively, you can automatically set up the Conan package manager for
|
||||
use with CMake. For more information, see \l{Using CMake with Conan}.
|
||||
use with CMake.
|
||||
|
||||
\sa {Enable and disable plugins}
|
||||
\sa {Conan Build Configuration}, {Enable and disable plugins},
|
||||
{Using CMake with Conan}
|
||||
*/
|
||||
|
@@ -16,7 +16,7 @@
|
||||
\title Setting Up Debugger
|
||||
|
||||
The main debugger preferences are associated with the
|
||||
\l{Kits}{kit} you build and run your project with. To
|
||||
\l{kits-tab}{kit} you build and run your project with. To
|
||||
specify the debugger and compiler to use for each kit, select
|
||||
\preferences > \uicontrol Kits.
|
||||
|
||||
|
@@ -674,7 +674,7 @@
|
||||
\row
|
||||
\li Editor
|
||||
\li Open the current source file in the text editor for changing it.
|
||||
\li \l {Working in Edit Mode}
|
||||
\li \l {Edit Mode}
|
||||
\endtable
|
||||
|
||||
\note The \uicontrol Views menu shows some views only while you are
|
||||
@@ -696,9 +696,6 @@
|
||||
\uicontrol View > \uicontrol Views > \uicontrol {Reset to Default Layout}
|
||||
to reset the views to their original sizes and positions.
|
||||
|
||||
To save space on the screen, select \uicontrol View > \uicontrol Views >
|
||||
\uicontrol {Automatically Hide View Titlebars}.
|
||||
|
||||
To show and hide columns in views, toggle \uicontrol {Show Column} in
|
||||
the context menu.
|
||||
|
||||
|
@@ -36,8 +36,8 @@
|
||||
|
||||
\if defined(qtcreator)
|
||||
The process of setting up debugging for Qt Quick projects depends on the
|
||||
\l{Creating Qt Quick Projects}{type of the project}: Qt Quick UI or Qt Quick
|
||||
Application, and the Qt version used.
|
||||
\e type of the project: \uicontrol {Qt Quick UI Prototype} or
|
||||
\uicontrol {Qt Quick Application}, and the Qt version.
|
||||
|
||||
\section2 Debugging Qt Quick UI Projects
|
||||
\endif
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
To build, run, and debug applications on Docker devices, you must install and
|
||||
configure \c docker-cli on the development host. \QC automatically detects
|
||||
\l{Kits}{build and run kit} items, such \l{Add debuggers}
|
||||
\l{kits-tab}{build and run kit} items, such \l{Add debuggers}
|
||||
{debuggers} and \l{Add Qt versions}{Qt versions}, in the Docker container
|
||||
and creates kits for the devices.
|
||||
|
||||
|
@@ -1,64 +1,36 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-checking-code-syntax.html
|
||||
\page creator-completing-code.html
|
||||
\nextpage creator-indenting-code.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-editor-functions.html
|
||||
\else
|
||||
\previouspage creator-how-tos.html
|
||||
\endif
|
||||
|
||||
\title Completing Code
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
\title Complete code
|
||||
|
||||
As you write code, \QC suggests properties, IDs, and code snippets to
|
||||
complete the code. It shows a list of suggestions to
|
||||
the statement currently under your cursor. Press \key Tab
|
||||
or \key Enter to accept the selected suggestion and complete the code.
|
||||
the statement currently under your cursor.
|
||||
|
||||
Press \key Tab or \key Enter to accept the selected suggestion and complete
|
||||
the code.
|
||||
|
||||
\if defined(qtcreator)
|
||||
The following image displays suggestions for completing C++ code:
|
||||
|
||||
\image qtcreator-codecompletion.png
|
||||
\caption Suggestions for completing C++ code.
|
||||
\endif
|
||||
|
||||
The following image displays suggestions for completing QML code:
|
||||
|
||||
\image qml-code-completion.png
|
||||
\caption Suggestions for completing QML code.
|
||||
|
||||
To open the list of suggestions at any time, press \key {Ctrl+Space}.
|
||||
If only one option is available, \QC inserts it automatically.
|
||||
|
||||
\section1 Specifying Completion Settings
|
||||
|
||||
To specify settings for code completion, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol Completion.
|
||||
|
||||
\image qtcreator-preferences-texteditor-completion.webp "Text Editor Completion preferences"
|
||||
|
||||
By default, code completion does not consider case. To apply full or
|
||||
first-letter case-sensitivity, select \uicontrol Full or
|
||||
\uicontrol {First Letter} in the \uicontrol {Case-sensitivity} field.
|
||||
|
||||
By default, code completion is always invoked, but you can change this
|
||||
behavior in the \uicontrol {Activate completion} field to invoke
|
||||
it \uicontrol Manually or \uicontrol {When Triggered}.
|
||||
|
||||
You can set a timeout in milliseconds for code completion in the
|
||||
\uicontrol {Timeout in ms} field.
|
||||
|
||||
In the \uicontrol {Character threshold} field, specify the number of
|
||||
characters you need to enter before code completion is triggered.
|
||||
|
||||
When completion is invoked manually, \QC completes the common prefix of the
|
||||
list of suggestions. This is especially useful for classes with several
|
||||
similarly named members. To disable this functionality, deselect the
|
||||
\uicontrol {Autocomplete common prefix} check box.
|
||||
|
||||
Select the \uicontrol {Automatically split strings} check box to split
|
||||
a string to two lines by adding an end quote at the cursor position when
|
||||
you press \key Enter and a start quote at the beginning of the next line,
|
||||
before the rest of the string. In addition, pressing \key {Shift+Enter}
|
||||
inserts an escape character at the cursor position and moves the rest of
|
||||
the string to the next line.
|
||||
|
||||
\section1 Summary of Available Types
|
||||
|
||||
The following table lists available types for code completion and icon used
|
||||
@@ -131,7 +103,7 @@
|
||||
\endif
|
||||
\endtable
|
||||
|
||||
\section1 Completing Code Snippets
|
||||
\section1 Complete code snippets
|
||||
|
||||
Code snippets can consist of multiple variables that you specify values for.
|
||||
Select an item in the list and press \key Tab or \key Enter to complete the
|
||||
@@ -140,71 +112,128 @@
|
||||
within the snippet are renamed.
|
||||
|
||||
\if defined(qtcreator)
|
||||
The following image shows a C++ code snippet:
|
||||
|
||||
\image qmldesigner-code-completion.png "Completing C++ code"
|
||||
\caption C++ code snippet.
|
||||
\endif
|
||||
|
||||
The following image shows a QML code snippet:
|
||||
|
||||
\image qml-code-snippet.png
|
||||
|
||||
\section2 Editing Code Snippets
|
||||
|
||||
Code snippets specify code constructs. You can add, modify,
|
||||
and remove snippets in the snippet editor. To open the editor, select
|
||||
\preferences > \uicontrol {Text Editor} >
|
||||
\uicontrol Snippets.
|
||||
\caption QML code snippet.
|
||||
|
||||
\if defined(qtcreator)
|
||||
The following image shows built-in C++ code snippets:
|
||||
|
||||
\image qtcreator-edit-code-snippets.png "C++ snippet preferences"
|
||||
\sa {Complete CMake code}, {Nim}
|
||||
\endif
|
||||
|
||||
The following image shows built-in QML code snippets:
|
||||
\sa {Add code snippets to the auto-complete menu}, {Completion}, {Snippets}
|
||||
*/
|
||||
|
||||
\image qml-snippet-editor.png
|
||||
/*!
|
||||
\page creator-preferences-text-editor-completion.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-completing-code.html
|
||||
\else
|
||||
\previouspage creator-reference.html
|
||||
\endif
|
||||
|
||||
\ingroup creator-reference-preferences-text-editor
|
||||
|
||||
\title Completion
|
||||
|
||||
\brief Set preferences for code completion and inserting matching characters
|
||||
in the text editor.
|
||||
|
||||
To set preferences for code completion, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol Completion.
|
||||
|
||||
\image qtcreator-preferences-texteditor-completion.webp {Text Editor Completion preferences}
|
||||
|
||||
\section1 Code Completion Behavior
|
||||
|
||||
By default, code completion does not consider case. To apply full or
|
||||
first-letter case-sensitivity, select \uicontrol Full or
|
||||
\uicontrol {First Letter} in the \uicontrol {Case-sensitivity} field.
|
||||
|
||||
By default, code completion is always invoked, but you can change this
|
||||
behavior in the \uicontrol {Activate completion} field to invoke
|
||||
it \uicontrol Manually or \uicontrol {When Triggered}.
|
||||
|
||||
You can set a timeout in milliseconds for code completion in the
|
||||
\uicontrol {Timeout in ms} field.
|
||||
|
||||
In the \uicontrol {Character threshold} field, specify the number of
|
||||
characters you need to enter before code completion is triggered.
|
||||
|
||||
When completion is invoked manually, \QC completes the common prefix of the
|
||||
list of suggestions. This is especially useful for classes with several
|
||||
similarly named members. To disable this functionality, deselect the
|
||||
\uicontrol {Autocomplete common prefix} check box.
|
||||
|
||||
Select the \uicontrol {Automatically split strings} check box to split
|
||||
a string to two lines by adding an end quote at the cursor position when
|
||||
you press \key Enter and a start quote at the beginning of the next line,
|
||||
before the rest of the string. In addition, pressing \key {Shift+Enter}
|
||||
inserts an escape character at the cursor position and moves the rest of
|
||||
the string to the next line.
|
||||
|
||||
\section1 Automatically Inserting Matching Characters
|
||||
|
||||
When you have selected code and enter brackets or quotes, the matching
|
||||
closing character is added automatically at the end of the selection.
|
||||
|
||||
By default, the automatically inserted text is highlighted and animated,
|
||||
skipped when you type, and removed when you press \key Backspace.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\sa {Complete CMake code}, {Enclose code in brackets or quotes}, {Nim}
|
||||
\endif
|
||||
|
||||
\sa {Complete code}, {Snippets}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-preferences-text-editor-shippets.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-completing-code.html
|
||||
\else
|
||||
\previouspage creator-reference.html
|
||||
\endif
|
||||
|
||||
\ingroup creator-reference-preferences-text-editor
|
||||
|
||||
\title Snippets
|
||||
|
||||
\brief Add, change, and remove snippets in the snippet editor.
|
||||
|
||||
To add, change, and remove snippets in the snippet editor, select
|
||||
\preferences > \uicontrol {Text Editor} > \uicontrol Snippets.
|
||||
|
||||
\QC has built-in snippets in the following categories:
|
||||
|
||||
\list
|
||||
|
||||
\li Text snippets, which can have any text string. For example, code
|
||||
comments
|
||||
|
||||
\if defined(qtcreator)
|
||||
\li C++ code snippets, which specify C++ code constructs
|
||||
|
||||
\li CMake code snippets that you can use when editing \c CMakeLists.txt
|
||||
files in the CMake editor
|
||||
\endif
|
||||
|
||||
\li QML code snippets, which specify QML code constructs
|
||||
|
||||
\if defined(qtcreator)
|
||||
\li Nim code snippets, which specify Nim code constructs
|
||||
\endif
|
||||
|
||||
\endlist
|
||||
|
||||
\section2 Adding and Editing Snippets
|
||||
|
||||
Select a snippet in the list to edit it in the snippet editor. To add a new
|
||||
snippet, select \uicontrol Add. Specify a trigger and, if the trigger is
|
||||
already in use, an optional variant, which appear in the list of suggestions
|
||||
when you write code.
|
||||
\if defined(qtcreator)
|
||||
Also specify a text string or C++ or QML code construct
|
||||
in the snippet editor, depending on the snippet category.
|
||||
|
||||
You can use \l{Use Qt Creator variables}{predefined variables} in
|
||||
snippets.
|
||||
\else
|
||||
Also specify a text string or QML code in the snippet editor, depending on
|
||||
the snippet category.
|
||||
\image qtcreator-edit-code-snippets.png {C++ snippet preferences}
|
||||
\caption Built-in C++ code snippets.
|
||||
\endif
|
||||
|
||||
\image qml-snippet-editor.png
|
||||
\caption Built-in QML code snippets.
|
||||
|
||||
\section1 Editing Snippets
|
||||
|
||||
Select a snippet in the list to edit it in the snippet editor.
|
||||
|
||||
The snippet editor offers:
|
||||
|
||||
\list
|
||||
@@ -270,7 +299,7 @@
|
||||
To discard the changes you made to a built-in snippet, select
|
||||
\uicontrol {Revert Built-in}.
|
||||
|
||||
\section2 Removing Snippets
|
||||
\section1 Removing Snippets
|
||||
|
||||
The list of suggestions might show several similar built-in snippets for
|
||||
different use cases. To make it shorter when you write code, remove the
|
||||
@@ -281,7 +310,7 @@
|
||||
\uicontrol Remove. To restore the removed snippets, select
|
||||
\uicontrol {Restore Removed Built-ins}.
|
||||
|
||||
\section2 Resetting Snippets
|
||||
\section1 Resetting Snippets
|
||||
|
||||
To remove all added snippets and to restore all removed snippets, select
|
||||
\uicontrol {Reset All}.
|
||||
@@ -290,16 +319,50 @@
|
||||
lose all your own snippets.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Completing Nim Code
|
||||
|
||||
You can use the \l{https://nim-lang.org/docs/nimsuggest.html}{Nimsuggest}
|
||||
tool to query \c {.nim} source files and obtain suggestions for code
|
||||
completion.
|
||||
|
||||
To use Nimsuggest, you must install it on the development PC. Then select
|
||||
\preferences > \uicontrol Nim > \uicontrol Tools,
|
||||
and enter the path to the tool executable in the \uicontrol Path field.
|
||||
|
||||
\sa {Document code}, {Use Qt Creator variables}
|
||||
\sa {Complete CMake code}, {Document code}, {Use Qt Creator variables},
|
||||
{Nim}
|
||||
\endif
|
||||
|
||||
\sa {Add code snippets to the auto-complete menu}, {Complete code},
|
||||
{Completion}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-add-code-snippets.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-completing-code.html
|
||||
\else
|
||||
\previouspage creator-how-tos.html
|
||||
\endif
|
||||
|
||||
\ingroup creator-how-to-configure-editors
|
||||
|
||||
\title Add code snippets to the auto-complete menu
|
||||
|
||||
To add code or text snippets in the snippet editor:
|
||||
|
||||
\list 1
|
||||
\li Select \preferences > \uicontrol {Text Editor} > \uicontrol Snippets.
|
||||
\image qtcreator-snippet-modifiers.png {Snippets preferences}
|
||||
\li In \uicontrol Group, select the type of snippet to add.
|
||||
\li Select \uicontrol Add.
|
||||
\li Specify a trigger. If the trigger is already in use, add an optional
|
||||
variant. They appear in the list of suggestions when you write code.
|
||||
\if defined(qtcreator)
|
||||
Also specify a text string or C++ or QML code construct
|
||||
in the snippet editor, depending on the snippet category.
|
||||
|
||||
You can use \l{Use Qt Creator variables}{predefined variables} in
|
||||
snippets.
|
||||
\else
|
||||
Also specify a text string or QML code in the snippet editor, depending on
|
||||
the snippet category.
|
||||
\endif
|
||||
\endlist
|
||||
|
||||
\if defined(qtcreator)
|
||||
\sa {Complete CMake code}, {Complete code}, {Use Qt Creator variables},
|
||||
{Nim}
|
||||
\endif
|
||||
\sa {Completion}, {Snippets}
|
||||
*/
|
||||
|
@@ -1,13 +1,18 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\page creator-editor-refactoring.html
|
||||
\previouspage creator-jump-to-the-code.html
|
||||
\nextpage creator-editor-quick-fixes.html
|
||||
\nextpage creator-editor-options.html
|
||||
|
||||
\title Refactoring
|
||||
|
||||
\e {Code refactoring} is the process of improving and simplifying code
|
||||
without modifying the existing functionality of an application. You
|
||||
can easily find and rename symbols and apply predefined actions to
|
||||
refactor code.
|
||||
|
||||
Refactor code to:
|
||||
|
||||
\list
|
||||
@@ -17,9 +22,8 @@
|
||||
\li Simplify code structure
|
||||
\endlist
|
||||
|
||||
\QC allows you to quickly and conveniently apply actions to refactor your
|
||||
code by selecting them in a context menu. For more information, see
|
||||
\l{Applying Refactoring Actions}.
|
||||
To quickly and conveniently apply actions to refactor your
|
||||
code, \l{Apply quick fixes}{select quick fixes in a context menu}.
|
||||
|
||||
By default, the refactored files are saved automatically. To disable
|
||||
this feature, deselect \preferences > \uicontrol Environment >
|
||||
@@ -33,13 +37,13 @@
|
||||
\uicontrol {C++} > \uicontrol {Find References to Symbol Under Cursor} or
|
||||
press \key {Ctrl+Shift+U}.
|
||||
|
||||
\image qtcreator-find-references-to-symbol-under-cursor.png "Search results for finding references to symbols"
|
||||
\image qtcreator-find-references-to-symbol-under-cursor.png {Search results for finding references to symbols}
|
||||
|
||||
To view the same results color-coded according to the access type, such as
|
||||
read, write, or declaration, select \uicontrol Tools > \uicontrol {C++} >
|
||||
\uicontrol {Find References with Access Type}.
|
||||
|
||||
\note You can also select \uicontrol Edit > \uicontrol {Find/Replace} >
|
||||
\note Select \uicontrol Edit > \uicontrol {Find/Replace} >
|
||||
\uicontrol {Advanced Find} > \uicontrol {C++ Symbols} to search for
|
||||
classes, functions, enums, and declarations (including type aliases) either
|
||||
from files listed as part of the project or from all files that are used by
|
||||
@@ -76,7 +80,7 @@
|
||||
\image qml-find-usages.png
|
||||
\endif
|
||||
|
||||
You can browse the search results in the following ways:
|
||||
Browse the search results in the following ways:
|
||||
|
||||
\list
|
||||
\li To go directly to an instance, double-click the instance in
|
||||
@@ -138,7 +142,12 @@
|
||||
box to also change the filenames that match the class name.
|
||||
|
||||
\note Renaming local symbols does not open \uicontrol {Search Results}.
|
||||
The instances of the symbol are highlighted in code and you can edit
|
||||
The instances of the symbol are highlighted in code, and you can edit
|
||||
the symbol. All instances of the local symbol are changed as you type.
|
||||
|
||||
\sa {Specify settings for quick fixes}, {Quick Fixes}, {C++ Quick Fixes}
|
||||
|
||||
\endif
|
||||
*/
|
||||
|
||||
\sa {Apply quick fixes}, {QML Quick Fixes}
|
||||
*/
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
You can use the icons in the tooltip popup to copy the error or
|
||||
warning message to the clipboard, to hide messages of a particular type,
|
||||
or to \l{Configuring clangd}{change the diagnostics settings}. Select
|
||||
or to \l{Clangd}{change the diagnostics settings}. Select
|
||||
the \uicontrol {Annotation Settings} link to specify the position
|
||||
of the line annotations.
|
||||
|
||||
@@ -662,7 +662,7 @@
|
||||
\li M325
|
||||
\li Warning
|
||||
\li Logical value does not depend on actual values
|
||||
\li
|
||||
\li Removed: This warning is no longer being used since Qt Creator version 12.
|
||||
|
||||
\row
|
||||
\li M326
|
||||
@@ -712,7 +712,9 @@
|
||||
\uicontrol {Disable messages for non Qt Quick UI}. You cannot
|
||||
enable messages just for non-Qt Quick UI files.
|
||||
|
||||
\sa {QML Language Server}
|
||||
\if defined(qtcreator)
|
||||
\sa {Turn on QML language server}
|
||||
\endif
|
||||
|
||||
\section1 Resetting the Code Model
|
||||
|
||||
|
@@ -50,14 +50,6 @@
|
||||
can easily find and rename symbols and apply predefined actions to
|
||||
refactor code.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\li \l{Beautifying Source Code}
|
||||
|
||||
Beautifying code means applying indentation and style to source
|
||||
code files. You can use the Artistic Style, ClangFormat, or
|
||||
Uncrustify tool to format source files.
|
||||
\endif
|
||||
|
||||
\li \l{Configuring the Editor}
|
||||
|
||||
You can change the fonts, colors, highlighting, and indentation.
|
||||
@@ -69,48 +61,6 @@
|
||||
\endlist
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Related Topics
|
||||
|
||||
\list
|
||||
|
||||
\li \l{Editing Markdown Files}
|
||||
|
||||
Edit and preview markdown (.md) files.
|
||||
|
||||
\li \l{Using Language Servers}
|
||||
|
||||
The language client offers code completion, highlighting of the
|
||||
symbol under cursor, and jumping to the symbol definition for other
|
||||
programming languages besides C++. In addition, it integrates
|
||||
diagnostics from the language server.
|
||||
|
||||
\li \l {Using GitHub Copilot}
|
||||
|
||||
The Copilot plugin (disabled by default) integrates
|
||||
\l{https://github.com/features/copilot}{GitHub Copilot} into \QC.
|
||||
You can view suggestions from Copilot in the code editor.
|
||||
|
||||
\li \l{Editing MIME Types}
|
||||
|
||||
\QC uses the MIME type of a file to determine which mode and editor
|
||||
to use for opening the file. If your files do not match the
|
||||
predefined MIME types, you can edit the MIME types.
|
||||
|
||||
\li \l{Modeling}
|
||||
|
||||
You can use the model editor to create Universal Modeling Language
|
||||
(UML) style models with structured and behavioral diagrams that
|
||||
show your system in many ways and store them in XML format.
|
||||
|
||||
\li \l{Editing State Charts}
|
||||
|
||||
You can use \QC to create applications that embed state machines. A
|
||||
project wizard creates \l{https://www.w3.org/TR/scxml/}
|
||||
{State Chart XML (SCXML)} files with boilerplate code that you can
|
||||
edit using an SCXML editor. You can use the classes in
|
||||
the Qt SCXML module to embed state machines created from the files
|
||||
in Qt applications.
|
||||
|
||||
\endlist
|
||||
\sa {Using GitHub Copilot}
|
||||
\endif
|
||||
*/
|
||||
|
@@ -55,7 +55,7 @@
|
||||
|
||||
If \QC cannot detect the encoding of the files to compare, an info bar
|
||||
appears that displays the option to reload the document using some other
|
||||
encoding. For more information, see \l {File Encoding}.
|
||||
encoding. For more information, see \l {Change text encoding}.
|
||||
|
||||
\section1 Viewing the Changes
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
// **********************************************************************
|
||||
@@ -8,27 +8,27 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\page creator-editor-options-text.html
|
||||
\previouspage creator-editor-options.html
|
||||
\page creator-preferences-text-editor-font-colors.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-editor-options.html
|
||||
\nextpage studio-debugging.html
|
||||
\else
|
||||
\nextpage creator-editor-fakevim.html
|
||||
\previouspage creator-reference.html
|
||||
\endif
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
\title Specifying Code View Settings
|
||||
\else
|
||||
\title Specifying Text Editor Settings
|
||||
\endif
|
||||
\ingroup creator-reference-preferences-text-editor
|
||||
|
||||
Set the font preferences and apply color schemes for syntax highlighting,
|
||||
diff editor, and code analysis results in \preferences >
|
||||
\title Font & Colors
|
||||
|
||||
\brief Set the font preferences and apply color schemes for syntax
|
||||
highlighting, diff editor, and code analysis results.
|
||||
|
||||
To set editor font and colors, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol {Font & Colors}.
|
||||
|
||||
\image qtcreator-font-colors.png "Text editor preferences"
|
||||
\image qtcreator-font-colors.png {Font & Colors tab in Text Editor preferences}
|
||||
|
||||
\section2 Configuring Fonts
|
||||
\section1 Configuring Fonts
|
||||
|
||||
You can select the font family and size. You can specify a zoom setting in
|
||||
percentage for viewing the text. You can also zoom in or out by pressing
|
||||
@@ -44,17 +44,33 @@
|
||||
on the screen. Deselect the \uicontrol Antialias check box to turn off
|
||||
antialiasing.
|
||||
|
||||
\section2 Defining Color Schemes
|
||||
\sa {Behavior}, {Change editor colors}
|
||||
*/
|
||||
|
||||
You can select one of the predefined color schemes or create customized
|
||||
color schemes.
|
||||
/*!
|
||||
\page creator-how-to-change-editor-colors.html
|
||||
\if defined(qtdesignstudio)
|
||||
\previouspage creator-editor-options.html
|
||||
\nextpage studio-debugging.html
|
||||
\else
|
||||
\previouspage creator-how-tos.html
|
||||
\endif
|
||||
|
||||
\ingroup creator-how-to-configure-editors
|
||||
|
||||
\title Change editor colors
|
||||
|
||||
You can select one of the predefined color schemes for the text editor
|
||||
or create customized color schemes.
|
||||
|
||||
\image qtcreator-font-colors.png {Font & Colors tab in Text Editor preferences}
|
||||
|
||||
To create a color scheme:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Select \preferences > \uicontrol {Text Editor} >
|
||||
\uicontrol {Fonts & Color} > \uicontrol Copy.
|
||||
\uicontrol {Font & Colors} > \uicontrol Copy.
|
||||
|
||||
\li Enter a name for the color scheme and click \uicontrol OK.
|
||||
|
||||
@@ -80,11 +96,11 @@
|
||||
format. The latter makes sure that syntax highlighting is preserved when
|
||||
pasting to a rich-text editor.
|
||||
|
||||
\section2 Exporting and Importing Color Schemes
|
||||
\section1 Export and import color schemes
|
||||
|
||||
To share color schemes with others, export and import them as XML files.
|
||||
To export a color scheme, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol {Fonts & Color} > \uicontrol Export,
|
||||
\uicontrol {Text Editor} > \uicontrol {Font & Colors} > \uicontrol Export,
|
||||
and then select the filename and location for the XML file.
|
||||
|
||||
To import a color scheme, select \uicontrol Import, and then select the XML
|
||||
@@ -94,29 +110,7 @@
|
||||
\image qtcreator-import-color-scheme.png "Import Color Scheme dialog"
|
||||
|
||||
When you select \uicontrol OK, the color scheme is added to the list of
|
||||
color schemes in the \uicontrol {Fonts & Color} tab.
|
||||
|
||||
\section2 File Encoding
|
||||
|
||||
To define the default file encoding, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol Behavior, and
|
||||
then select a suitable option in \uicontrol {Default encoding}.
|
||||
|
||||
\image qtcreator-options-texteditor-behavior-file-encodings.png "File encoding preferences"
|
||||
|
||||
Qt 5 and Qt 6 require UTF-8 encoded source files, and therefore the default
|
||||
encoding is set to \uicontrol UTF-8.
|
||||
Detecting the correct encoding is tricky, so \QC will not try to do so.
|
||||
Instead, it displays the following error message when you try to edit a file
|
||||
that is not UTF-8 encoded: \uicontrol {Error: Could not decode "filename" with
|
||||
"UTF-8"-encoding. Editing not possible.}
|
||||
|
||||
To resolve the issue, use a file conversion tool to convert the file
|
||||
encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion
|
||||
of string constants to QString might not work as expected.
|
||||
|
||||
If you develop only Qt 4 applications or other than Qt applications, you
|
||||
can set other encoding options as the default encoding. Select the
|
||||
\uicontrol System option to use the file encoding used by your system.
|
||||
color schemes in the \uicontrol {Font & Colors} tab.
|
||||
|
||||
\sa {Behavior}, {Font & Colors}
|
||||
*/
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
// **********************************************************************
|
||||
@@ -14,7 +14,7 @@
|
||||
\else
|
||||
\previouspage creator-beautifier.html
|
||||
\endif
|
||||
\nextpage creator-editor-options-text.html
|
||||
\nextpage creator-preferences-text-editor-font-colors.html
|
||||
|
||||
\title Configuring the Editor
|
||||
|
||||
@@ -32,15 +32,9 @@
|
||||
You can perform the following configuration actions:
|
||||
|
||||
\list
|
||||
\if defined(qtdesignstudio)
|
||||
\li Set the \l{Specifying Code View Settings}{font preferences and
|
||||
\li Set the \l{Font & Colors}{font preferences and
|
||||
apply color schemes} for syntax highlighting in
|
||||
\uicontrol {Font & Colors}.
|
||||
\else
|
||||
\li Set the \l{Specifying Text Editor Settings}{font preferences and
|
||||
apply color schemes} for syntax highlighting in
|
||||
\uicontrol {Font & Colors}.
|
||||
\endif
|
||||
\li Specify \l{Generic Highlighting}
|
||||
{definition files for syntax highlighting} for other types of files
|
||||
than C++ or QML in \uicontrol {Generic Highlighter}.
|
||||
@@ -52,7 +46,7 @@
|
||||
{highlighting} or \l{Folding Blocks}{folding} blocks or text
|
||||
wrapping in \uicontrol Display.
|
||||
|
||||
\li Add, modify, and remove \l{Editing Code Snippets}{code snippets} in
|
||||
\li Add, modify, and remove \l{Snippets}{code snippets} in
|
||||
\uicontrol Snippets.
|
||||
|
||||
\if defined(qtcreator)
|
||||
@@ -60,12 +54,12 @@
|
||||
in \uicontrol Macros.
|
||||
\endif
|
||||
|
||||
\li Configure \l{Completing Code}{code completion} in \uicontrol Completion.
|
||||
\li Configure \l{Completion}{code completion} in \uicontrol Completion.
|
||||
|
||||
\endlist
|
||||
|
||||
\if defined(qtcreator)
|
||||
\sa {Specify editor settings}, {Using FakeVim Mode}
|
||||
\sa {Specify editor settings}, {Edit like in Vim}, {Completion}, {Snippets}
|
||||
\endif
|
||||
|
||||
*/
|
||||
|
@@ -23,14 +23,6 @@
|
||||
in-line error indicators while you are typing.
|
||||
|
||||
\list
|
||||
\if defined(qtcreator)
|
||||
\li \l{Working in Edit Mode}
|
||||
|
||||
You can use the editor toolbar to navigate between open files
|
||||
and symbols in use. You can also split the view to work on
|
||||
several files simultaneously, add bookmarks, and move between
|
||||
symbol definitions and declarations.
|
||||
\endif
|
||||
\li \l{Semantic Highlighting}
|
||||
|
||||
\QC enables you to write well formatted code by highlighting
|
||||
@@ -46,7 +38,7 @@
|
||||
static checks on the QML and JavaScript code in your project to find
|
||||
common problems.
|
||||
|
||||
\li \l{Completing Code}
|
||||
\li \l{Complete code}
|
||||
|
||||
\QC anticipates what you are going to write and completes code
|
||||
and code snippets for elements, properties, and IDs.
|
||||
@@ -79,25 +71,10 @@
|
||||
keyboard sequence as a macro. You can then play the macro to
|
||||
repeat the sequence. You can save the latest macro and assign a
|
||||
keyboard shortcut for running it or run it from the locator.
|
||||
\endlist
|
||||
|
||||
\section1 Related Topics
|
||||
|
||||
\list
|
||||
|
||||
\li \l{Comparing Files}
|
||||
|
||||
You can use a diff editor to compare two versions of a file and
|
||||
view the differences side-by-side in the \uicontrol Edit mode.
|
||||
|
||||
\li \l{Parsing C++ Files with the Clang Code Model}
|
||||
|
||||
The Clang code model offers some of the same services as the
|
||||
built-in C/C++ code model, such as code
|
||||
completion, syntactic and semantic highlighting, diagnostics,
|
||||
tooltips, outline of symbols, and renaming of local symbols.
|
||||
\endif
|
||||
|
||||
\endlist
|
||||
|
||||
\if defined(qtcreator)
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Comparing Files}
|
||||
\endif
|
||||
*/
|
||||
|
@@ -28,10 +28,10 @@
|
||||
\li Select \uicontrol Tools > \uicontrol Locate.
|
||||
|
||||
\li Select \uicontrol Edit > \uicontrol {Go to Line}.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\li Click the line and column indicator on the
|
||||
\l{Using the Editor Toolbar}{editor toolbar}.
|
||||
|
||||
\l{Edit Mode}{editor toolbar}.
|
||||
\endif
|
||||
\endlist
|
||||
|
||||
\section1 Using Locator Filters
|
||||
@@ -72,54 +72,6 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\section2 Locating Files
|
||||
|
||||
You can locate files in the local file system or on connected devices. By
|
||||
default, the file system filter shows the files in the same folder as the
|
||||
currently open file and lets you navigate the file system. Also, it shows
|
||||
items that let you switch to another device root.
|
||||
|
||||
For example, to open a QML file called \e HelloWorld.qml in the currently
|
||||
open project using the locator:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Press \key {Ctrl+K} to activate the locator.
|
||||
|
||||
\li Start typing the filename.
|
||||
|
||||
\image qtcreator-locator-open.webp "List of files found in the locator"
|
||||
|
||||
\li Use the arrow keys to move to the filename in the list and press
|
||||
\key Enter.
|
||||
|
||||
The file opens in the editor.
|
||||
|
||||
\li To move to a line in the file, enter the line number in the locator.
|
||||
|
||||
\endlist
|
||||
|
||||
If the path to a file is very long, it might not fit into the locator
|
||||
window. To view the full path, press \key Alt when the filename is selected
|
||||
or use the handle next to the locator window to increase the window width.
|
||||
|
||||
\if defined(qtcreator)
|
||||
If the locator does not find some files, see \l{Specify project contents}
|
||||
for how to make them known to the locator.
|
||||
\endif
|
||||
|
||||
\section2 Locating Files from Global File System Index
|
||||
|
||||
You can install tools such as Spotlight, Locate, or Everything and use them
|
||||
to locate files from a global file system index. Use the \c md locator
|
||||
filter to locate the files.
|
||||
|
||||
To use the sorting from the selected tool instead of from \QC,
|
||||
deselect the \uicontrol {Sort results} check box in the \c md
|
||||
locator filter configuration.
|
||||
|
||||
\image qtcreator-locator-filter-edit-md.webp {Filter Configuration dialog}
|
||||
|
||||
\section2 Locating Lines and Columns
|
||||
|
||||
To move directly to a particular line and column in the document when you
|
||||
@@ -133,33 +85,6 @@
|
||||
HelloWorld.qml:41:2
|
||||
\endcode
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section2 Locating Symbols
|
||||
|
||||
For example, to locate symbols matching \c {QGuiApplication}:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Activate the locator.
|
||||
|
||||
\li Enter a colon (:) followed by a space and the upper case letters in
|
||||
the symbol name (here, \c {QGuiApplication}):
|
||||
|
||||
\code
|
||||
: qga
|
||||
\endcode
|
||||
|
||||
The locator lists the results.
|
||||
|
||||
\image qtcreator-locator-example.webp "List of files matching the locator filter"
|
||||
|
||||
\endlist
|
||||
|
||||
Filters locating files also accept paths, such as \c {tools/*main.cpp}.
|
||||
Filters locating class and function definitions also accept namespaces,
|
||||
such as \c {Utils::*View}.
|
||||
\endif
|
||||
|
||||
\section2 Creating Files and Directories from Locator
|
||||
|
||||
To create a new file and open it in the editor, type \c f
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
// **********************************************************************
|
||||
@@ -8,14 +8,16 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage creator-editor-quick-fixes.html
|
||||
\page creator-beautifier.html
|
||||
\nextpage creator-editor-options.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\title Beautifying Source Code
|
||||
\ingroup creator-how-to-configure-editors
|
||||
|
||||
You can use the experimental Beautifier plugin to format your source code
|
||||
by using the following external tools:
|
||||
\title Beautify source code
|
||||
|
||||
Beautifying code means applying indentation and style to source code files.
|
||||
Use the experimental Beautifier plugin to format your source code with the
|
||||
following external tools:
|
||||
|
||||
\list
|
||||
|
||||
@@ -28,22 +30,14 @@
|
||||
\endlist
|
||||
|
||||
The Beautifier plugin parses the source code into component structures, such
|
||||
as assignment statements, if blocks, loops, and so on, and formats them as
|
||||
specified in the Beautifier preferences. You can use a predefined style or
|
||||
as assignment statements, if blocks, loops, and so on, and formats them
|
||||
according to the Beautifier preferences. You can use a predefined style or
|
||||
define your own style.
|
||||
|
||||
\note Enable the Beautifier plugin to use it. Since \QC 10.0.0, the
|
||||
ClangFormat plugin is enabled by default. Select \preferences >
|
||||
\uicontrol {C++} > \uicontrol {Formatting mode} > \uicontrol Disable
|
||||
to turn off ClangFormat if you enable Beautifier because combining
|
||||
them can lead to unexpected results.
|
||||
|
||||
To use the Beautifier plugin:
|
||||
To automatically format files when you save them:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Download and install the tool to use for formatting source code:
|
||||
|
||||
\list
|
||||
\li \l{http://sourceforge.net/projects/astyle/files/astyle}
|
||||
{Artistic Style}
|
||||
@@ -51,19 +45,87 @@
|
||||
\li \l{http://sourceforge.net/projects/uncrustify/files/uncrustify}
|
||||
{Uncrustify}
|
||||
\endlist
|
||||
\note You might have to build the tools from sources for some
|
||||
platforms.
|
||||
\li Enable the Beautifier plugin.
|
||||
\note Since \QC 10.0.0, the ClangFormat plugin is enabled by default.
|
||||
Go to \preferences > \uicontrol {C++} > \uicontrol {Formatting mode},
|
||||
and select \uicontrol Disable to turn off ClangFormat if you enable
|
||||
Beautifier because combining them can lead to unexpected results.
|
||||
\li Go to \preferences > \uicontrol Beautifier > \uicontrol General to
|
||||
select the tool to use.
|
||||
\image qtcreator-preferences-beautifier-general.webp {General Beautifier preferences}
|
||||
\li Select \uicontrol {Automatic formatting on file save} to
|
||||
automatically beautify files when you save them using the tool you
|
||||
select in the \uicontrol Tool field.
|
||||
\li Go to \uicontrol {Artistic Style}, \uicontrol {ClangFormat}, or
|
||||
\uicontrol Uncrustify to set the path to the tool executable and
|
||||
to select the configuration file that defines the style to use.
|
||||
\image beautifier_options.png {Uncrustify Beautifier preferences}
|
||||
\caption Beautifier Uncrustify preferences
|
||||
\endlist
|
||||
|
||||
You might have to build the tools from sources for some platforms.
|
||||
\section1 Format the currently open file
|
||||
|
||||
\li Select \preferences >
|
||||
\uicontrol Beautifier to specify settings for beautifying files.
|
||||
Go to \uicontrol Tools > \uicontrol Beautifier > \uicontrol {Artistic Style},
|
||||
\uicontrol ClangFormat, or \uicontrol Uncrustify to select actions for
|
||||
formatting text in the current file.
|
||||
|
||||
\li Select the \uicontrol {Automatic formatting on file save} check box to
|
||||
You can \l{Keyboard Shortcuts}{create keyboard shortcuts} for the
|
||||
actions.
|
||||
|
||||
Go to \uicontrol {Format Current File} to format the currently open file.
|
||||
|
||||
\section2 Format at cursor with ClangFormat
|
||||
|
||||
Go to \uicontrol Tools > \uicontrol Beautifier > \uicontrol ClangFormat >
|
||||
\uicontrol {Format at Cursor} when no text is selected to format the
|
||||
syntactic entity under the cursor.
|
||||
|
||||
Go to \uicontrol {Format Line(s)} to format the selected lines.
|
||||
|
||||
Go to \uicontrol {Disable Formatting for Selected Text} to wrap selected
|
||||
lines within \c {// clang-format off} and \c {// clang-format on}.
|
||||
|
||||
\section2 Format selected text with Uncrustify
|
||||
|
||||
Go to \uicontrol Tools > \uicontrol Beautifier > \uicontrol Uncrustify >
|
||||
\uicontrol {Format Selected Text} when no text is selected to format
|
||||
the whole file by default.
|
||||
|
||||
To turn off this behavior, clear
|
||||
\uicontrol {Format entire file if no text was selected} in
|
||||
\preferences > \uicontrol Beautifier > \uicontrol Uncrustify.
|
||||
|
||||
\sa {Enable and disable plugins}, {Beautifier}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-preferences-beautifier.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-preferences
|
||||
|
||||
\title Beautifier
|
||||
|
||||
\brief Format source code with Artistic Style, ClangFormat, or Uncrustify.
|
||||
|
||||
Automatically apply indentation and style to source code files when you save
|
||||
them. Use a predefined style or define your own style.
|
||||
|
||||
To specify settings for beautifying files:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Go to \preferences > \uicontrol Beautifier > \uicontrol General.
|
||||
|
||||
\li Select \uicontrol {Automatic formatting on file save} to
|
||||
automatically beautify files when you save them using the tool you
|
||||
select in the \uicontrol Tool field.
|
||||
|
||||
\image qtcreator-preferences-beautifier-general.webp {General Beautifier preferences}
|
||||
|
||||
\li In the \uicontrol {Restrict to MIME types} field, define the MIME
|
||||
\li In \uicontrol {Restrict to MIME types}, define the MIME
|
||||
types of the files to beautify, separated by semicolons. Leave the
|
||||
field empty to apply the tool on all files.
|
||||
|
||||
@@ -72,97 +134,90 @@
|
||||
format the currently open file, specify this option in the
|
||||
tool-specific tab.
|
||||
|
||||
\li Select the \uicontrol {Restrict to files contained in the current
|
||||
project} check box to only beautify files that belong to the
|
||||
current project.
|
||||
\li Select \uicontrol {Restrict to files contained in the current project}
|
||||
to only beautify files that belong to the current project.
|
||||
|
||||
\li Select \uicontrol {Artistic Style}, \uicontrol {ClangFormat}, or
|
||||
\li Go to \uicontrol {Artistic Style}, \uicontrol {ClangFormat}, or
|
||||
\uicontrol Uncrustify to specify settings for the tool you want to
|
||||
use.
|
||||
|
||||
\image beautifier_options.png "Uncrustify Beautifier preferences"
|
||||
\image beautifier_options.png {Uncrustify Beautifier preferences}
|
||||
|
||||
\li In the \uicontrol Configuration group, specify the path to
|
||||
the tool executable in the \uicontrol {Artistic Style command},
|
||||
\uicontrol {ClangFormat command}, or
|
||||
\uicontrol {Uncrustify command} field.
|
||||
\li In \uicontrol Configuration, specify the path to the
|
||||
tool executable in \uicontrol {Artistic Style command},
|
||||
\uicontrol {ClangFormat command}, or \uicontrol {Uncrustify command}.
|
||||
|
||||
\li In the \uicontrol {Restrict to MIME types} field, define the MIME
|
||||
\li In \uicontrol {Restrict to MIME types}, define the MIME
|
||||
types of the files to beautify. This setting is applied when you
|
||||
select the menu item to format the currently open file.
|
||||
|
||||
\li In the \uicontrol Options group, select the configuration file that
|
||||
\li In \uicontrol Options, select the configuration file that
|
||||
defines the style to use in the source files. If you select several
|
||||
options, they are applied from top down. The available options
|
||||
depend on the tool.
|
||||
|
||||
\list
|
||||
|
||||
\li Select \uicontrol {Use file *.astylerc defined in project files}
|
||||
or \uicontrol {Use file uncrustify.cfg defined in project files},
|
||||
to use the configuration file \l{Specify project contents}
|
||||
{defined in the project file} as the configuration file
|
||||
for the selected tool.
|
||||
|
||||
\li Select \uicontrol {Use specific config file} or
|
||||
\uicontrol {Use file specific uncrustify.cfg} to
|
||||
use the specified file as the configuration file for the
|
||||
selected tool.
|
||||
|
||||
\li Select \uicontrol {Use file uncrustify.cfg in <$HOME>} or
|
||||
\uicontrol {Use file .astylerc or acstylerc in <$HOME>} to
|
||||
use the specified file in the user's home directory as the
|
||||
configuration file for the selected tool.
|
||||
|
||||
\li For ClangFormat, you can use a predefined style, by
|
||||
selecting the \uicontrol {Use predefined style} radio
|
||||
button, and then selecting the style to use from the list of
|
||||
available styles.
|
||||
|
||||
\image qtcreator-beautifier-options-clangformat.png "ClangFormat Beautifier preferences"
|
||||
|
||||
Select \uicontrol File to load the style configuration from
|
||||
the \c .clang-format or \c _clang-format file located in the
|
||||
same directory as the source file or in one of its parent
|
||||
directories.
|
||||
|
||||
To specify a fallback style to use if the style configuration
|
||||
file is not available, use the \uicontrol {Fallback style}
|
||||
combo box. Select \uicontrol Default to use the default style.
|
||||
Select \uicontrol None to skip formatting.
|
||||
|
||||
\li Select the \uicontrol {Use customized style} option, and
|
||||
then \uicontrol Add to define your own style.
|
||||
|
||||
Define code formatting in the
|
||||
\uicontrol {Add Configuration} dialog. It offers syntax
|
||||
highlighting, auto-completion, and context-sensitive help.
|
||||
For these features, you must have the tool installed.
|
||||
|
||||
\image beautifier_editor.png "Add Configuration dialog"
|
||||
|
||||
\endlist
|
||||
|
||||
\li Select \preferences > \uicontrol Beautifier
|
||||
> \uicontrol {Artistic Style}, \uicontrol ClangFormat, or
|
||||
\uicontrol Uncrustify > \uicontrol {Format Current File} to format
|
||||
the currently open file.
|
||||
|
||||
You can \l{Keyboard Shortcuts}{create keyboard shortcuts} for the
|
||||
functions.
|
||||
|
||||
\endlist
|
||||
|
||||
In addition, ClangFormat has the \uicontrol {Format at Cursor} command. If you
|
||||
select it when no text is selected, the syntactic entity under the cursor
|
||||
is formatted. The \uicontrol {Disable Formatting for Selected Text} command
|
||||
wraps selected lines within \c {// clang-format off} and
|
||||
\c {// clang-format on}.
|
||||
\section1 Beautifier Tool Options
|
||||
|
||||
Uncrustify has the \uicontrol {Format Selected Text} command. If you
|
||||
select it when no text is selected, the whole file is formatted by default.
|
||||
To disable this behavior, deselect the
|
||||
\uicontrol {Format entire file if no text was selected} check box.
|
||||
To set the following options, you must have one of the tools installed.
|
||||
|
||||
\sa {Enable and disable plugins}
|
||||
\table
|
||||
\header
|
||||
\li Option
|
||||
\li Value
|
||||
\row
|
||||
\li \uicontrol {Use file *.astylerc defined in project files}
|
||||
|
||||
\uicontrol {Use file uncrustify.cfg defined in project files}
|
||||
\li Use the configuration file \l{Specify project contents}
|
||||
{defined in the project file} as the configuration file
|
||||
for the selected tool.
|
||||
\row
|
||||
\li \uicontrol {Use specific config file}
|
||||
|
||||
\uicontrol {Use file specific uncrustify.cfg}
|
||||
\li The file to use as the configuration file for the selected tool.
|
||||
\row
|
||||
\li \uicontrol {Use file uncrustify.cfg in <$HOME>}
|
||||
|
||||
\uicontrol {Use file .astylerc or acstylerc in <$HOME>}
|
||||
\li Use the specified file in the user's home directory as the
|
||||
configuration file for the selected tool.
|
||||
\row
|
||||
\li \uicontrol {Use customized style}
|
||||
\li Set your own code style.
|
||||
\row
|
||||
\li \uicontrol {Format entire file if no text was selected}
|
||||
\li Format the whole file when no text is selected in the editor and
|
||||
you select \uicontrol {Format Selected Text}.
|
||||
\endtable
|
||||
|
||||
\section2 Using a Predefined ClangFormat Style
|
||||
|
||||
To use a predefined ClangFormat style, go to \uicontrol {ClangFormat} and
|
||||
select a style in \uicontrol {Use predefined style}.
|
||||
|
||||
\image qtcreator-beautifier-options-clangformat.png {ClangFormat Beautifier preferences}
|
||||
|
||||
Select \uicontrol File to load the style configuration from the
|
||||
\c .clang-format or \c _clang-format file located in the same
|
||||
directory as the source file or in one of its parent directories.
|
||||
|
||||
In \uicontrol {Fallback style}, select a fallback style to use if the style
|
||||
configuration file is not available. Select \uicontrol Default to use the
|
||||
default style. Select \uicontrol None to skip formatting.
|
||||
|
||||
\section2 Defining a Style
|
||||
|
||||
To define your own style, select \uicontrol {Use customized style}, and then
|
||||
select \uicontrol Add.
|
||||
|
||||
Set the code style in the \uicontrol {Add Configuration} dialog.
|
||||
It offers syntax highlighting, auto-completion, and context-sensitive
|
||||
help.
|
||||
|
||||
\image beautifier_editor.png {Add Configuration dialog}
|
||||
|
||||
\sa {Beautify source code}, {Enable and disable plugins}
|
||||
*/
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
// **********************************************************************
|
||||
@@ -8,11 +8,14 @@
|
||||
// **********************************************************************
|
||||
|
||||
/*!
|
||||
\previouspage creator-diff-editor.html
|
||||
\page creator-clang-codemodel.html
|
||||
\nextpage creator-finding-overview.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\title Parsing C++ Files with the Clang Code Model
|
||||
\ingroup creator-reference
|
||||
|
||||
\title Clang Code Model
|
||||
|
||||
\brief Offers code editing services for C++.
|
||||
|
||||
The \e {code model} is the part of an IDE that understands the language you
|
||||
are using to write your application. It is the framework that allows \QC
|
||||
@@ -20,12 +23,12 @@
|
||||
|
||||
\list
|
||||
|
||||
\li \l{Completing Code}{Code completion}
|
||||
\li \l{Complete code}{Code completion}
|
||||
|
||||
\li Syntactic and \l{Semantic Highlighting}{semantic highlighting}
|
||||
|
||||
\li Navigating in the code by using the \l{Searching with the Locator}
|
||||
{locator}, \l{Moving to Symbol Definition or Declaration}
|
||||
{locator}, \l{Move to symbol definition or declaration}
|
||||
{following symbols}, and so on
|
||||
|
||||
\li Inspecting code by using the \l{Class View}{class browser}, the
|
||||
@@ -37,7 +40,7 @@
|
||||
|
||||
\li \l{Finding Symbols}{Finding and renaming symbols}
|
||||
|
||||
\li \l{Applying Refactoring Actions}{Refactoring actions}
|
||||
\li \l{Apply quick fixes}{Quick fixes}
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -73,7 +76,7 @@
|
||||
|
||||
\li Code completion
|
||||
\li Syntactic and semantic highlighting
|
||||
\li \l{Using Clang Tools}{Diagnostics}
|
||||
\li \l{Clang Checks}{Diagnostics}
|
||||
\li Outline of symbols
|
||||
\li Tooltips
|
||||
\li Following symbols
|
||||
@@ -84,17 +87,57 @@
|
||||
|
||||
To use the built-in code model instead, select \preferences >
|
||||
\uicontrol C++ > \uicontrol clangd, and deselect the \uicontrol {Use clangd} check box.
|
||||
This setting also exists on the project level, so that you can have the clang-based
|
||||
This setting also exists on the project level, so that you can have the Clang-based
|
||||
services generally enabled, but switch them off for certain projects, or vice versa.
|
||||
|
||||
You can configure Clang diagnostics either globally or separately for:
|
||||
You can configure Clang diagnostics for:
|
||||
|
||||
\list
|
||||
\li Clang code model (globally or at project level)
|
||||
\li \l{Using Clang Tools}{Clang tools} (globally or at project level)
|
||||
\li \l{Clang Checks}{Clang code model} (globally or at project level)
|
||||
\li \l{Configure Clang diagnostics}{Clang tools} (globally or at project
|
||||
level)
|
||||
\endlist
|
||||
|
||||
\section1 Configuring Clang Code Model
|
||||
\section1 Clangd Indexing
|
||||
|
||||
The clangd \e index provides exact and complete results for services such
|
||||
as finding references, following symbols under cursor, and using the
|
||||
locator, even for complex constructs. When you \l{Open projects}
|
||||
{open a project}, clangd scans the source files to generate the index. For
|
||||
large projects, this can take a while, but the index is persistent and
|
||||
re-scanning is incremental, so nothing is lost by closing and re-starting
|
||||
\QC.
|
||||
|
||||
To temporarily disable global indexing, select
|
||||
\uicontrol {Toggle Progress Details} (1), and then select \uicontrol X on
|
||||
the progress bar.
|
||||
|
||||
\image qtcreator-toggle-progress-bar.webp {Toggle Progress Details button}
|
||||
|
||||
By default, \QC runs one clangd process per project. If you have created
|
||||
\l{Manage sessions}{sessions} that have related projects, you can
|
||||
specify that the projects in the session should be managed by a single
|
||||
clangd process.
|
||||
|
||||
The document outline in the \l{Outline} view is backed by clangd's document
|
||||
symbol support, which makes the results more reliable than before.
|
||||
|
||||
\sa {Code Model}, {Clangd}, {Specify clangd settings},
|
||||
{Speficy Clang tools settings}, {Use compilation databases}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-preferences-cpp-code-model.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-preferences-cpp
|
||||
|
||||
\title Code Model
|
||||
|
||||
\brief Sets global preferences for the code model.
|
||||
|
||||
The Clang code model offers services such as code completion, syntactic and
|
||||
semantic highlighting, and diagnostics.
|
||||
|
||||
To configure the Clang code model globally:
|
||||
|
||||
@@ -132,36 +175,29 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Configuring clangd
|
||||
\sa {Specify clangd settings}, {Clang Code Model}, {Clangd}
|
||||
*/
|
||||
|
||||
The clangd \e index provides exact and complete results for services such
|
||||
as finding references, following symbols under cursor, and using the
|
||||
locator, even for complex constructs. When you \l{Open projects}
|
||||
{open a project}, clangd scans the source files to generate the index. For
|
||||
large projects, this can take a while, but the index is persistent and
|
||||
re-scanning is incremental, so nothing is lost by closing and re-starting
|
||||
\QC.
|
||||
/*!
|
||||
\page creator-preferences-cpp-clangd.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
To temporarily disable global indexing, select
|
||||
\uicontrol {Toggle Progress Details} (1), and then select \uicontrol X on
|
||||
the progress bar.
|
||||
\ingroup creator-reference-preferences-cpp
|
||||
|
||||
\image qtcreator-toggle-progress-bar.webp {Toggle Progress Details button}
|
||||
\title Clangd
|
||||
|
||||
By default, \QC runs one clangd process per project. If you have created
|
||||
\l{Manage sessions}{sessions} that have related projects, you can
|
||||
specify that the projects in the session should be managed by a single
|
||||
clangd process.
|
||||
\brief Sets global preferences for the clangd code model.
|
||||
|
||||
The document outline in the \l{Outline} view is backed by clangd's document
|
||||
symbol support, which makes the results more reliable than before.
|
||||
The Clang project has libraries for parsing C language family source files
|
||||
and providing you with detailed diagnostics. The clangd \e index provides
|
||||
exact and complete results for services such as code completion.
|
||||
|
||||
To specify settings for clangd:
|
||||
To set preferences for clangd:
|
||||
|
||||
\list 1
|
||||
\li Select \preferences > \uicontrol C++ >
|
||||
\uicontrol Clangd > \uicontrol {Use clangd}.
|
||||
\image qtcreator-preferences-clangd.webp "Clangd preferences"
|
||||
\image qtcreator-preferences-clangd.webp {Clangd preferences}
|
||||
\li In \uicontrol {Path to executable}, enter the path to clangd
|
||||
version 14, or later.
|
||||
\li In the \uicontrol {Background indexing} field, select \uicontrol Off
|
||||
@@ -195,24 +231,30 @@
|
||||
by ignoring big files. Specify the maximum size of files to parse in
|
||||
the field next to the check box.
|
||||
\li The \uicontrol {Diagnostic configuration} field shows the Clang
|
||||
checks to perform. Click the value of the field to open the
|
||||
\uicontrol {Diagnostic Configurations} dialog, where you can
|
||||
select and edit the checks to perform.
|
||||
checks to perform. Click the value of the field to select and edit
|
||||
the checks to perform.
|
||||
\li Select \uicontrol Add to select sessions that should use a single
|
||||
clangd process for indexing.
|
||||
\endlist
|
||||
|
||||
\section1 Clang Checks
|
||||
|
||||
Click the value of the \uicontrol {Diagnostic configuration} field to open
|
||||
the \uicontrol {Diagnostic Configurations} dialog, where you can select and
|
||||
edit the checks to perform.
|
||||
|
||||
\image qtcreator-clang-diagnostic-configurations.webp {Diagnostic Configurations dialog}
|
||||
|
||||
In addition to using the built-in checks, you can select \uicontrol Copy to
|
||||
create copies of them and edit the copies to fit your needs.
|
||||
|
||||
\uicontrol {Build-system warnings} displays warnings as specified
|
||||
by the build system.
|
||||
|
||||
\uicontrol {Checks for questionable constructs} combines the \c -Wall and
|
||||
\c -Wextra checks for easily avoidable questionable constructions and some
|
||||
additional issues.
|
||||
\list
|
||||
\li \uicontrol {Build-system warnings} shows warnings as specified
|
||||
by the build system.
|
||||
\li \uicontrol {Checks for questionable constructs} combines the \c -Wall
|
||||
and \c -Wextra checks for easily avoidable questionable constructions
|
||||
and some additional issues.
|
||||
\endlist
|
||||
|
||||
Clang checks begin with \c -W. Each check also has a negative version that
|
||||
begins with \c -Wno.
|
||||
@@ -221,11 +263,27 @@
|
||||
see \l{https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html}
|
||||
{Options to Request or Suppress Warnings} or the GCC or Clang manual pages.
|
||||
|
||||
\section1 Specifying Clang Code Model Settings at Project Level
|
||||
|
||||
You can specify Clang code model settings at project level by selecting
|
||||
\uicontrol Projects > \uicontrol {clangd}.
|
||||
|
||||
\include creator-compilation-database.qdocinc using compilation databases
|
||||
|
||||
\sa {Specify clangd settings}, {Clang Code Model}, {Code Model}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-override-clangd-preferences.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-projects-configure
|
||||
|
||||
\title Specify clangd settings
|
||||
|
||||
To set clangd preferences for the current project:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Projects > \uicontrol {Project Settings} >
|
||||
\uicontrol {Clangd}.
|
||||
\image qtcreator-projects-settings-clangd.webp {Clangd preferences for a project}
|
||||
\li Deselect \uicontrol {Use global settings}.
|
||||
\li Select \uicontrol {Use clangd}.
|
||||
\li Specify \uicontrol Clangd preferences for the project.
|
||||
\endlist
|
||||
|
||||
\sa {Clang Code Model}, {Clangd}, {Code Model}
|
||||
*/
|
||||
|
@@ -1,209 +1,572 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-editor-functions.html
|
||||
\page creator-coding-navigating.html
|
||||
\nextpage creator-highlighting.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\title Working in Edit Mode
|
||||
\ingroup creator-reference-editors
|
||||
|
||||
You can write code in the \uicontrol Edit mode.
|
||||
\title Edit Mode
|
||||
|
||||
\section1 Using the Editor Toolbar
|
||||
\brief Edit and navigate code and other resources in your projects.
|
||||
|
||||
The editor toolbar is located at the top of the editor view. It is context
|
||||
sensitive and shows items relevant to the file currently open in the editor.
|
||||
Write and navigate code in the \uicontrol Edit mode.
|
||||
|
||||
\image qtcreator-editortoolbar-symbols.webp {Edit mode toolbar}
|
||||
\image qtcreator-spliteditorview.png {Code editor}
|
||||
|
||||
To add more space around the toolbar items, select \preferences >
|
||||
\section1 Editing Code
|
||||
|
||||
The \QC code editor offers code editing services, such as:
|
||||
|
||||
\list
|
||||
\li \l {Semantic Highlighting}{Semantic highlighting}
|
||||
|
||||
\QC helps you to write well formatted code by highlighting
|
||||
code elements and blocks. You can use syntax highlighting
|
||||
also for other types of files than C++ or QML.
|
||||
|
||||
\li \l {Checking Code Syntax}{Checking code syntax}
|
||||
|
||||
\QC checks for errors when you write code and displays inline
|
||||
error and warning messages. Similarly, it checks the data
|
||||
structure of an instance of a JavaScript object notation (JSON)
|
||||
entity. Run static checks on the QML and JavaScript code in your
|
||||
project to find common problems.
|
||||
|
||||
\li \l {Complete code}{Code completion}
|
||||
|
||||
\QC anticipates what you are going to write and completes code
|
||||
and code snippets for elements, properties, and IDs.
|
||||
|
||||
\li \l {Indent text or code}{Indenting text or code}
|
||||
|
||||
\QC indents text and code according to rules that you
|
||||
specify separately for files that have C++, QML, or
|
||||
Nim (experimental) code and for other text files.
|
||||
\endlist
|
||||
|
||||
\section1 Navigating Code
|
||||
|
||||
Split the editor view to work on several files simultaneously and move
|
||||
between files and symbols in the following ways:
|
||||
|
||||
\list
|
||||
\li Locate them with the locator.
|
||||
\li Use the \l{Sidebar Views}{views} in the sidebar.
|
||||
\li Go to the \uicontrol Edit and \uicontrol Window menu.
|
||||
\li Use keyboard shortcuts.
|
||||
\li Bookmark code.
|
||||
\li Select buttons on the editor toolbar.
|
||||
\endlist
|
||||
|
||||
\section1 Editor Toolbar
|
||||
|
||||
The editor toolbar is context sensitive and shows items relevant to the file
|
||||
currently open in the editor.
|
||||
|
||||
\image qtcreator-editor-toolbar.webp {Edit mode toolbar}
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Button or Field
|
||||
\li Purpose
|
||||
\li Read More
|
||||
\row
|
||||
\li \inlineimage icons/prev.png
|
||||
\inlineimage icons/next.png
|
||||
\li Browse backward or forward through your location history.
|
||||
\li
|
||||
\row
|
||||
\li \inlineimage numbers/01.png
|
||||
\li Shows the currently open file.
|
||||
\li \l{Move between files}
|
||||
\row
|
||||
\li \inlineimage numbers/02.png
|
||||
\li Shows the current symbol.
|
||||
\li \l{Move to symbols}
|
||||
\row
|
||||
\li \uicontrol #
|
||||
\li Change the active parse context.
|
||||
\li \l {Parse files}
|
||||
\row
|
||||
\li \inlineimage numbers/03.png
|
||||
\li Switch between Windows line endings (CRLF) and Unix line endings (LF).
|
||||
\li \l{Select line ending style}
|
||||
\row
|
||||
\li \inlineimage numbers/04.png
|
||||
\li Change the text encoding.
|
||||
\li \l{Change text encoding}
|
||||
\row
|
||||
\li \inlineimage icons/languageclient.png
|
||||
\li View the language server for the current project, restart it, select
|
||||
another one, \l{Inspect language clients}{inspect the communication}
|
||||
between \QC and language servers, view server capabilities, and set
|
||||
language server preferences.
|
||||
\li \l {Language Servers}
|
||||
\row
|
||||
\li \inlineimage icons/debugger_singleinstructionmode.png
|
||||
\li Run Clang-Tidy or Clazy to analyze the currently open file.
|
||||
\li \l{Analyze code with Clang-Tidy and Clazy}
|
||||
\row
|
||||
\li \inlineimage numbers/05.png
|
||||
\li Jump to a line and column in the current file. The line and column
|
||||
indicator shows information about the current cursor positions,
|
||||
including the length of the selection for selected text.
|
||||
\li
|
||||
|
||||
\endtable
|
||||
|
||||
\section1 Adding Space Around Toolbar Items
|
||||
|
||||
To add more space around the toolbar items, go to \preferences >
|
||||
\uicontrol Environment > \uicontrol Interface, and
|
||||
then select \uicontrol Relaxed in the \uicontrol {Toolbar style} field.
|
||||
|
||||
\image qtcreator-preferences-environment-interface.webp {Interface tab in Environment preferences}
|
||||
|
||||
\section2 Navigating Between Open Files and Symbols
|
||||
\section1 Resizing Views
|
||||
|
||||
Use the toolbar, \uicontrol Window menu items, or
|
||||
\l{General Keyboard Shortcuts}{keyboard shortcuts}
|
||||
to navigate between open files and symbols in use.
|
||||
To resize the editor views and splits, move the cursor to the edge of the
|
||||
view or split. When the cursor changes, drag the edge of the view or split
|
||||
to another position.
|
||||
|
||||
To browse backward or forward through your
|
||||
location history, click \inlineimage icons/prev.png
|
||||
(\uicontrol {Go Back}) and \inlineimage icons/next.png
|
||||
(\uicontrol {Go Forward}).
|
||||
If the cursor does not change, go to \preferences > \uicontrol Environment >
|
||||
\uicontrol Interface and select \uicontrol {Override cursors for views}.
|
||||
|
||||
To return to the last location where you made a change, select
|
||||
\uicontrol Window > \uicontrol {Go to Last Edit}.
|
||||
\section1 Copying File Information
|
||||
|
||||
To go to any open file, select it from the \uicontrol {Open files} drop-down
|
||||
menu (1). To open a context menu that has commands for managing open
|
||||
files, right-click the file name or icon on the toolbar. In addition to the
|
||||
commands also available in the \uicontrol File menu, you can copy the path
|
||||
and name of the current file and the number of the line where the cursor is
|
||||
currently located to the clipboard by selecting \uicontrol {Copy Full Path},
|
||||
\uicontrol {Copy File Name}, or \uicontrol {Copy Path and Line Number}.
|
||||
|
||||
To jump to any symbol used in the current file, select it from the
|
||||
\uicontrol Symbols drop-down menu (2). By default, the symbols are displayed
|
||||
in the order in which they appear in the file. Right-click the menu title
|
||||
and select \uicontrol {Sort Alphabetically} to arrange the symbols in
|
||||
alphabetic order.
|
||||
|
||||
To jump to a line and column in the current file, select the line and column
|
||||
indicator (3) or press \key {Ctrl+K} (or \key {Cmd+K} on \macos) to open the
|
||||
\l{Searching with the Locator}{locator}. Enter the line number and column
|
||||
number in the locator, separated by a colon (:).
|
||||
|
||||
The line and column indicator shows more information about the current
|
||||
cursor positions, including the length of the selection for selected text.
|
||||
|
||||
\image qtcreator-editor-line-column.webp {Line and column indicator on the Edit mode toolbar}
|
||||
|
||||
\note You can also use the \l{Show and hide sidebars}{sidebars} to
|
||||
move around in \QC.
|
||||
|
||||
\section2 Selecting Parse Context
|
||||
|
||||
Code might be interpreted differently in different contexts. A file can be
|
||||
used by different projects or subprojects with different defines, or it can
|
||||
be included in the context of C, C++, Objective-C, or Objective-C++. To
|
||||
change the active parse context, select an available parse context in the
|
||||
\uicontrol {Active Parse Context} menu (4). The menu is visible only when
|
||||
several parse contexts are available. To reset the parse context,
|
||||
right-click on the menu to open a context menu, and then select
|
||||
\uicontrol {Clear Preferred Parse Context}.
|
||||
If the information needed for parsing the project is still incomplete or
|
||||
incorrect, select \uicontrol {Additional Preprocessor Directives} to
|
||||
add preprocessor directives.
|
||||
|
||||
\section2 Changing Text Encoding
|
||||
|
||||
To show the file encoding of the current file on the editor toolbar (5),
|
||||
select \preferences > \uicontrol {Text Editor} >
|
||||
\uicontrol Display > \uicontrol {Display file encoding}.
|
||||
|
||||
To change the text encoding, click it on the toolbar and select new
|
||||
encoding in the \uicontrol {Text Encoding} dialog:
|
||||
|
||||
\image qtcreator-text-encoding.png "Text Encoding dialog"
|
||||
|
||||
To reload the file with the selected encoding, select
|
||||
\uicontrol {Reload with Encoding}. To save the file with
|
||||
the new encoding, select \uicontrol {Save with Encoding}.
|
||||
|
||||
\section2 Selecting Line Ending Style
|
||||
|
||||
To switch between Windows line endings (CRLF) and Unix line endings (LF),
|
||||
select the ending style on the editor toolbar (6). To hide this field,
|
||||
select \preferences > \uicontrol {Text Editor}
|
||||
> \uicontrol Display, and deselect \uicontrol {Display file line ending}.
|
||||
|
||||
To set the line endings to use for all projects by default, select
|
||||
\preferences > \uicontrol {Text Editor} >
|
||||
\uicontrol Behavior, and then select the ending style in the
|
||||
\uicontrol {Default line endings} field.
|
||||
|
||||
To set the line endings to use for a project, select \uicontrol Projects >
|
||||
\uicontrol {Project Settings} > \uicontrol Editor.
|
||||
|
||||
For more information, see \l {Specify editor settings}.
|
||||
|
||||
\section2 Managing Language Servers
|
||||
|
||||
Select the \inlineimage icons/languageclient.png
|
||||
icon on the editor toolbar (7) to view the \l{Using Language Servers}
|
||||
{language server} for the current project. You can restart the language
|
||||
server or select another one in the menu. Also, you can
|
||||
\l{Inspecting Language Clients}{inspect the communication} between \QC
|
||||
and language servers and view server capabilities, as well as
|
||||
\l{Specifying Settings for Language Clients}{set language server preferences}.
|
||||
To open a context menu that has commands for managing open files, right-click
|
||||
the file name or icon on the toolbar (1). It has the same commands as the
|
||||
\uicontrol File menu, as well as commands that copy the path and name of the
|
||||
current file and the number of the line where the cursor is
|
||||
currently located to the clipboard: \uicontrol {Copy Full Path},
|
||||
\uicontrol {Copy File Name}, and \uicontrol {Copy Path and Line Number}.
|
||||
|
||||
\section1 Editing Selected Lines
|
||||
|
||||
The \uicontrol Edit > \uicontrol Advanced menu has options for editing
|
||||
selected lines of text.
|
||||
In the \uicontrol Edit mode, go to \uicontrol Edit > \uicontrol Advanced
|
||||
to edit lines of text that you select in the editor:
|
||||
|
||||
To duplicate the selected lines, select \uicontrol {Duplicate Selection}.
|
||||
To format the duplicated lines as a comment, select
|
||||
\uicontrol {Duplicate Selection and Comment}.
|
||||
\list
|
||||
\li To duplicate the selected lines, go to
|
||||
\uicontrol {Duplicate Selection}.
|
||||
\li To format the duplicated lines as a comment, go to
|
||||
\uicontrol {Duplicate Selection and Comment}.
|
||||
\li To turn selected text into lowercase, go to
|
||||
\uicontrol {Lowercase Selection} or press \key {Alt+U}.
|
||||
\li To turn selected text into uppercase, go to
|
||||
\uicontrol {Uppercase Selection} or press \key {Alt+Shift+U}.
|
||||
\li To sort selected lines alphabetically, go to
|
||||
\uicontrol {Sort Selected Lines} or press \key {Alt+Shift+S}.
|
||||
\li To add a cursor at the next occurrence of selected text for multi-cursor
|
||||
editing, go to \uicontrol {Add Next Occurrence to Selection} or press \key {Ctrl+D}
|
||||
\endlist
|
||||
|
||||
To turn selected text into lowercase, select \uicontrol {Lowercase Selection}
|
||||
or press \key {Alt+U}. To turn it into uppercase, select
|
||||
\uicontrol {Uppercase Selection} or press \key {Alt+Shift+U}.
|
||||
\sa {Edit Code}{How To: Edit Code},
|
||||
{Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Searching with the Locator}, {Keyboard Shortcuts}, {Sidebar Views}
|
||||
*/
|
||||
|
||||
To sort selected lines alphabetically, select \uicontrol {Sort Selected Lines}
|
||||
or press \key {Alt+Shift+S}.
|
||||
/*!
|
||||
\page creator-how-to-move-between-open-files.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
Select \uicontrol {Add Next Occurrence to Selection} or press \key {Ctrl+D}
|
||||
to add a cursor at the next occurrence of selected text for multi-cursor
|
||||
editing.
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
\section1 Multi-Cursor Editing
|
||||
\title Move between files
|
||||
|
||||
To apply a change to several places simultaneously, press and hold \key Alt,
|
||||
and click to place cursors in several places. Any changes you make are
|
||||
applied simultaneously at all the cursor positions.
|
||||
The editor toolbar shows the file that is currently open (1) in the editor.
|
||||
|
||||
Use the arrow keys to move all the cursors up and down. The \key Home and
|
||||
\key End key move all the cursors to the beginning or to the end of the
|
||||
line.
|
||||
\image qtcreator-editor-open-files.webp {Current file shown on Edit mode toolbar}
|
||||
|
||||
Press and hold \key Alt and double-click strings to select several strings
|
||||
simultaneously.
|
||||
Use the locator, \l{Sidebar Views}{sidebar views}, \uicontrol Window menu
|
||||
items, \l{General Keyboard Shortcuts}{keyboard shortcuts}, or
|
||||
\l{Editor Toolbar}{editor toolbar} to move between files.
|
||||
|
||||
Press \key {Alt+Shift+I} to create cursors at the ends of selected lines.
|
||||
\section1 Locate files
|
||||
|
||||
Press \key Esc to remove all the cursors and selections.
|
||||
Activate the locator to find files in the local file system or on connected
|
||||
devices. By default, the locator shows open documents and all files from all
|
||||
projects. The file system filter (\c f) shows all files in the same folder
|
||||
as the currently open file, and you can navigate the file system from there.
|
||||
Also, you can switch to another device root.
|
||||
|
||||
\section1 Splitting the Editor View
|
||||
For example, to open a QML file called \e HelloWorld.qml in the currently
|
||||
open project using the locator:
|
||||
|
||||
Split the editor view or open the editor in a new window when you want to
|
||||
work on and view multiple files on the same screen or on multiple screens.
|
||||
\list 1
|
||||
\li Press \key {Ctrl+K} to activate the locator.
|
||||
\li Start typing the filename.
|
||||
\image qtcreator-locator-open.webp {List of files in the locator}
|
||||
\li Use the arrow keys to move to the filename in the list and press
|
||||
\key Enter.
|
||||
|
||||
\image qtcreator-spliteditorview.png
|
||||
The file opens in the editor.
|
||||
\li To move to a line in the file, enter the line number in the locator.
|
||||
\endlist
|
||||
|
||||
You can view multiple files simultaneously in the following ways:
|
||||
Filters locating files also accept paths, such as \c {tools/*main.cpp}.
|
||||
If the path to a file is very long, it might not fit into the locator
|
||||
window. To view the full path, press \key Alt when the filename is selected
|
||||
or drag the right edge of the locator to make it wider.
|
||||
|
||||
If the locator does not find some files, see \l{Specify project contents}
|
||||
for how to make them known to the locator.
|
||||
|
||||
\section1 Locate files from global file system index
|
||||
|
||||
You can install tools such as Spotlight, Locate, or Everything and use them
|
||||
to locate files from a global file system index. Use the \c md locator
|
||||
filter to locate the files.
|
||||
|
||||
To use the sorting from the selected tool instead of from \QC,
|
||||
deselect the \uicontrol {Sort results} check box in the \c md
|
||||
locator filter configuration.
|
||||
|
||||
\image qtcreator-locator-filter-edit-md.webp {Filter Configuration dialog}
|
||||
|
||||
\section1 Browse location history
|
||||
|
||||
To browse backward or forward through your location history, click
|
||||
\inlineimage icons/prev.png (\uicontrol {Go Back}) and
|
||||
\inlineimage icons/next.png (\uicontrol {Go Forward}) on the editor toolbar.
|
||||
|
||||
To return to the last location where you made a change, go to
|
||||
\uicontrol Window > \uicontrol {Go to Last Edit}.
|
||||
|
||||
\section1 Navigate with the keyboard
|
||||
|
||||
Use keyboard shortcuts:
|
||||
|
||||
\list
|
||||
\li To quickly move between currently open files, press \key Ctrl+Tab.
|
||||
\li To move forward in the location history, press \key {Alt+Right}
|
||||
(\key {Cmd+Opt+Right} on \macos).
|
||||
\li To move backward, press \key {Alt+Left} (\key {Cmd+Opt+Left} on \macos).
|
||||
For example, after you use the \uicontrol Locator
|
||||
to jump to a symbol in the same file, press \key {Alt+Left} to jump
|
||||
back to your original location in that file.
|
||||
\endlist
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode},
|
||||
{Searching with the Locator}, {File System}, {Projects}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-move-to-symbols.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
\title Move to symbols
|
||||
|
||||
The editor toolbar shows the symbol currently under the cursor (1).
|
||||
|
||||
\image qtcreator-editor-symbols.webp {Symbol under the cursor shown on Edit mode toolbar}
|
||||
|
||||
By default, the list of symbols shows them in the order in which they appear
|
||||
in the file. Right-click the field and go to \uicontrol {Sort Alphabetically}
|
||||
to arrange the symbols in alphabetic order.
|
||||
|
||||
Use the locator, \l{Sidebar Views}{views}, \uicontrol Window menu items,
|
||||
\l{General Keyboard Shortcuts} {keyboard shortcuts}, or \l{Editor Toolbar}
|
||||
{editor toolbar}, to navigate between symbols in open files.
|
||||
|
||||
\section1 Locate symbols
|
||||
|
||||
To jump to a symbol in the current file, activate the locator,
|
||||
enter a period (.) or colon (:), and start typing the symbol name. Then
|
||||
select the symbol in the list.
|
||||
|
||||
For example, to locate symbols matching \c {QGuiApplication}:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Press \key {Ctrl+K} to activate the locator.
|
||||
|
||||
\li Enter a colon (:) followed by a space and the upper case letters in
|
||||
the symbol name (here, \c {QGuiApplication}):
|
||||
|
||||
\code
|
||||
: qga
|
||||
\endcode
|
||||
|
||||
\endlist
|
||||
|
||||
The locator lists the results.
|
||||
|
||||
\image qtcreator-locator-example.webp {List of files matching the locator filter}
|
||||
|
||||
Filters locating class and function definitions also accept namespaces,
|
||||
such as \c {Utils::*View}.
|
||||
|
||||
\section1 Move to symbol definition or declaration
|
||||
|
||||
To move directly to the definition or declaration of a symbol in the
|
||||
\uicontrol Edit mode, move the cursor on the symbol and press \key {F2}.
|
||||
|
||||
Or, hold the \key Ctrl key (\key Cmd on \macos) and click
|
||||
the symbol. If you have multiple splits opened, open the link in the next
|
||||
split by holding \key Ctrl and \key Alt while clicking the symbol.
|
||||
|
||||
To enable this moving function, go to \preferences > \uicontrol {Text Editor}
|
||||
> \uicontrol Behavior > \uicontrol {Enable mouse navigation}.
|
||||
|
||||
\image qtcreator-preferences-texteditor-behavior.webp {Text Editor Behavior preferences}
|
||||
|
||||
\section2 Follow symbols
|
||||
|
||||
Go to the context menu or to \uicontrol Tools > \uicontrol C++ or
|
||||
\uicontrol QML/JS for more ways to move to the definition or declaration
|
||||
of a symbol in the current split or the next split:
|
||||
|
||||
\list
|
||||
\li To follow namespaces, classes, functions, variables, include
|
||||
statements, and macros, go to \uicontrol {Follow Symbol Under Cursor}
|
||||
or \uicontrol {Follow Symbol Under Cursor in Next Split}.
|
||||
\li To move to the type definition of a symbol, go to
|
||||
\uicontrol {Follow Symbol Under Cursor to Type} (\key {Ctrl+Shift+F2})
|
||||
or \uicontrol {Follow Symbol Under Cursor to Type in Next Split}
|
||||
(\key {Ctrl+E, Ctrl+Shift+F2}).
|
||||
\endlist
|
||||
|
||||
\section2 Switch between function definition and decalaration
|
||||
|
||||
To switch between the definition and declaration of a function, place the
|
||||
cursor on either and press \key {Shift+F2} or right-click and go to
|
||||
\uicontrol {Switch Between Function Declaration/Definition} or
|
||||
\uicontrol {Open Function Declaration/Definition in Next Split}.
|
||||
For example, this allows you to navigate from anywhere within a function
|
||||
body directly to the function declaration.
|
||||
|
||||
To switch between C++ header and source files, right-click anywhere in a
|
||||
file and go to \uicontrol {Switch Header/Source} (\key F4) or
|
||||
\uicontrol {Open Corresponding Header/Source in Next Split}
|
||||
(\key {Ctrl+E,F4}).
|
||||
|
||||
\section2 Open links in another split
|
||||
|
||||
Links open in the same split by default. To open them in the next
|
||||
split, press \key {Ctrl+E} first. For example, press \key {Ctrl+E,F2} to
|
||||
follow the symbol into the next split. If necessary, the view is
|
||||
automatically split.
|
||||
|
||||
To change the default behavior, go to \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol Display and select
|
||||
\uicontrol {Always open links in another split}. The symbol,
|
||||
definition, or declaration opens in another split. Also, the
|
||||
shortcuts for opening link targets in the next split are used
|
||||
to open them in the current split.
|
||||
|
||||
\image qtcreator-options-text-editor-display.png {Text Editor Display preferences}
|
||||
|
||||
\section1 Open resource files for editing
|
||||
|
||||
When the cursor is on a string literal and the string is a Qt resource file
|
||||
(.qrc) path, following the symbol opens the specified resource file for
|
||||
editing in the \uicontrol {Resource Browser}.
|
||||
|
||||
\image qtcreator-add-resource.png {Resource Browser}
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Editing Keyboard Shortcuts},
|
||||
{Searching with the Locator}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-change-text-encoding.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-configure-editors
|
||||
|
||||
\title Change text encoding
|
||||
|
||||
\image qtcreator-editor-toolbar.webp {Edit mode toolbar}
|
||||
|
||||
To show the file encoding of the current file on the editor toolbar (4) in
|
||||
the \uicontrol Edit mode, go to \preferences > \uicontrol {Text Editor} >
|
||||
\uicontrol Display > \uicontrol {Display file encoding}.
|
||||
|
||||
\image qtcreator-options-text-editor-display.png {Text Editor Display preferences}
|
||||
|
||||
To change the text encoding, select it on the toolbar, and then select new
|
||||
encoding in the \uicontrol {Text Encoding} dialog:
|
||||
|
||||
\image qtcreator-text-encoding.png {Text Encoding dialog}
|
||||
|
||||
To reload the file with the selected encoding, select
|
||||
\uicontrol {Reload with Encoding}.
|
||||
|
||||
To save the file with the new encoding, go to
|
||||
\uicontrol {Save with Encoding}.
|
||||
|
||||
\section1 Set default encoding
|
||||
|
||||
To define the default file encoding, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol Behavior, and
|
||||
then select a suitable option in \uicontrol {Default encoding}.
|
||||
|
||||
\image qtcreator-options-texteditor-behavior-file-encodings.png {File encoding preferences}
|
||||
|
||||
Qt 5 and Qt 6 require UTF-8 encoded source files, and therefore the default
|
||||
encoding is set to \uicontrol UTF-8.
|
||||
Detecting the correct encoding is tricky, so \QC will not try to do so.
|
||||
Instead, it displays the following error message when you try to edit a file
|
||||
that is not UTF-8 encoded: \uicontrol {Error: Could not decode "filename" with
|
||||
"UTF-8"-encoding. Editing not possible.}
|
||||
|
||||
To resolve the issue, use a file conversion tool to convert the file
|
||||
encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion
|
||||
of string constants to QString might not work as expected.
|
||||
|
||||
If you develop only Qt 4 applications or other than Qt applications, you
|
||||
can set other encoding options as the default encoding. Select the
|
||||
\uicontrol System option to use the file encoding used by your system.
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Behavior}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-select-line-endings.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-configure-editors
|
||||
|
||||
\title Select line ending style
|
||||
|
||||
To switch between Windows line endings (CRLF) and Unix line endings (LF),
|
||||
select the ending style on the editor toolbar (3) in the \uicontrol Edit
|
||||
mode.
|
||||
|
||||
\image qtcreator-editor-toolbar.webp {Edit mode toolbar}
|
||||
|
||||
To hide this field, go to \preferences > \uicontrol {Text Editor}
|
||||
> \uicontrol Display, and clear \uicontrol {Display file line ending}.
|
||||
|
||||
\section1 Set default style
|
||||
|
||||
To set the line endings to use for all projects by default, go to
|
||||
\preferences > \uicontrol {Text Editor} > \uicontrol Behavior and
|
||||
select the ending style in \uicontrol {Default line endings}.
|
||||
|
||||
\image qtcreator-options-texteditor-behavior-file-encodings.png {Default file ending preferences}
|
||||
|
||||
To set the line endings to use for a project, go to \uicontrol Projects >
|
||||
\uicontrol {Project Settings} > \uicontrol Editor.
|
||||
|
||||
\image qtcreator-editor-settings.webp {Editor settings for a project}
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Specify editor settings}, {Edit Mode}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
\title Insert multiple cursors
|
||||
|
||||
To apply a change to several places simultaneously in the editor in the
|
||||
\uicontrol Edit mode, press and hold \key Alt, and click to place cursors
|
||||
in several places in the file. Any changes you make are applied
|
||||
simultaneously at all the cursor positions.
|
||||
|
||||
\image qtcreator-editor-multicursor.webp {Multiple cursors in the editor}
|
||||
|
||||
To manage cursors:
|
||||
|
||||
\list
|
||||
\li Press the arrow keys to move all the cursors up and down.
|
||||
\li Press the \key Home and \key End key to move all the cursors
|
||||
to the beginning or to the end of the line.
|
||||
\li Press and hold \key Alt and double-click strings to select
|
||||
several strings simultaneously.
|
||||
\li Press \key {Alt+Shift+I} to create cursors at the ends of
|
||||
selected lines.
|
||||
\li Press \key Esc to remove all the cursors and selections.
|
||||
\endlist
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Editing Selected Lines}, {Edit Mode}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-split-editor-views.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
\title Split the editor view
|
||||
|
||||
Split the editor view or open the editor in a new window to work on
|
||||
and view many files on the same screen or on many screens.
|
||||
|
||||
\image qtcreator-spliteditorview.png {Editor view split horizontally and vertically}
|
||||
|
||||
View many files at the same time:
|
||||
|
||||
\list
|
||||
|
||||
\li To split the editor view into a top and bottom view, select
|
||||
\li To split the editor view into a top and bottom view, go to
|
||||
\uicontrol Window > \uicontrol Split, press \key {Ctrl+E, 2}, or
|
||||
select the \inlineimage icons/splitbutton_horizontal.png
|
||||
(\uicontrol Split) button and then select \uicontrol Split.
|
||||
|
||||
Split command creates views below the currently active editor view.
|
||||
The \uicontrol Split command creates views below the currently active
|
||||
editor view.
|
||||
|
||||
\li To split the editor view into adjacent views, select
|
||||
\li To split the editor view into adjacent views, go to
|
||||
\uicontrol Window > \uicontrol {Split Side by Side}, press
|
||||
\key {Ctrl+E, 3}, or select \uicontrol Split >
|
||||
\uicontrol {Split Side by Side}.
|
||||
|
||||
Side by side split command creates views to the right of the
|
||||
currently active editor view.
|
||||
The \uicontrol {Split Side by Side} command creates views to the right
|
||||
of the currently active editor view.
|
||||
|
||||
\li To open the editor in a detached window, press \key {Ctrl+E, 4}, or
|
||||
select \uicontrol Window > \uicontrol {Open in New Window}.
|
||||
go to \uicontrol Window > \uicontrol {Open in New Window}.
|
||||
|
||||
The new window behaves basically in the same way as the editor area
|
||||
The new window behaves in the same way as the editor area
|
||||
in the main window. For example, you can split this window, as well.
|
||||
Documents are opened in the currently active editor window.
|
||||
|
||||
\endlist
|
||||
|
||||
To move between split views and detached editor windows, select
|
||||
\section1 Move between views and windows
|
||||
|
||||
To move between split views and detached editor windows, go to
|
||||
\uicontrol Window > \uicontrol {Go to Next Split or Window} or press
|
||||
\key {Ctrl+E, O}.
|
||||
|
||||
To remove a split view, place the cursor within the view you want to
|
||||
remove and select \uicontrol Window > \uicontrol {Remove Current Split},
|
||||
press \key {Ctrl+E, 0}, or select the \inlineimage icons/splitbutton_closetop.png
|
||||
(\uicontrol {Remove Split}) button. To remove all but the currently selected
|
||||
split view, select \uicontrol Window > \uicontrol {Remove All Splits} or
|
||||
press \key {Ctrl+E, 1}.
|
||||
\section1 Remove splits
|
||||
|
||||
\section1 Using Bookmarks
|
||||
To remove a split view:
|
||||
|
||||
\list
|
||||
\li Place the cursor within the view you want to remove and go to
|
||||
\uicontrol Window > \uicontrol {Remove Current Split}.
|
||||
\li Press \key {Ctrl+E, 0}.
|
||||
\li Select the \inlineimage icons/splitbutton_closetop.png
|
||||
(\uicontrol {Remove Split}) button.
|
||||
\endlist
|
||||
|
||||
To remove all but the currently selected split view:
|
||||
|
||||
\list
|
||||
\li Go to \uicontrol Window > \uicontrol {Remove All Splits}.
|
||||
\li Press \key {Ctrl+E, 1}.
|
||||
\endlist
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Detach views}, {Edit Mode}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-use-bookmarks.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
\title Bookmark code
|
||||
|
||||
To insert or delete a bookmark in the \uicontrol Edit mode:
|
||||
|
||||
@@ -219,31 +582,33 @@
|
||||
|
||||
\image qtcreator-togglebookmark.png
|
||||
|
||||
\section2 Adding Notes to Bookmarks
|
||||
\section1 Add notes to bookmarks
|
||||
|
||||
To add a note to a bookmark:
|
||||
|
||||
\list
|
||||
\li Select \uicontrol Tools > \uicontrol Bookmarks >
|
||||
\li Go to \uicontrol Tools > \uicontrol Bookmarks >
|
||||
\uicontrol {Edit Bookmark}.
|
||||
\li Press \key {Ctrl+Shift+M}.
|
||||
\li Right-click a bookmark and select \uicontrol {Edit Bookmark}
|
||||
\li Right-click a bookmark and go to \uicontrol {Edit Bookmark}
|
||||
in the context menu.
|
||||
\endlist
|
||||
|
||||
To view the note, move the mouse pointer over the bookmark or open the
|
||||
\uicontrol Bookmarks view in the \l{Show and hide sidebars}{sidebar}.
|
||||
|
||||
\section2 Navigating Bookmarks
|
||||
\section1 Navigate bookmarks
|
||||
|
||||
To go to the previous bookmark in the current session, select
|
||||
To move to the previous bookmark in the current session, go to
|
||||
\uicontrol Tools > \uicontrol Bookmarks > \uicontrol {Previous Bookmark}
|
||||
or press \key {Ctrl+,}.
|
||||
|
||||
To go to the next bookmark in the current session, select \uicontrol Tools >
|
||||
To move to the next bookmark in the current session, go to \uicontrol Tools >
|
||||
\uicontrol Bookmarks > \uicontrol {Previous Bookmark} or press
|
||||
\key {Ctrl+.}.
|
||||
|
||||
\section2 Locate bookmarks
|
||||
|
||||
To use the locator to go to a bookmark, press \key {Ctrl+K} (or \key {Cmd+K}
|
||||
on \macos) to open the locator. Enter \e b and a space to display a list of
|
||||
bookmarks. To filter the bookmarks by line number or a text string, enter
|
||||
@@ -252,80 +617,66 @@
|
||||
|
||||
\image qtcreator-locator-bookmark-filtering.png "Filtering bookmarks in locator"
|
||||
|
||||
\section2 Viewing Bookmarks
|
||||
\section1 View bookmarks
|
||||
|
||||
Bookmarks are listed in the \uicontrol Bookmarks view in the sidebar. To
|
||||
The \uicontrol Bookmarks view in the sidebar lists bookmarks. To
|
||||
move between bookmarks, select the \uicontrol {Previous Bookmark} or
|
||||
\uicontrol {Next Bookmark} button or use the keyboard shortcuts.
|
||||
|
||||
\image qtcreator-bookmarks-view.png "Listing bookmarks in Bookmarks view"
|
||||
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}
|
||||
*/
|
||||
|
||||
\section1 Moving to Symbol Definition or Declaration
|
||||
/*!
|
||||
\page creator-how-to-reparse-files.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
You can move directly to the definition or the declaration of a symbol
|
||||
in the \uicontrol Edit mode by
|
||||
holding the \key Ctrl key and clicking the symbol. If you have multiple
|
||||
splits opened, you can open the link in the next split by holding \key Ctrl
|
||||
and \key Alt while clicking the symbol.
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
To enable this moving function, select \preferences > \uicontrol {Text Editor}
|
||||
> \uicontrol Behavior > \uicontrol {Enable mouse navigation}.
|
||||
\title Parse files
|
||||
|
||||
There are several additional ways of moving between symbol definitions and
|
||||
declarations. All the functions described below are also available from the
|
||||
\uicontrol Tools > \uicontrol C++ menu. The functions supported for QML and
|
||||
JavaScript code are available from the \uicontrol Tools > \uicontrol QML/JS
|
||||
menu.
|
||||
When you open a project, \QC parses the source files in the project and
|
||||
performs a semantic analysis to build up the information that it needs for
|
||||
code editing services, such as navigation and finding usages.
|
||||
|
||||
You can select the symbol and press \key F2, or right-click the symbol
|
||||
and select \uicontrol {Follow Symbol Under Cursor} to move to its definition
|
||||
or declaration. To follow the symbol in the next split, select
|
||||
\uicontrol {Follow Symbol Under Cursor in Next Split}. Following symbols is
|
||||
supported for namespaces, classes, functions, variables, include statements,
|
||||
and macros.
|
||||
\section1 Select parse context
|
||||
|
||||
To move to the type definition of a symbol, select
|
||||
\uicontrol {Follow Symbol Under Cursor to Type} or press
|
||||
\key {Ctrl+Shift+F2}. To follow the symbol in the next split, select
|
||||
\uicontrol {Follow Symbol Under Cursor to Type in Next Split} or
|
||||
press \key {Ctrl+E, Ctrl+Shift+F2}.
|
||||
Code might be interpreted differently in different contexts. A file can be
|
||||
used by different projects or subprojects with different defines, or it can
|
||||
be included in the context of C, C++, Objective-C, or Objective-C++.
|
||||
|
||||
When the cursor is on a string literal and the string is a QRC file path,
|
||||
following the symbol opens the specified resource file for editing in the
|
||||
\uicontrol {Resource Browser}.
|
||||
To change the active parse context, select an available parse context on the
|
||||
\uicontrol Edit mode toolbar in \uicontrol #. The button is visible only when
|
||||
several parse contexts are available.
|
||||
|
||||
To switch between the definition and declaration of a function, place the
|
||||
cursor on either and press \key {Shift+F2} or right-click and select
|
||||
\uicontrol {Switch Between Function Declaration/Definition} or
|
||||
\uicontrol {Open Function Declaration/Definition in Next Split}.
|
||||
For example, this allows you to navigate from anywhere within a function
|
||||
body directly to the function declaration.
|
||||
\image qtcreator-editor-open-files.webp {Edit mode toolbar}
|
||||
|
||||
Links are opened in the same split by default. To open links in the next
|
||||
split, prepend \key {Ctrl+E} to the shortcut. For example, press
|
||||
\key {Ctrl+E,F2} to follow the symbol in the next split. If necessary, the
|
||||
view is automatically split. To change the default behavior, select
|
||||
\preferences > \uicontrol {Text Editor} > \uicontrol Display >
|
||||
\uicontrol {Always open links in another split}.
|
||||
Additional symbols are
|
||||
displayed and switching between definition and declaration is done in
|
||||
another split. If you change the default behavior, the shortcuts for opening
|
||||
link targets in the next split are used to open them in the current split.
|
||||
To reset the parse context, go to \uicontrol # >
|
||||
\uicontrol {Clear Preferred Parse Context}.
|
||||
|
||||
To switch between C++ header and source files, right-click anywhere in a
|
||||
file and select \uicontrol {Switch Header/Source} or
|
||||
\uicontrol {Open Corresponding Header/Source in Next Split}. You can also
|
||||
press \key F4 or \key {Ctrl+E,F4}, respectively.
|
||||
If the information needed for parsing the project is still incomplete or
|
||||
incorrect, go to \uicontrol {Additional Preprocessor Directives} to
|
||||
add preprocessor directives.
|
||||
|
||||
\section1 Reparsing Externally Changed Files
|
||||
\section1 Reparse externally changed files
|
||||
|
||||
If source files are modified from outside \QC, the opened files will be
|
||||
reparsed automatically. For all other files, you can use \uicontrol Tools >
|
||||
If source files are modified from outside \QC, the open files (1) are
|
||||
reparsed automatically. To update other files, go to \uicontrol Tools >
|
||||
\uicontrol {C++} > \uicontrol {Reparse Externally Changed Files} to update
|
||||
the code model.
|
||||
|
||||
\section1 Inspecting the Code Model
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Clang Code Model},
|
||||
{Code Model}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-inspect-code-model.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-edit
|
||||
|
||||
\title Inspect the code model
|
||||
|
||||
When you \l{https://bugreports.qt.io/}{report a bug} that is related to the
|
||||
C++ code model, the \QC developers might ask you to write information about
|
||||
@@ -337,11 +688,15 @@
|
||||
select \uicontrol Tools > \uicontrol {Debug \QC } >
|
||||
\uicontrol {Inspect C++ Code Model} or press \key {Ctrl+Shift+F12}.
|
||||
|
||||
\image qtcreator-code-model-inspector.webp {Code Model Inspector dialog}
|
||||
|
||||
\QC generates the code model inspection log file in a temporary folder.
|
||||
|
||||
\QC underlines semantic errors in olive in the C++ code editor. To check the
|
||||
correct paths for includes that are not resolved or that are resolved to the
|
||||
wrong file, select \uicontrol {Project Parts} > \uicontrol {Header Paths}.
|
||||
\QC underlines semantic errors in olive in the C++ code editor in the
|
||||
\uicontrol Edit mode. To check the correct paths for includes that are not
|
||||
resolved or that are resolved to the wrong file,
|
||||
go to \uicontrol {Project Parts} > \uicontrol {Header Paths}.
|
||||
|
||||
\sa {Detach views}
|
||||
\sa {Edit Code}{How To: Edit Code}, {Edit Mode}, {Clang Code Model},
|
||||
{Code Model}
|
||||
*/
|
||||
|
@@ -1,10 +1,13 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
//! [using compilation databases]
|
||||
\page creator-how-to-use-compilation-databases.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\section1 Using Compilation Databases
|
||||
\ingroup creator-how-to-build
|
||||
|
||||
\title Use compilation databases
|
||||
|
||||
The \l{https://clang.llvm.org/docs/JSONCompilationDatabase.html}
|
||||
{JSON compilation database format} specifies how to replay single builds
|
||||
@@ -31,10 +34,8 @@
|
||||
\uicontrol C++ > \uicontrol {Switch Header/Source}.
|
||||
|
||||
You can specify custom build steps and run settings for compilation
|
||||
database projects in the \uicontrol Projects mode. For more information,
|
||||
see \l{Adding Custom Build Steps} and \l {Specifying Run Settings}.
|
||||
database projects in the \uicontrol Projects mode.
|
||||
|
||||
\sa {Enable and disable plugins}
|
||||
|
||||
//! [using compilation databases]
|
||||
\sa {Enable and disable plugins}, {Add custom build steps},
|
||||
{Configure projects for running}, {Code Model}
|
||||
*/
|
@@ -70,14 +70,15 @@
|
||||
|
||||
\section1 Receiving Suggestions
|
||||
|
||||
When you write code in the \l {Working in Edit Mode}{Edit} mode and
|
||||
When you write code in the \l {Edit Mode}{Edit} mode and
|
||||
\uicontrol {Auto request} is enabled, Copilot automatically makes
|
||||
suggestions when you type.
|
||||
|
||||
\image qtcreator-copilot.gif {Receiving suggestions from Copilot in the editor}
|
||||
|
||||
To manually request a suggestion at the current editor's cursor position,
|
||||
select \uicontrol {Request Copilot Suggestion} in the context menu.
|
||||
enter \uicontrol {t} (\uicontrol {Request Copilot Suggestion}) in the
|
||||
\l{Searching with the Locator}{locator}.
|
||||
|
||||
Hover the mouse over a suggestion to show a toolbar with
|
||||
\inlineimage icons/prev.png
|
||||
|
@@ -0,0 +1,803 @@
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\page creator-reference-preferences-cpp-quick-fixes.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-preferences-cpp
|
||||
|
||||
\title Quick Fixes
|
||||
|
||||
\brief Set global preferences for C++ quick fixes.
|
||||
|
||||
To set global preferences for C++ quick fixes, go to \preferences >
|
||||
\uicontrol C++ > \uicontrol {Quick Fixes}.
|
||||
|
||||
\section1 Function Locations
|
||||
|
||||
In the \uicontrol {Generated Function Locations} group, set
|
||||
whether quick fixes should generate getter and setter functions
|
||||
in the header file (inside or outside the class) or in the implementation
|
||||
file.
|
||||
|
||||
\image qtcreator-preferences-quick-fixes-function-locations.webp {Generated Function Locations group in Quick Fixes preferences}
|
||||
|
||||
\section1 Function Names and Attributes
|
||||
|
||||
In the \uicontrol {Getter Setter Generation Properties} group,
|
||||
specify additional settings for getter and setter names, attributes, and
|
||||
parameters. You can specify that setter functions should be created as
|
||||
\e slots and that signals should be generated with the new value as a
|
||||
parameter.
|
||||
|
||||
\image qtcreator-refactoring-options-generation.png {Getter and Setter generation settings}
|
||||
|
||||
\section1 Namespace Handling
|
||||
|
||||
In the \uicontrol {Missing Namespace Handling} group, select whether to
|
||||
generate missing namespaces, add \c {using namespace} where necessary, or
|
||||
rewrite types to match the existing namespaces.
|
||||
|
||||
\image qtcreator-refactoring-options-namespaces.png "Namespace handling settings"
|
||||
|
||||
\section1 Custom Parameter Types
|
||||
|
||||
In the \uicontrol {Custom Getter Setter Templates} group, specify how the
|
||||
code of a getter or setter function for a certain data type should look
|
||||
like. This is necessary for types where assignment cannot use \c operator=,
|
||||
as in the pre-defined settings for \c unique_ptr or where \c operator== is
|
||||
not suitable for comparison, as in the pre-defined settings for
|
||||
floating-point types. For example, if you have a special type \c MyClass,
|
||||
you can specify that a function, \c myCompare, should be used for comparison
|
||||
rather than the default of \c ==.
|
||||
|
||||
To specify special handling for a custom parameter type, select
|
||||
\uicontrol Add and set the parameter type, comparison, return expression,
|
||||
and return type. In the \uicontrol {Return type} field, use \c <new>
|
||||
and \c <cur> to access the parameter and current value. Use \c <type> to
|
||||
access the type and \c <T> for the template parameter.
|
||||
|
||||
\image qtcreator-refactoring-options-templates.png {Settings for handling custom parameter types}
|
||||
|
||||
Usually, arguments are passed by using a \c const reference. To pass
|
||||
arguments of a particular type as values, list them in the
|
||||
\uicontrol {Value types} field. Namespaces and template arguments are
|
||||
removed. The real Type must contain the given Type. For example, \c int
|
||||
matches \c int32_t but not \c vector<int>, and \c vector matches
|
||||
\c {std::pmr::vector<int>} but not \c {std::optional<vector<int>>}.
|
||||
|
||||
To return non-trivial objects by using a \c const reference, select the
|
||||
\uicontrol {Return non-value types by const reference} check box.
|
||||
|
||||
\sa {Apply quick fixes}, {Specify settings for quick fixes},
|
||||
{C++ Quick Fixes}, {QML Quick Fixes}, {Refactoring}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-reference-cpp-quick-fixes.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference
|
||||
|
||||
\title C++ Quick Fixes
|
||||
|
||||
\brief Summary of quick fixes for C++ code.
|
||||
|
||||
If you use the \l{Clang Code Model}{Clang code model} to parse the C++ files,
|
||||
you get \l{http://clang.llvm.org/diagnostics.html}{Clang fix-it hints} in the
|
||||
\uicontrol Edit mode. Use the standard ways of activating quick fixes, or
|
||||
select the fixes that are applicable on a line in the context menu in the
|
||||
left margin of the code editor.
|
||||
|
||||
Apply the following types of quick fixes to C++ code:
|
||||
|
||||
\list
|
||||
\li Change binary operands
|
||||
\li Simplify if and while conditions (for example, move declarations out
|
||||
of if conditions)
|
||||
\li Modify strings (for example, set the encoding for a string to
|
||||
Latin-1, mark strings translatable, and convert symbol names to
|
||||
camel case)
|
||||
\li Create variable declarations
|
||||
\li Create function declarations and definitions
|
||||
\endlist
|
||||
|
||||
The following table summarizes the quick fixes for C++ code. The
|
||||
fix is available when the cursor is in the position described in the
|
||||
Activation column.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Quick Fix
|
||||
\li Description
|
||||
\li Activation
|
||||
\row
|
||||
\li Add Curly Braces
|
||||
\li Adds curly braces to an if statement that does not have a
|
||||
compound statement. For example, rewrites
|
||||
|
||||
\code
|
||||
if (a)
|
||||
b;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
if (a) {
|
||||
b;
|
||||
}
|
||||
\endcode
|
||||
\li \c if
|
||||
\row
|
||||
\li Move Declaration out of Condition
|
||||
\li Moves a declaration out of an if or while condition to simplify
|
||||
the condition. For example, rewrites
|
||||
|
||||
\code
|
||||
if (Type name = foo()) {}
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Type name = foo;
|
||||
if (name) {}
|
||||
\endcode
|
||||
\li Name of the introduced variable
|
||||
\row
|
||||
\li Rewrite Condition Using ||
|
||||
\li Rewrites the expression according to De Morgan's laws. For
|
||||
example, rewrites:
|
||||
\code
|
||||
!a && !b
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a || b)
|
||||
\endcode
|
||||
\li \c &&
|
||||
\row
|
||||
\li Rewrite Using \e operator
|
||||
\li Rewrites an expression negating it and using the inverse
|
||||
operator. For example, rewrites:
|
||||
|
||||
\list
|
||||
|
||||
\li \code
|
||||
a op b
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a invop b)
|
||||
\endcode
|
||||
|
||||
\li \code
|
||||
(a op b)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
!(a invop b)
|
||||
\endcode
|
||||
|
||||
\li \code
|
||||
!(a op b)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
(a invob b)
|
||||
\endcode
|
||||
|
||||
\endlist
|
||||
|
||||
\li \c {<=}, \c {<}, \c {>}, \c {>=}, \c {==} or \c {!=}
|
||||
\row
|
||||
\li Split Declaration
|
||||
\li Splits a simple declaration into several declarations. For
|
||||
example, rewrites:
|
||||
\code
|
||||
int *a, b;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
int *a;
|
||||
int b;
|
||||
\endcode
|
||||
\li Type name or variable name
|
||||
\row
|
||||
\li Split if Statement
|
||||
\li Splits an if statement into several statements. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
if (something && something_else) {
|
||||
}
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
if (something) {
|
||||
if (something_else) {
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
and
|
||||
|
||||
\code
|
||||
if (something || something_else)
|
||||
x;
|
||||
\endcode
|
||||
|
||||
with
|
||||
|
||||
\code
|
||||
if (something)
|
||||
x;
|
||||
else if (something_else)
|
||||
x;
|
||||
\endcode
|
||||
|
||||
\li \c && or \c ||
|
||||
\row
|
||||
\li Swap Operands
|
||||
\li Rewrites an expression in the inverse order using the inverse
|
||||
operator. For example, rewrites:
|
||||
\code
|
||||
a op b
|
||||
\endcode
|
||||
|
||||
as
|
||||
\code
|
||||
b flipop a
|
||||
\endcode
|
||||
\li \c {<=}, \c {<}, \c {>}, \c {>=}, \c {==}, \c {!=}, \c {&&}
|
||||
or \c {||}
|
||||
\row
|
||||
\li Convert to Decimal
|
||||
\li Converts an integer literal to decimal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Hexadecimal
|
||||
\li Converts an integer literal to hexadecimal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Octal
|
||||
\li Converts an integer literal to octal representation
|
||||
\li Numeric literal
|
||||
\row
|
||||
\li Convert to Objective-C String Literal
|
||||
\li Converts a string literal to an Objective-C string literal if
|
||||
the file type is Objective-C(++). For example, rewrites the
|
||||
following strings
|
||||
|
||||
\code
|
||||
"abcd"
|
||||
QLatin1String("abcd")
|
||||
QLatin1Literal("abcd")
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
@"abcd"
|
||||
\endcode
|
||||
\li String literal
|
||||
\row
|
||||
\li Enclose in QLatin1Char()
|
||||
\li Sets the encoding for a character to Latin-1, unless the
|
||||
character is already enclosed in QLatin1Char, QT_TRANSLATE_NOOP,
|
||||
tr, trUtf8, QLatin1Literal, or QLatin1String. For example,
|
||||
rewrites
|
||||
|
||||
\code
|
||||
'a'
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QLatin1Char('a')
|
||||
\endcode
|
||||
\li String literal
|
||||
\row
|
||||
\li Enclose in QLatin1String()
|
||||
\li Sets the encoding for a string to Latin-1, unless the string is
|
||||
already enclosed in QLatin1Char, QT_TRANSLATE_NOOP, tr, trUtf8,
|
||||
QLatin1Literal, or QLatin1String. For example, rewrites
|
||||
\code
|
||||
"abcd"
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QLatin1String("abcd")
|
||||
\endcode
|
||||
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Mark as Translatable
|
||||
\li Marks a string translatable. For example, rewrites \c "abcd"
|
||||
with one of the following options, depending on which of them is
|
||||
available:
|
||||
|
||||
\code
|
||||
tr("abcd")
|
||||
QCoreApplication::translate("CONTEXT", "abcd")
|
||||
QT_TRANSLATE_NOOP("GLOBAL", "abcd")
|
||||
\endcode
|
||||
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Add Definition in ...
|
||||
\li Inserts a definition stub for a function declaration either in
|
||||
the header file (inside or outside the class) or in the
|
||||
implementation file. For free functions, inserts the definition
|
||||
after the declaration of the function or in the implementation
|
||||
file. Qualified names are minimized when possible, instead of
|
||||
always being fully expanded.
|
||||
|
||||
For example, rewrites
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
\endcode
|
||||
|
||||
as (inside class)
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar() {
|
||||
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as (outside class)
|
||||
|
||||
\code
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
|
||||
void Foo::bar()
|
||||
{
|
||||
|
||||
}
|
||||
\endcode
|
||||
|
||||
as (in implementation file)
|
||||
|
||||
\code
|
||||
// Header file
|
||||
Class Foo {
|
||||
void bar();
|
||||
};
|
||||
|
||||
// Implementation file
|
||||
void Foo::bar()
|
||||
{
|
||||
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Function name
|
||||
\row
|
||||
\li Add \c Function Declaration
|
||||
\li Inserts the member function declaration that matches the member
|
||||
function definition into the class declaration. The function can
|
||||
be \c {public}, \c {protected}, \c {private}, \c {public slot},
|
||||
\c {protected slot}, or \c {private slot}.
|
||||
\li Function name
|
||||
\row
|
||||
\li Add Class Member
|
||||
\li Adds a member declaration for the class member being
|
||||
initialized if it is not yet declared. If \QC cannot
|
||||
automatically detect the data type of the member, you
|
||||
must add it.
|
||||
\li Identifier
|
||||
\row
|
||||
\li Create Implementations for Member Functions
|
||||
\li Creates implementations for all member functions in one go.
|
||||
In the \uicontrol {Member Function Implementations} dialog,
|
||||
specify whether the member functions are generated
|
||||
inline or outside the class.
|
||||
\li Function name
|
||||
\row
|
||||
\li Switch with Next/Previous Parameter
|
||||
\li Moves a parameter down or up one position in a parameter list.
|
||||
\li Parameter in the declaration or definition of a function
|
||||
\row
|
||||
\li Extract Function
|
||||
\li Moves the selected code to a new function and replaces the block
|
||||
of code with a call to the new function. Enter a name for the
|
||||
function in the \uicontrol {Extract Function Refactoring}
|
||||
dialog.
|
||||
\li Block of code selected
|
||||
\row
|
||||
\li Extract Constant as Function Parameter
|
||||
\li Replaces the selected literal and all its occurrences with the
|
||||
function parameter \c{newParameter}. The parameter
|
||||
\c{newParameter} will have the original literal as the default
|
||||
value.
|
||||
\li Block of code selected
|
||||
\row
|
||||
\li Add Local Declaration
|
||||
\li Adds the type of an assignee, if the type of the right-hand
|
||||
side of the assignment is known. For example, rewrites
|
||||
|
||||
\code
|
||||
a = foo();
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Type a = foo();
|
||||
\endcode
|
||||
|
||||
where Type is the return type of \c {foo()}
|
||||
|
||||
\li Assignee
|
||||
|
||||
\row
|
||||
\li Convert to Camel Case
|
||||
\li Converts a symbol name to camel case, where elements of the name
|
||||
are joined without delimiter characters and the initial
|
||||
character of each element is capitalized. For example, rewrites
|
||||
\c an_example_symbol as \c anExampleSymbol and
|
||||
\c AN_EXAMPLE_SYMBOL as \c AnExampleSymbol
|
||||
\li Identifier
|
||||
\row
|
||||
\li Complete Switch Statement
|
||||
\li Adds all possible cases to a switch statement of the type
|
||||
\c enum
|
||||
\li \c switch
|
||||
\row
|
||||
\li Generate Missing Q_PROPERTY Members
|
||||
\li Adds missing members to a \c Q_PROPERTY:
|
||||
\list
|
||||
\li \c read function
|
||||
\li \c write function, if there is a WRITE
|
||||
\li \c {onChanged} signal, if there is a NOTIFY
|
||||
\li data member with the name \c {m_<propertyName>}
|
||||
\endlist
|
||||
\li \c Q_PROPERTY
|
||||
\row
|
||||
\li Generate Q_PROPERTY and Missing Members
|
||||
\li Generates a Q_PROPERTY and adds missing members to it, as
|
||||
described above.
|
||||
\li Class member
|
||||
\row
|
||||
\li Generate Constant Q_PROPERTY and Missing Members
|
||||
\li Generates a constant Q_PROPERTY and adds missing members
|
||||
to it, as described above.
|
||||
\li Class member
|
||||
\row
|
||||
\li Generate Q_PROPERTY and Missing Members with Reset Function
|
||||
\li Generates a Q_PROPERTY and adds missing members to it, as
|
||||
described above, but with an additional \c reset function.
|
||||
\li Class member
|
||||
\row
|
||||
\li Apply Changes
|
||||
\li Keeps function declarations and definitions synchronized by
|
||||
checking for the matching declaration or definition when you
|
||||
edit a function signature and by applying the changes to the
|
||||
matching code.
|
||||
\li Function signature. When this fix is available, a light bulb
|
||||
icon appears: \inlineimage icons/refactormarker.png
|
||||
\row
|
||||
\li Add #include for undeclared or forward declared identifier
|
||||
\li Adds an \c {#include} directive to the current file to make the
|
||||
definition of a symbol available.
|
||||
\li Undeclared identifier
|
||||
\row
|
||||
\li Add Forward Declaration
|
||||
\li Adds a forward declaration for an undeclared identifier
|
||||
operation.
|
||||
\li Undeclared identifier
|
||||
\row
|
||||
\li Reformat Pointers or References
|
||||
\li Reformats declarations with pointers or references according
|
||||
to the code style settings for the current project. In case no
|
||||
project is open, the current global code style settings are
|
||||
used.
|
||||
|
||||
For example, rewrites:
|
||||
|
||||
\code
|
||||
char*s;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
char *s;
|
||||
\endcode
|
||||
|
||||
When applied to selections, all suitable declarations in the
|
||||
selection are rewritten.
|
||||
|
||||
\li Declarations with pointers or references and selections
|
||||
that have such declarations
|
||||
\row
|
||||
\li Create Getter and Setter Member Functions
|
||||
\li Creates either both getter and setter member functions for
|
||||
member variables or only a getter or setter.
|
||||
\li Member variable in class definition
|
||||
\row
|
||||
\li Generate Getter and Setter
|
||||
\li Creates getter and setter member functions for a member
|
||||
variable.
|
||||
\li Member variable in class definition
|
||||
\row
|
||||
\li Generate Getter
|
||||
\li Creates a getter member function for a member variable.
|
||||
\li Member variable in class definition
|
||||
\row
|
||||
\li Generate Setter
|
||||
\li Creates a setter member function for a member variable.
|
||||
\li Member variable in class definition
|
||||
\row
|
||||
\li Generate Constructor
|
||||
\li Creates a constructor for a class.
|
||||
\li Class definition
|
||||
\row
|
||||
\li Move Function Definition
|
||||
\li Moves a function definition to the implementation file, outside
|
||||
the class or back to its declaration. For example, rewrites:
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar();
|
||||
};
|
||||
|
||||
void Foo::bar() {
|
||||
// do stuff here
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Function signature
|
||||
\row
|
||||
\li Move All Function Definitions
|
||||
\li Moves all function definitions to the implementation file or
|
||||
outside the class. For example, rewrites:
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
void baz()
|
||||
{
|
||||
// do stuff here
|
||||
}
|
||||
};
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
class Foo
|
||||
{
|
||||
void bar();
|
||||
void baz();
|
||||
};
|
||||
|
||||
void Foo::bar() {
|
||||
// do stuff here
|
||||
}
|
||||
|
||||
void Foo::baz() {
|
||||
// do stuff here
|
||||
}
|
||||
\endcode
|
||||
|
||||
\li Class name
|
||||
\row
|
||||
\li Move Definition Here
|
||||
\li Moves an existing function definition to its declaration.
|
||||
\li Function declaration
|
||||
\row
|
||||
\li Assign to Local Variable
|
||||
\li Adds a local variable which stores the return value of a
|
||||
function call or a new expression. For example, rewrites:
|
||||
|
||||
\code
|
||||
QString s;
|
||||
s.toLatin1();
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QString s;
|
||||
QByteArray latin1 = s.toLatin1();
|
||||
\endcode
|
||||
|
||||
and
|
||||
|
||||
\code
|
||||
new Foo;
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
Foo * localFoo = new Foo;
|
||||
\endcode
|
||||
|
||||
By default, \QC uses the \c auto variable type when creating the
|
||||
variable. To label the variable with its actual type, select
|
||||
\preferences > \uicontrol C++ >
|
||||
\uicontrol {Quick Fixes}, and then deselect the
|
||||
\uicontrol {Use type "auto" when creating new variables} check
|
||||
box.
|
||||
|
||||
\li Function call or class name
|
||||
\row
|
||||
\li Insert Virtual Functions of Base Classes
|
||||
\li Inserts declarations and the corresponding definitions inside or
|
||||
outside the class or in an implementation file (if it exists).
|
||||
For more information, see \l{Insert virtual functions}.
|
||||
\li Class or base class name
|
||||
\row
|
||||
\li Optimize for-Loop
|
||||
\li Rewrites post increment operators as pre increment operators and
|
||||
post decrement operators as pre decrement operators. It also
|
||||
moves other than string or numeric literals and id expressions
|
||||
from the condition of a for loop to its initializer. For
|
||||
example, rewrites:
|
||||
|
||||
\code
|
||||
for (int i = 0; i < 3 * 2; i++)
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
for (int i = 0, total = 3 * 2; i < total; ++i)
|
||||
\endcode
|
||||
\li \c for
|
||||
|
||||
\row
|
||||
\li Escape String Literal as UTF-8
|
||||
\li Escapes non-ASCII characters in a string literal to hexadecimal
|
||||
escape sequences. String Literals are handled as UTF-8.
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Unescape String Literal as UTF-8
|
||||
\li Unescapes octal or hexadecimal escape sequences in a string
|
||||
literal. String Literals are handled as UTF-8.
|
||||
\li String literal
|
||||
|
||||
\row
|
||||
\li Convert to Stack Variable
|
||||
\li Converts the selected pointer to a stack variable. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
QByteArray *foo = new QByteArray("foo");
|
||||
foo->append("bar");
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QByteArray foo("foo");
|
||||
foo.append("bar");
|
||||
\endcode
|
||||
|
||||
This operation is limited to work only within function scope.
|
||||
Also, the coding style for pointers and references is not
|
||||
respected yet.
|
||||
\li Pointer Variable
|
||||
|
||||
\row
|
||||
\li Convert to Pointer
|
||||
\li Converts the selected stack variable to a pointer. For example,
|
||||
rewrites:
|
||||
|
||||
\code
|
||||
QByteArray foo = "foo";
|
||||
foo.append("bar");
|
||||
\endcode
|
||||
|
||||
as
|
||||
|
||||
\code
|
||||
QByteArray *foo = new QByteArray("foo");
|
||||
foo->append("bar");
|
||||
\endcode
|
||||
|
||||
This operation is limited to work only within function scope.
|
||||
Also, the coding style for pointers and references is not
|
||||
respected yet.
|
||||
\li Stack Variable
|
||||
\row
|
||||
\li Remove \c {using namespace} and Adjust Type Names Accordingly
|
||||
\li Remove occurrences of \c {using namespace} in the local scope
|
||||
and adjust type names accordingly.
|
||||
\li \c using directive
|
||||
\row
|
||||
\li Remove All Occurrences of \c {using namespace} in Global Scope
|
||||
and Adjust Type Names Accordingly
|
||||
\li Remove all occurrences of \c {using namespace} in the global
|
||||
scope and adjust type names accordingly.
|
||||
\li \c using directive
|
||||
\row
|
||||
\li Convert connect() to Qt 5 Style
|
||||
\li Converts a Qt 4 QObject::connect() to Qt 5 style.
|
||||
\li QObject::connect() (Qt 4 style)
|
||||
\row
|
||||
\li Convert Comment to C/C++ Style
|
||||
\li Converts C-style comments into C++-style comments, and vice
|
||||
versa. Tries to preserve \e pretty layout and takes Doxygen and
|
||||
qdoc formatting into consideration, but you might need to clean
|
||||
up the results.
|
||||
\li Code comment
|
||||
\row
|
||||
\li Move Function Documentation to Declaration/Definition
|
||||
\li Moves the documentation comment for a function between its
|
||||
declaration and definition.
|
||||
\li Documentation comment for a function
|
||||
\endtable
|
||||
|
||||
\sa {Apply quick fixes}, {Specify settings for quick fixes},
|
||||
{QML Quick Fixes}, {Quick Fixes}, {Refactoring}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-specify-settings-for-quick-fixes.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-projects-configure
|
||||
|
||||
\title Specify settings for quick fixes
|
||||
|
||||
To refactor your code, select quick fixes in the context menu in the
|
||||
\uicontrol Edit mode.
|
||||
|
||||
To create custom quick fix settings for a particular project, go to
|
||||
\uicontrol Projects > \uicontrol {Project Settings} >
|
||||
\uicontrol {Quick Fixes} and clear \uicontrol {Use global settings}.
|
||||
|
||||
\image qtcreator-refactoring-options-locations.png {Quick Fixes preferences}
|
||||
|
||||
To revert to global settings, select \uicontrol {Reset to Global}. To
|
||||
delete the custom settings, select \uicontrol {Use global settings}, and
|
||||
then select \uicontrol {Delete Custom Settings File}.
|
||||
|
||||
\sa {Apply quick fixes}, {C++ Quick Fixes}, {QML Quick Fixes}, {Quick Fixes},
|
||||
{Configuring Projects}, {Refactoring}
|
||||
*/
|
@@ -1,24 +1,46 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-editor-options-text.html
|
||||
\page creator-how-to-edit-vim-style.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-configure-editors
|
||||
|
||||
\title Edit like in Vim
|
||||
|
||||
To run the main editor in a manner similar to the Vim editor, go to
|
||||
\uicontrol Edit > \uicontrol Advanced and select \uicontrol {Use FakeVim},
|
||||
or press \key {Alt+Y,Alt+Y}.
|
||||
|
||||
\section1 Escape FakeVim mode
|
||||
|
||||
To temporarily escape FakeVim mode to access the normal \QC keyboard
|
||||
shortcuts like \key {Ctrl-R} for \uicontrol Run, press the comma
|
||||
key (\key {,}) before pressing the shortcut.
|
||||
|
||||
\section1 Quit FakeVim mode
|
||||
|
||||
To quit the FakeVim mode, go to \uicontrol Edit > \uicontrol Advanced and
|
||||
clear \uicontrol {Use FakeVim}, or press \key {Alt+Y,Alt+Y}.
|
||||
|
||||
\sa {FakeVim Modes and Commands}, {FakeVim}, {Change editor colors}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-editor-fakevim.html
|
||||
\nextpage creator-markdown-editor.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\title Using FakeVim Mode
|
||||
\ingroup creator-reference
|
||||
|
||||
In the \uicontrol FakeVim mode, you can run the main editor in a manner
|
||||
similar to the Vim editor. To run the editor in the \uicontrol FakeVim
|
||||
mode, select \uicontrol Edit > \uicontrol Advanced >
|
||||
\uicontrol {Use Vim-style Editing} or press \key {Alt+V,Alt+V}.
|
||||
\title FakeVim Modes and Commands
|
||||
|
||||
\section1 Supported Modes and Commands
|
||||
\brief Supported Vim modes and emulated commands.
|
||||
|
||||
In the \uicontrol FakeVim mode, most keystrokes in the main editor will be
|
||||
In the \uicontrol FakeVim mode, most keystrokes in the main editor are
|
||||
intercepted and interpreted in a way that resembles Vim. Most of the
|
||||
supported commands can be followed by a motion command or executed in visual
|
||||
mode, or they work with registers or can be prefixed with a number of
|
||||
mode, or they work with registers, or can be prefixed with a number of
|
||||
repetitions.
|
||||
|
||||
The following sections describe the commands emulated in the supported modes
|
||||
@@ -31,10 +53,10 @@
|
||||
\li Insert and replace
|
||||
\endlist
|
||||
|
||||
For more information on using Vim, see \l{http://www.vim.org/docs.php}
|
||||
For more information about using Vim, see \l{http://www.vim.org/docs.php}
|
||||
{Documentation} on the Vim web site.
|
||||
|
||||
\section2 Normal and Visual Modes
|
||||
\section1 Normal and Visual Modes
|
||||
|
||||
\list
|
||||
\li Basic movement, such as \c h/j/k/l, \c <C-U>, \c <C-D>, \c <C-F>,
|
||||
@@ -66,7 +88,7 @@
|
||||
\li Wrap line movement, such as \c gj, \c gk, \c g0, \c g^, \c g$
|
||||
\endlist
|
||||
|
||||
\section2 Command-Line Mode
|
||||
\section1 Command-Line Mode
|
||||
|
||||
\list
|
||||
\li \c :map, \c :unmap, \c :inoremap, and so on
|
||||
@@ -90,34 +112,7 @@
|
||||
Currently supported letters: \c fo-j
|
||||
\endlist
|
||||
|
||||
\section2 Plugin Emulation
|
||||
|
||||
FakeVim also emulates some popular vim plugins. To enable plugin emulation
|
||||
for particular plugins, select \preferences >
|
||||
\uicontrol FakeVim > \uicontrol General > \uicontrol {Plugin Emulation}.
|
||||
|
||||
\image qtcreator-fakevim-options-general-plugin-emulation.png "FakeVim Plugin Emulation preferences"
|
||||
|
||||
Currently emulated plugins:
|
||||
\list
|
||||
\li \l{https://github.com/tpope/vim-commentary}{vim-commentary}: \c gc
|
||||
action to comment code regions. For example, \c gcc, \c gc2j, \c gcip
|
||||
\li
|
||||
\l{https://github.com/vim-scripts/ReplaceWithRegister}{ReplaceWithRegister}:
|
||||
\list
|
||||
\li \c [count]["x]gr{motion} to replace \c {motion} with the contents of
|
||||
register \c x.
|
||||
\li ["x]grr to replace the current line.
|
||||
\endlist
|
||||
\li \l{https://github.com/vim-scripts/argtextobj.vim}{argtextobj.vim}:
|
||||
Defines the \c ia and \c aa text objects for function parameters.
|
||||
\li \l{https://github.com/tommcdo/vim-exchange}{vim-exchange}:
|
||||
A text exchange operator for vim.
|
||||
\li \l{https://github.com/tpope/vim-surround}{vim-surround}:
|
||||
Adds mappings for deleting, adding and changing surroundings.
|
||||
\endlist
|
||||
|
||||
\section2 Insert Mode
|
||||
\section1 Insert Mode
|
||||
|
||||
\list
|
||||
\li \c <C-O> executes a single command and returns to insert mode
|
||||
@@ -125,7 +120,7 @@
|
||||
\li \c <insert> toggles replace mode
|
||||
\endlist
|
||||
|
||||
\section2 Options
|
||||
\section1 Options
|
||||
|
||||
Use \c {:set ...} to set the options listed in the following table:
|
||||
|
||||
@@ -221,7 +216,7 @@
|
||||
\li
|
||||
\endtable
|
||||
|
||||
\section2 Vimrc Example
|
||||
\section1 Vimrc Example
|
||||
|
||||
\code
|
||||
" highlight matched
|
||||
@@ -266,54 +261,107 @@
|
||||
vnoremap <C-S-K> :m-2<CR>gv=gv
|
||||
\endcode
|
||||
|
||||
\sa {Edit like in Vim}, {FakeVim}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-reference-preferences-fakevim.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\ingroup creator-reference-preferences
|
||||
|
||||
\title FakeVim
|
||||
|
||||
\brief Set indentation for Vim-style editing and map vim commands
|
||||
to \QC functions.
|
||||
|
||||
To set prerences for Vim-style editing, go to \preferences >
|
||||
\uicontrol FakeVim.
|
||||
|
||||
\section1 Setting Vim Behavior
|
||||
|
||||
To set Vim behavior, go to \preferences > \uicontrol FakeVim >
|
||||
\uicontrol General.
|
||||
|
||||
\image qtcreator-preferences-fakevim-general.webp {FakeVim General preferences}
|
||||
|
||||
To use presets:
|
||||
|
||||
\list
|
||||
\li To preselect the indentation settings specified for the text editor,
|
||||
select \uicontrol {Copy Text Editor Settings}.
|
||||
\li To preselect the Qt coding style, select \uicontrol {Set Qt Style}.
|
||||
\li To preselect a simple indentation style, select
|
||||
\uicontrol {Set Plain Style}.
|
||||
\endlist
|
||||
|
||||
Then change the preselected settings.
|
||||
|
||||
\section1 Emulating Plugins
|
||||
|
||||
Select popular vim plugins to emulate in \uicontrol {Plugin Emulation}.
|
||||
|
||||
The following table describes the available plugins with links to them.
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Vim Plugin
|
||||
\li Description
|
||||
\row
|
||||
\li \l{https://github.com/tpope/vim-commentary}{vim-commentary}
|
||||
\li \c gc action to comment code regions. For example, \c gcc, \c gc2j,
|
||||
\c gcip
|
||||
\row
|
||||
\li \l{https://github.com/vim-scripts/ReplaceWithRegister}
|
||||
{ReplaceWithRegister}
|
||||
\li
|
||||
\list
|
||||
\li \c [count]["x]gr{motion} to replace \c {motion} with the
|
||||
contents of register \c x.
|
||||
\li ["x]grr to replace the current line.
|
||||
\endlist
|
||||
\row
|
||||
\li \l{https://github.com/vim-scripts/argtextobj.vim}{argtextobj.vim}
|
||||
\li Defines the \c ia and \c aa text objects for function parameters.
|
||||
\row
|
||||
\li \l{https://github.com/tommcdo/vim-exchange}{vim-exchange}
|
||||
\li A text exchange operator for vim.
|
||||
\row
|
||||
\li \l{https://github.com/tpope/vim-surround}{vim-surround}
|
||||
\li Adds mappings for deleting, adding, and changing surroundings.
|
||||
\endtable
|
||||
|
||||
\section1 Mapping FakeVim Commands
|
||||
|
||||
To map commands entered on the \uicontrol FakeVim command line to
|
||||
\QC functions, select \preferences > \uicontrol FakeVim >
|
||||
\uicontrol {Ex Command Mapping}.
|
||||
Enter a string in the \uicontrol Filter field to search for a specific
|
||||
\QC function.
|
||||
\QC functions:
|
||||
|
||||
\image qtcreator-fakevim-options-ex-command-mapping.png "FakeVim Ex Command Mapping preferences"
|
||||
\list 1
|
||||
\li Go to \preferences > \uicontrol FakeVim >
|
||||
\uicontrol {Ex Command Mapping}.
|
||||
\li Enter a string in the \uicontrol Filter field to find a \QC function.
|
||||
\image qtcreator-fakevim-options-ex-command-mapping.png {FakeVim Ex Command Mapping preferences}
|
||||
\li Select a function in the list
|
||||
\li In the \uicontrol {Regular expression} field, nter a string that will
|
||||
trigger the function.
|
||||
|
||||
Select a function in the list, and enter a string that will trigger the
|
||||
function in the \uicontrol {Regular expression} field. You can view the
|
||||
trigger expression in the \uicontrol {Ex Trigger Expression} field. To
|
||||
remove the trigger expression, select \uicontrol Reset.
|
||||
You can see the trigger expression in the
|
||||
\uicontrol {Ex Trigger Expression} field.
|
||||
\endlist
|
||||
|
||||
To remove the selected trigger expression, select \uicontrol Reset.
|
||||
|
||||
To reset the trigger expressions for all functions, select
|
||||
\uicontrol {Reset All}.
|
||||
|
||||
To map \e {user commands} to keyboard shortcuts, select \preferences >
|
||||
\section1 Mapping User Commands
|
||||
|
||||
To map \e {user commands} to keyboard shortcuts, go to \preferences >
|
||||
\uicontrol FakeVim > \uicontrol {User Command Mapping}. The user command
|
||||
mapped to the shortcut is executed by FakeVim as if you were typing it
|
||||
(as when replaying a macro).
|
||||
|
||||
\image qtcreator-fakevim-options-user-command-mapping.png "FakeVim User Command Mapping preferences"
|
||||
\image qtcreator-fakevim-options-user-command-mapping.png {FakeVim User Command Mapping preferences}
|
||||
|
||||
\section1 Setting FakeVim Preferences
|
||||
|
||||
To make changes to the Vim-style settings, select \preferences >
|
||||
\uicontrol FakeVim > \uicontrol General.
|
||||
|
||||
\image qtcreator-fakevim-options.png "FakeVim preferences"
|
||||
|
||||
To preselect the indentation settings specified for the text editor, select
|
||||
\uicontrol {Copy Text Editor Settings}. To preselect the Qt coding style,
|
||||
select \uicontrol {Set Qt Style}. To preselect a simple indentation style,
|
||||
select \uicontrol {Set Plain Style}. You can then change any of the
|
||||
preselected settings.
|
||||
|
||||
To use a Vim-style color scheme, select \preferences >
|
||||
\uicontrol {Text Editor} > \uicontrol {Fonts & Color}.
|
||||
In the \uicontrol {Color Scheme} list, select \uicontrol {Vim (dark)}.
|
||||
|
||||
\section1 Quitting FakeVim Mode
|
||||
|
||||
To quit the FakeVim mode, deselect \preferences >
|
||||
\uicontrol FakeVim > \uicontrol {Use FakeVim} or press \key {Alt+V,Alt+V}.
|
||||
|
||||
You can temporarily escape FakeVim mode to access the normal \QC keyboard
|
||||
shortcuts like \key {Ctrl-R} for \uicontrol Run by first pressing the comma
|
||||
key (\key {,}).
|
||||
\sa {Edit like in Vim}, {FakeVim Modes and Commands}
|
||||
*/
|
||||
|
@@ -1,35 +1,40 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||
|
||||
/*!
|
||||
\previouspage creator-markdown-editor.html
|
||||
\page creator-language-servers.html
|
||||
\nextpage creator-copilot.html
|
||||
\previouspage creator-reference.html
|
||||
|
||||
\title Using Language Servers
|
||||
\ingroup creator-reference-editors
|
||||
|
||||
\title Language Servers
|
||||
|
||||
\brief Get code completion, highlighting of the symbol under cursor, and
|
||||
jumping to the symbol definition in the editor for other programming
|
||||
languages besides C++, as well as diagnostics.
|
||||
|
||||
For several programming languages, a \e {language server} offers
|
||||
information about the code to IDEs as long as they support
|
||||
information about the code to IDEs as long as they support
|
||||
communication via the \l{Language Server Protocol}
|
||||
{language server protocol (LSP)}. This enables the
|
||||
IDE to offer the following services:
|
||||
{language server protocol (LSP)}. The IDE can then offer the
|
||||
following services:
|
||||
|
||||
\list
|
||||
\li \l{Completing Code}{Code completion}
|
||||
\li \l{Complete code}{Code completion}
|
||||
\li Sending document formatting requests to the language server to
|
||||
automatically format documents using the settings specified in
|
||||
\preferences > \uicontrol {Text Editor} > \uicontrol Behavior
|
||||
\li Highlighting the symbol under cursor
|
||||
\li \l{View function tooltips}
|
||||
\li \l{View function tooltips}{Viewing function tooltips}
|
||||
\li \l{Semantic Highlighting}{Semantic highlighting}, as defined in
|
||||
\l{https://github.com/microsoft/vscode-languageserver-node/pull/367}
|
||||
{Proposal of the semantic highlighting protocol extension}
|
||||
\li Navigating in the code by using the \l{Searching with the Locator}
|
||||
{locator} or \l{Moving to Symbol Definition or Declaration}
|
||||
{locator} or \l{Move to symbol definition or declaration}
|
||||
{moving to the symbol definition}
|
||||
\li Inspecting code by viewing the document outline in the
|
||||
\l{Outline} view or in the \uicontrol Symbols list on the
|
||||
\l{Using the Editor Toolbar}{editor toolbar}
|
||||
\l{Edit Mode}{editor toolbar}
|
||||
\li \l{Call Hierarchy}{Viewing the callers and callees of a function}
|
||||
\li \l{Finding Symbols}{Finding references to symbols}
|
||||
\li \l{Renaming Symbols}{Renaming the symbol under cursor}
|
||||
@@ -52,29 +57,71 @@
|
||||
type or file pattern, no files will be sent to the language server. This is
|
||||
done to avoid unnecessary traffic and inaccurate information, as files are
|
||||
only sent to the language server if they are known to be handled by it. For
|
||||
more information about how \QC uses MIME types, see \l {Editing MIME Types}.
|
||||
more information about how \QC uses MIME types, see
|
||||
\l {Edit MIME types}.
|
||||
|
||||
\section1 Specifying Settings for Language Clients
|
||||
\section1 Adding Language Servers
|
||||
|
||||
\QC supports adding a Java language server for
|
||||
\l{Connecting Android Devices}{Android development}. A Python language
|
||||
server is added by default and you can edit its preferences.
|
||||
For other languages, you can add generic stdIO language servers.
|
||||
\QC adds a Python language server by default.
|
||||
|
||||
To add language servers, select \preferences >
|
||||
\uicontrol {Language Client} > \uicontrol Add.
|
||||
Also, it offers to install language servers for JSON and YAML files
|
||||
when you open them in the editor if it can find the
|
||||
\l{https://nodejs.org/en/learn/getting-started/an-introduction-to-the-npm-package-manager}
|
||||
{NPM} package manager on the computer.
|
||||
|
||||
\image qtcreator-language-server-json.webp {Prompt to install JSON language server}
|
||||
|
||||
Add a Java language server for \l{Connecting Android Devices}
|
||||
{Android development}. For other languages, add generic stdIO language
|
||||
servers.
|
||||
|
||||
To add language servers, go to \preferences > \uicontrol {Language Client}
|
||||
and select \uicontrol Add.
|
||||
|
||||
\image qtcreator-language-client-options-java.png {Java language server preferences}
|
||||
|
||||
To enable a language server, select the check box next to the language
|
||||
server name and set server preferences.
|
||||
|
||||
To remove language servers from the list, select \uicontrol Delete.
|
||||
|
||||
\section2 Generic StdIO Language Server
|
||||
\section1 Supported Locator Filters
|
||||
|
||||
To add a generic language server:
|
||||
The locator enables you to browse not only files, but any items defined by
|
||||
\e {locator filters}. The language client plugin supports the following
|
||||
locator filters:
|
||||
|
||||
\list
|
||||
\li Locating symbols in the current project (\c {:})
|
||||
\li Locating symbols in the current document (\c {.})
|
||||
\li Locating class (\c {c}), enum, and function (\c {m})
|
||||
definitions in your project
|
||||
\endlist
|
||||
|
||||
\section1 Reporting Issues
|
||||
|
||||
The language server client has been mostly tested with Python and C++.
|
||||
If problems arise when you try them or some other language, please select
|
||||
\uicontrol Help > \uicontrol {Report Bug} to report them in the
|
||||
\l{https://bugreports.qt.io/}{Qt Project Bug Tracker}. The reports
|
||||
should include \QC console output with the environment
|
||||
variable \c {QT_LOGGING_RULES=qtc.languageclient.*=true} set.
|
||||
|
||||
\sa {Manage Language Servers}{How To: Manage Language Servers}, {Behavior}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-add-generic-language-servers.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-lsp
|
||||
|
||||
\title Add generic language servers
|
||||
|
||||
To add a generic StdIO language server:
|
||||
|
||||
\list 1
|
||||
\li Select \preferences > \uicontrol {Language Client} >
|
||||
\li Go to \preferences > \uicontrol {Language Client} >
|
||||
\uicontrol Add > \uicontrol {Generic StdIO Language Server}
|
||||
to add a generic language server.
|
||||
\image qtcreator-language-server-generic-stdio.png
|
||||
@@ -101,19 +148,29 @@
|
||||
arguments.
|
||||
\endlist
|
||||
|
||||
\section2 Java Language Server
|
||||
\sa {Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Language Servers}
|
||||
*/
|
||||
|
||||
To add a Java language server:
|
||||
/*!
|
||||
\page creator-how-to-add-java-language-servers.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-lsp
|
||||
|
||||
\title Add a Java language server
|
||||
|
||||
To add a Java language server for developing Android applications:
|
||||
|
||||
\list 1
|
||||
\li Select \preferences > \uicontrol {Language Client} >
|
||||
\li Go to \preferences > \uicontrol {Language Client} >
|
||||
\uicontrol Add > \uicontrol {Java Language Server} to add
|
||||
a Java language server.
|
||||
\image qtcreator-language-client-options-java.png "Java language server preferences"
|
||||
\image qtcreator-language-client-options-java.png {Java language server preferences}
|
||||
\li In the \uicontrol Name field, enter a name for the language server.
|
||||
Select the \inlineimage icons/replace.png
|
||||
(\uicontrol {Variables}) button to use a variable for the server
|
||||
name. For more information, see \l{Use Qt Creator variables}.
|
||||
name.
|
||||
\li In the \uicontrol Java field, enter the path to the Java executable.
|
||||
\li In the \uicontrol {Java Language Server} field, enter the path to
|
||||
the Java language server \c .jar file. You can download the Java
|
||||
@@ -121,75 +178,94 @@
|
||||
{Eclipse Downloads}.
|
||||
\endlist
|
||||
|
||||
\section2 Python Language Server
|
||||
\sa {Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Use Qt Creator variables}, {Language Servers}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-configure-python-language-servers.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-lsp
|
||||
|
||||
\title Configure Python language servers
|
||||
|
||||
To set preferences for Python language servers:
|
||||
|
||||
\list 1
|
||||
\li Select \preferences> \uicontrol Python >
|
||||
\li Go to \preferences> \uicontrol Python >
|
||||
\uicontrol {Language Server Configuration} to
|
||||
select the Python language server plugins to use.
|
||||
\image qtcreator-python-plugins.png "Python Language Server Configuration"
|
||||
\image qtcreator-python-plugins.png {Python Language Server Configuration}
|
||||
\li Select \uicontrol Advanced to configure the plugins.
|
||||
\image qtcreator-python-advanced.png "Python language server plugin configuration"
|
||||
\image qtcreator-python-advanced.png {Python language server plugin configuration}
|
||||
\endlist
|
||||
|
||||
For a complete list of configuration options, see
|
||||
\l{https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md}
|
||||
{Python Language Server Configuration}.
|
||||
|
||||
To disable the Python language server, deselect
|
||||
To disable the Python language server, clear
|
||||
\uicontrol {Use Python Language Server}.
|
||||
|
||||
\section2 QML Language Server
|
||||
\sa {Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Develop Qt for Python applications}, {Language Servers}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-use-qml-language-server.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-lsp
|
||||
|
||||
\title Turn on QML Language Server
|
||||
|
||||
Since Qt 6.4, the QML language server offers code completion and
|
||||
issues warnings for QML. To use it, select \preferences >
|
||||
\uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} >
|
||||
issues warnings for QML. To use it, go to \preferences >
|
||||
\uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} and select
|
||||
\uicontrol {Enable QML Language Server}.
|
||||
|
||||
To use advanced features, such as renaming and finding usages, select the
|
||||
\uicontrol {Use QML Language Server advanced features} check box.
|
||||
By default, enabling the QML language server will only enable warning messages
|
||||
and code completion, while advanced features such as renaming and finding usages
|
||||
will be handled by the embedded code model.
|
||||
To disable the embedded code model and use the QML language server for everything,
|
||||
select \uicontrol {Use QML Language Server advanced features}.
|
||||
|
||||
To use the latest version of the language server installed on your
|
||||
system, select the
|
||||
\uicontrol {Use QML Language Server from latest Qt version} check box.
|
||||
Also,\QC tries to use the QML language server shipped with
|
||||
the Qt version in your current kit. To override that behavior and always use the
|
||||
QML language server of the highest registered Qt version, select
|
||||
\uicontrol {Use QML Language Server from latest Qt version}.
|
||||
|
||||
\image qtcreator-qml-js-editing.webp {QML/JS Editing preferences}
|
||||
|
||||
\sa {Enabling and Disabling Messages}
|
||||
\sa {Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Enabling and Disabling Messages}, {Language Servers}
|
||||
*/
|
||||
|
||||
\section1 Supported Locator Filters
|
||||
/*!
|
||||
\page creator-how-to-inspect-language-clients.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
The locator enables you to browse not only files, but any items defined by
|
||||
\e {locator filters}. The language client plugin supports the following
|
||||
locator filters:
|
||||
\ingroup creator-how-to-lsp
|
||||
|
||||
\list
|
||||
\li Locating symbols in the current project (\c {:})
|
||||
\li Locating symbols in the current document (\c {.})
|
||||
\li Locating class (\c {c}), enum, and function (\c {m})
|
||||
definitions in your project
|
||||
\endlist
|
||||
\title Inspect language clients
|
||||
|
||||
\section1 Inspecting Language Clients
|
||||
|
||||
\QC sends messages (\e Requests) to the language server and receives
|
||||
responses that have the requested information if the language server is
|
||||
\QC sends messages (\e requests) to a \l{Language Servers}{language server} and
|
||||
receives responses that have the requested information if the language server is
|
||||
capable of handling the requests. To inspect the communication between \QC
|
||||
and language servers and view server capabilities, select \uicontrol Tools
|
||||
and language servers and to view server capabilities, select \uicontrol Tools
|
||||
> \uicontrol {Debug \QC} > \uicontrol {Inspect Language Clients}.
|
||||
|
||||
\image qtcreator-language-client-inspector-log.png "Language Client Inspector dialog"
|
||||
\image qtcreator-language-client-inspector-log.webp {Language Client Inspector dialog}
|
||||
|
||||
The dialog shows a list of running language servers. The value of the
|
||||
\uicontrol {Startup behavior} field in the language server preferences
|
||||
determines when the server is started. The information displayed depends on
|
||||
the language server.
|
||||
Select a running language server in \uicontrol {Language Server}. The
|
||||
information displayed depends on the language server.
|
||||
|
||||
Select the \inlineimage icons/languageclient.png
|
||||
button on the \l{Managing Language Servers}{editor toolbar}, and then select
|
||||
\uicontrol {Restart} to restart language servers.
|
||||
For a generic language server, the value of the \uicontrol {Startup behavior}
|
||||
field in the \l{Add generic language servers}{language server preferences}
|
||||
determines when the server is started. To restart language servers, select
|
||||
\inlineimage icons/languageclient.png on the \l{Edit Mode}{editor toolbar},
|
||||
and go to \uicontrol {Restart}.
|
||||
|
||||
\uicontrol Log displays additional information about the selected log entry.
|
||||
You can see the \uicontrol {Content length} and \uicontrol {MIME type} of
|
||||
@@ -198,7 +274,7 @@
|
||||
|
||||
To remove old entries, select \uicontrol Clear.
|
||||
|
||||
\section2 Capabilities
|
||||
\section1 Check language server capabilities
|
||||
|
||||
In \uicontrol Capabilities, you can check whether a language server is
|
||||
capable of a specific task. You cannot modify the server capabilities
|
||||
@@ -207,24 +283,50 @@
|
||||
You can view the \uicontrol Name, \uicontrol Value, and \uicontrol Type
|
||||
of the capability.
|
||||
|
||||
\image qtcreator-language-client-inspector-capabilities.png "Language Client Inspector Capabilities tab"
|
||||
\image qtcreator-language-client-inspector-capabilities.webp {Language Client Inspector Capabilities tab}
|
||||
|
||||
For some language servers, \uicontrol {Dynamic Capabilities} lists the
|
||||
\uicontrol Methods and \uicontrol Options available.
|
||||
|
||||
\section2 Memory Usage
|
||||
\section1 Inspect memory usage
|
||||
|
||||
For a clangd server, you can inspect the total amount of memory used by a
|
||||
particular component in \uicontrol {Memory Usage}.
|
||||
|
||||
\image qtcreator-language-client-inspector-memory-usage.png "Language Client Inspector Memory Usage tab"
|
||||
\image qtcreator-language-client-inspector-memory-usage.webp {Language Client Inspector Memory Usage tab}
|
||||
|
||||
\section1 Reporting Issues
|
||||
|
||||
The language server client has been mostly tested with Python and Java.
|
||||
If problems arise when you try them or some other language, please select
|
||||
\uicontrol Help > \uicontrol {Report Bug} to report them in the
|
||||
\l{https://bugreports.qt.io/}{Qt Project Bug Tracker}. The reports
|
||||
should include \QC console output with the environment
|
||||
variable \c {QT_LOGGING_RULES=qtc.languageclient.*=true} set.
|
||||
\sa {Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Language Servers}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page creator-how-to-configure-lsp-workspace.html
|
||||
\previouspage creator-how-tos.html
|
||||
|
||||
\ingroup creator-how-to-lsp
|
||||
\ingroup creator-how-to-projects-configure
|
||||
|
||||
\title Configure language server workspace
|
||||
|
||||
The language client sends the contents of the
|
||||
\uicontrol {Workspace Configuration} field as a JSON file to all language
|
||||
servers that have files open that belong to the project. The contents of the
|
||||
JSON file must be valid JSON. The available settings depend on the language
|
||||
server.
|
||||
|
||||
To configure the language server workspace for the current project:
|
||||
|
||||
\list 1
|
||||
\li Go to \uicontrol Projects > \uicontrol {Project Settings} >
|
||||
\uicontrol {Language Server}.
|
||||
\image qtcreator-projects-settings-language-server.webp {Language Server settings for a project}
|
||||
\li In \uicontrol {Workspace Configuration}, specify language server
|
||||
settings using valid JSON format.
|
||||
\endlist
|
||||
|
||||
To add language servers and change their preferences, go to
|
||||
\uicontrol {Global settings}.
|
||||
|
||||
\sa {Manage Language Servers}{How To: Manage Language Servers},
|
||||
{Language Servers}, {Configuring Projects}
|
||||
*/
|
||||
|