Merge remote-tracking branch 'origin/10.0'

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/libs/utils/multitextcursor.cpp

Change-Id: I54b00ea5e6953078beed7673b5de31114f983bfa
This commit is contained in:
Eike Ziller
2023-03-31 15:57:04 +02:00
21 changed files with 351 additions and 262 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -385,14 +385,14 @@
//! [0]
\list
\li Add and remove expression evaluators
\li Change value display format
\li Change \l{Changing Value Display format}{value display format}
\li Expand and collapse view contents
\li Copy view contents or expression values to the clipboard
\li Open view contents in an editor
\li Open memory editor
\li Set data breakpoints
\li Use \l{Using Debugging Helpers}{debugging helpers}
\li Show tooltips in the \uicontrol Locals view when debugging
\li Show and hide tooltips in the view when debugging
\li Dereference pointers automatically
\li Sort members of classes and structs alphabetically
\li Use dynamic object type for display
@@ -512,42 +512,5 @@
appears uninitialized, its value is reported as
\uicontrol {not in scope}. Not all uninitialized objects,
however, can be recognized as such.
\section1 Inspecting Basic Qt Objects
The most powerful feature of the debugger is that the \uicontrol {Locals}
and \uicontrol {Expressions} views show the data that belongs to
Qt's basic objects. For example, in case of QObject, instead of
a pointer to some private data structure, you see a list of
children, signals, and slots.
Similarly, instead of displaying many pointers and integers, \QC's debugger
displays the contents of a QHash or QMap in an orderly manner. Also, the
debugger shows access data for QFileInfo and the \e real contents of QVariant.
Right-click in the \uicontrol {Locals} or the \uicontrol {Expressions} view
to open a context menu that has more options for viewing data. The
available options depend on the type of the current items, and come from
the \l{Using Debugging Helpers}{Debugging Helpers}. Typically,
string-like data, such as \c{QByteArray} and \c{std::string}, offer a
selection of encodings, as well as the possibility to use a full editor
window. Map-like data, such as \c{QMap}, \c{QHash}, and \c{std::map}, offer
a compact option using the \c{name} column for keys, resulting in a concise
display of containers with short keys, such as numbers or short strings. For
example, to expand all the values of QMap, select
\uicontrol {Change Value Display Format} > \uicontrol Compact.
You can use the \uicontrol {Locals} and \uicontrol {Expressions} view to change
the contents of variables of simple data types, for example, \c int, \c float,
\c QString and \c std::string when the application is interrupted. To do so,
click the \uicontrol Value column, modify the value with the inplace editor,
and press \key Enter (or \key Return).
To change the complete contents of QVector or \c std::vector values, type
all values separated by commas into the \uicontrol Value column of the main
entry.
You can enable tooltips in the main editor displaying this information.
For more information, see \l{See the value of variables in tooltips while debugging}.
\endif
*/

View File

@@ -369,6 +369,28 @@
You can launch the debugger in the post-mortem mode if an application
crashes on Windows. Click the \uicontrol {Debug in \QC} button in the error
message from the Windows operating system.
\section1 Starting the Debugger from the Command Line
You can use the \QC debugger interface from the command line. To attach it
to a running process, specify the process ID as a parameter for the
\c {-debug} option. To examine a core file, specify the file name. \QC
executes all the necessary steps, such as searching for the binary that
belongs to a core file. To connect to a debug server, specify the server
location and port number.
For example:
\list
\li \c {C:\qtcreator\bin>qtcreator -debug 2000}
\li \c {C:\qtcreator\bin>qtcreator -debug core=core.2000}
\li \c {C:\qtcreator\bin>qtcreator -debug some.exe,core=core}
\li \c {C:\qtcreator\bin>qtcreator -debug server=some.dot.com:4251}
\endlist
For more information, see \l{Using Command Line Options}.
*/
/*!
@@ -745,74 +767,141 @@
\title Examining Data
Use the \l{Local Variables and Function Parameters}{Locals} and
\l{Evaluating Expressions}{Expressions} views to examine the data
in more detail.
When the application stops, you can examine certain data in the debugger. The
availability of data depends on the compiler settings when compiling the
application and the exact location where the application stops.
You can use the following keyboard shortcuts:
Unexpected events are called \e exceptions and the debugger can stop
the application when they occur. Going to the location in the code where
the exception occurred helps you investigate the problem and find ways to
fix it.
\list
If you have a variable that shows text, but the application does not display
it correctly, for example, your data might be incorrect or the code that sets
the display text might do something wrong. You can step through the code and
examine changes to the variable to find out where the error occurs.
\li To finish debugging, press \key {Shift+F5}.
\section1 Showing Tooltips for Simple Values
\li To execute a line of code as a whole, press \key F10
(\key {Command+Shift+O} on \macos).
To display the value of a simple variable, hover the mouse pointer over its
name in the code editor.
\li To step into a function or a subfunction, press \key F11
(\key {Command+Shift+I} on \macos).
\image qtcreator-debugger-value-tooltips.webp {Value tooltip in code editor}
\li To leave the current function or subfunction, press \key {Shift+F11}
(\key {Command+Shift+T} on \macos).
To keep the tooltip visible, click the pin button.
You can expand pinned tooltips to view their full content.
\li To continue running the application, press \key F5.
Pinned tooltips are stored in the session. To close all pinned tooltips,
select \uicontrol {Close Editor Tooltips} in the context menu in the
\uicontrol Locals or \uicontrol Expressions view.
\li To run to the line that has the cursor, press \key {Ctrl+F10}
(\key {Shift+F8} on \macos).
To disable tooltips for performance reasons, select \uicontrol Edit >
\uicontrol Preferences > \uicontrol Debugger > \uicontrol General >
\uicontrol {Use tooltips in main editor when debugging}.
\li To run to the selected function when you are stepping into a nested
function, press \key {Ctrl+F6}.
\section1 Examining Complex Values in Debug Views
\endlist
\QC displays the raw information from the native debuggers in a clear and
concise manner to simplify the debugging process without losing the power
of the native debuggers.
You can continue executing the application until the current
function completes or jump to an arbitrary position in the current function.
\image qtcreator-locals.png {Locals view}
\section1 Stepping Into Code
The \l {Local Variables and Function Parameters}{Locals} and
\l {Evaluating Expressions}{Expressions} views show structured
data, such as objects of \c class, \c struct, or \c union types, as a tree.
To access sub-structures of the objects, expand the tree nodes.
The tree shows the sub-structures in their in-memory order. To show them
in alphabetic order, select \uicontrol {Sort Members of Classes and Structs
Alphabetically} in the context menu.
Use the following buttons to step through the code:
Similarly, pointers are displayed as a tree item with a single
child item representing the target of the pointer. Select
\uicontrol {Dereference Pointers Automatically} in the context
menu to combine the pointer and the target into a single entry that
shows the name and the type of the pointer and the value of the target.
The standard representation is good enough for the examination of simple
structures, but it does usually not give enough insight into more complex
structures, such as \c QObjects or associative containers. These items are
internally represented by a complex arrangement of pointers, often highly
optimized, with part of the data not directly accessible through neither
sub-structures nor pointers.
To show complex structures, such as \c QObjects or associative containers,
in a clear and concise manner, \QC uses Python scripts that are called
\l{Using Debugging Helpers}{debugging helpers}.
In addition to the generic IDE functionality of the
\l {Viewing Call Stack Trace}{Stack}, \uicontrol {Locals},
\uicontrol {Expressions}, \l {Viewing and Editing Register State}{Registers},
and other views, \QC makes debugging Qt-based applications easy. The debugger
plugin understands the internal layout of several Qt classes, for example,
QString, the Qt containers, and most importantly QObject (and classes derived
from it), as well as most containers of the C++ Standard Library and some GCC
extensions. It uses this deeper understanding to present objects of such
classes in a useful way.
\section1 Stepping Through Code
The following table summarizes the functions that you can use to step through
the code and examine the changes in variables.
\table
\header
\li Button
\li Function
\li Keyboard Shortcut
\li Description
\row
\li \inlineimage icons/qtcreator-debug-button-stop.png
\li \uicontrol {Stop Debugger}
\li \key {Shift+F5}
\li Stops the debugger.
\row
\li \inlineimage icons/debugger_stepover_small.png
\li \uicontrol {Step Over}
\li \key F10 (\key {Command+Shift+O} on \macos)
\li Steps over the next line inside the function being debugged. It
executes the call and moves to the next line to be executed in
the function.
\row
\li \inlineimage icons/debugger_stepinto_small.png
\li \uicontrol {Step Into}
\li \key F11 (\key {Command+Shift+I} on \macos)
\li Steps into the line that it is currently on. For a function call,
goes into the function and is ready to continue.
\row
\li \inlineimage icons/debugger_stepout_small.png
\li \uicontrol {Step Out}
\li \key {Shift+F11} (\key {Command+Shift+T} on \macos)
\li Finishes executing the function and exits to the function that
it was called from.
\row
\li
\li \uicontrol {Run to Line}
\li \key {Ctrl+F10} (\key {Shift+F8} on \macos)
\li Runs to the line that has the cursor.
You can also directly jump to a line instead of executing until
the end of the line, to avoid a variable getting modified or a
function getting called, for example.
\row
\li
\li \uicontrol {Run to Selected Function}
\li \key {Ctrl+F6}
\li Runs to the selected function when you are stepping into a nested
function.
\row
\li \inlineimage icons/qtcreator-debugging-continue.png
\li \uicontrol {Continue}
\li \key F5
\li Resumes application execution at the address where it last
stopped.
\endtable
\section2 Compressing Steps in GDB
When using GDB as the debugging backend, you can compress several steps
into one step for less noisy debugging. For more information, see
\l{Specifying GDB Settings}.
@@ -821,33 +910,6 @@
but this option should be used with care, as it is slow and unstable on the
GDB side. For more information, see \l{Specifying GDB Settings}.
\section1 Debugging C++ Based Applications
The following sections describe additional debugging functions that apply
only to debugging C++.
\section2 Starting the Debugger from the Command Line
You can use the \QC debugger interface from the command line. To attach it
to a running process, specify the process ID as a parameter for the
\c {-debug} option. To examine a core file, specify the file name. \QC
executes all the necessary steps, such as searching for the binary that
belongs to a core file. To connect to a debug server, specify the server
location and port number.
For example:
\list
\li \c {C:\qtcreator\bin>qtcreator -debug 2000}
\li \c {C:\qtcreator\bin>qtcreator -debug core=core.2000}
\li \c {C:\qtcreator\bin>qtcreator -debug some.exe,core=core}
\li \c {C:\qtcreator\bin>qtcreator -debug server=some.dot.com:4251}
\endlist
For more information, see \l{Using Command Line Options}.
\section2 Stepping into Frameworks in \macos
In \macos, external libraries are usually built into so-called Frameworks,
@@ -857,6 +919,87 @@
\uicontrol {Use debug versions of Frameworks} option in the project run
settings.
\section1 Inspecting Basic Qt Objects
The most powerful feature of the debugger is that the \uicontrol {Locals}
and \uicontrol {Expressions} views show the data that belongs to
Qt's basic objects. For example, in case of QObject, instead of
a pointer to some private data structure, you see a list of
children, signals, and slots.
Similarly, instead of displaying many pointers and integers, \QC's debugger
displays the contents of a QHash or QMap in an orderly manner. Also, the
debugger shows access data for QFileInfo and the \e real contents of QVariant.
\section2 Changing Value Display format
In the \uicontrol {Locals} or the \uicontrol {Expressions} view, select
\uicontrol {Change Value Display Format} in the context menu to change the
value display format. The available options depend on the type of the
current items, and are provided by the debugging helpers.
To force a plain C-like display of structures, select
\uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
\uicontrol {Locals & Expressions}, and then deselect the
\uicontrol {Use Debugging Helpers} check box. This still uses the
Python scripts, but generates more basic output. To force the plain display
for a single object or for all objects of a given type, select
\uicontrol {Change Value Display Format} > \uicontrol Raw in the context
menu of the \uicontrol Locals or \uicontrol Expressions view.
Typically, you can change the encoding for string-like data, such as
\c{QByteArray} and \c{std::string}, or show the data in a full editor
window.
You can select a \e compact option for map-like data, such as \c{QMap},
\c{QHash}, and \c{std::map}, that uses the \uicontrol {Name} column for
keys and results in a concise display of containers with short keys,
such as numbers or short strings. For example, to expand all the values
of QMap, select \uicontrol {Change Value Display Format} > \uicontrol Compact.
For strings, you can select \uicontrol {Change Value Display Format} >
\uicontrol {Separate Window} to see string content inside a text edit
instead of a single line item in the view. For QPixmap, you can see
the pixmap being created pixel-by-pixel when stepping through the code.
\section2 Changing Variable Values
You can use the \uicontrol {Locals} and \uicontrol {Expressions} view to change
the contents of variables of simple data types, for example, \c int, \c float,
\c QString and \c std::string when the application is interrupted. To do so,
click the \uicontrol Value column, modify the value with the inplace editor,
and press \key Enter.
To change the complete contents of QVector or \c std::vector values, type
all values separated by commas into the \uicontrol Value column of the main
entry. However, \QC does not try to reallocate memory for variables, so it
applies the changes only if the new content fits into the old memory and if
the debugger supports changing values.
\section2 Signal-Slot Connections
If an instance of a class is derived from QObject, you can find all other
objects connected to this object's slots with Qt's signals and slots
mechanism. Select \uicontrol Edit > \uicontrol Preferences
> \uicontrol {Debugger} > \uicontrol {Locals & Expressions} >
\uicontrol {Use Debugging Helpers}.
\image qtcreator-debugging-helper-options.png "Locals & Expressions preferences"
In the \uicontrol Locals view, expand the object's entry and open the slot
in the \e slots subitem. The view shows the objects connected to this slot
as children of the slot. Similarly, you can show the children of signals.
\section2 Low-level Data
If you cannot debug Qt objects because their data is corrupted, you can
switch off the debugging helpers to make low-level structures visible.
To switch off the debugging helpers, deselect
\uicontrol {Use Debugging Helpers} in \uicontrol Edit >
\uicontrol Preferences > \uicontrol Debugger >
\uicontrol {Locals & Expressions}.
\omit
\section2 Creating Snapshots
@@ -1193,35 +1336,9 @@
\title Using Debugging Helpers
Structured data, such as objects of \c class, \c struct, or \c union types,
is displayed in the \uicontrol {Locals} and \uicontrol {Expressions} views as part
of a tree. To access sub-structures of the objects, expand the tree nodes.
The sub-structures are presented in their in-memory order, unless the
\uicontrol {Sort Members of Classes and Structs Alphabetically} option
from the context menu is selected.
Similarly, pointers are displayed as a tree item with a single child item
representing the target of the pointer. In case the context menu item
\uicontrol {Dereference Pointers Automatically} is selected, the pointer and
the target are combined into a single entry, showing the name and the type
of the pointer and the value of the target.
This standard representation is good enough for the examination of simple
structures, but it does usually not give enough insight into more complex
structures, such as \c QObjects or associative containers. These items are
internally represented by a complex arrangement of pointers, often highly
optimized, with part of the data not directly accessible through neither
sub-structures nor pointers.
To give the user simple access also to these items, \QC employs Python
scripts that are called \e {debugging helpers}.
Debugging helpers are always automatically used. To force a plain C-like
display of structures, select \uicontrol Edit > \uicontrol Preferences >
\uicontrol Debugger > \uicontrol {Locals & Expressions}, and then deselect
the \uicontrol {Use Debugging Helpers} check box. This will still use the
Python scripts, but generate more basic output. To force the plain display
for a single object or for all objects of a given type, select the
corresponding option from the context menu.
To show complex structures, such as \c QObjects or associative containers,
in a clear and concise manner, \QC uses Python scripts that are called
\e {debugging helpers}.
\QC ships with debugging helpers for more than 200 of the most popular Qt
classes, standard C++ containers, and smart pointers, covering the usual
@@ -1231,8 +1348,9 @@
\QC uses Python scripts to translate raw memory contents and type information
data from native debugger backends (GDB, LLDB, and CDB are currently supported)
into the form presented to the user in the \uicontrol {Locals} and
\uicontrol {Expressions} views.
into the form presented to the user in the
\l {Local Variables and Function Parameters}{Locals}
and \l {Evaluating Expressions}{Expressions} views.
Unlike GDB's
\l{https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html#Pretty-Printing}

View File

@@ -1,4 +1,4 @@
// 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
// **********************************************************************
@@ -26,9 +26,6 @@
\li \l {Run \QC from the command line}
\li \l {Show and hide sidebars}
\li \l {Move to symbols}
\li \l {Inspect signal-slot connections while debugging}
\li \l {Display low-level data in the debugger}
\li \l {See the value of variables in tooltips while debugging}
\li \l {Quickly locate files using the keyboard}
\li \l {Perform calculations}
\li \l {Jump to a function in QML code}
@@ -170,61 +167,6 @@
cursor on the symbol and press \key {F2}. For more information, see
\l{Moving to Symbol Definition or Declaration}.
\section1 Inspect signal-slot connections while debugging
If an instance of a class is derived from QObject, and you would like to
find all other objects connected to one of your object's slots using
Qt's signals and slots mechanism, select \uicontrol Edit > \uicontrol Preferences
> \uicontrol {Debugger} > \uicontrol {Locals & Expressions} >
\uicontrol {Use Debugging Helpers}.
In the \uicontrol{Locals} view, expand the object's entry and open
the slot in the \e slots subitem. The objects connected to this slot are
shown as children of the slot. This method works with signals too.
For more information about the \uicontrol{Locals} view, see
\l{Local Variables and Function Parameters}.
\section1 Display low-level data in the debugger
If special debugging of Qt objects fails due to data corruption within the
debugged objects, you can switch off the debugging helpers. When debugging
helpers are switched off, low-level structures become visible.
To switch off the debugging helpers:
\list 1
\li Select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
\uicontrol {Locals & Expressions}.
\image qtcreator-debugging-helper-options.png "Locals & Expressions preferences"
\li Deselect \uicontrol {Use Debugging Helpers}.
\endlist
\section1 See the value of variables in tooltips while debugging
To inspect the value of variables from the editor, you can turn
on tooltips. Tooltips are hidden by default for performance reasons.
\list 1
\li Select \uicontrol Edit > \uicontrol Preferences >
\uicontrol Debugger > \uicontrol General.
\image qtcreator-debugger-general-options.png "Debugger General preferences"
\li Select \uicontrol {Use tooltips in main editor when debugging}.
\endlist
When you hover over a variable in the code editor in \uicontrol Debug mode, a
tooltip is displayed. To keep the tooltip visible, click the pin button.
You can expand pinned tooltips to view their full content.
\image qtcreator-pin-tooltip.png
Pinned tooltips are stored in the session. To close all pinned tooltips,
select \uicontrol {Close Editor Tooltips} in the context menu in the
\uicontrol {Locals} view.
\section1 Quickly locate files using the keyboard
Use the \uicontrol Locator to browse

View File

@@ -93,7 +93,7 @@ isEmpty(CATCH_INCLUDE_DIR): {
message("CATCH_INCLUDE_DIR is not set, assuming Catch2 can be found automatically in your system")
}
SOURCES += \
main.cpp \
SOURCES += \\
main.cpp \\
%{TestCaseFileWithCppSuffix}
@endif

View File

@@ -26688,119 +26688,119 @@ zu deaktivieren, deaktiviert auch die folgenden Plugins:
<name>QtC::FakeVim</name>
<message>
<source>Use FakeVim</source>
<translation type="unfinished">FakeVim benutzen</translation>
<translation>FakeVim benutzen</translation>
</message>
<message>
<source>Read .vimrc from location:</source>
<translation type="unfinished">Verwende .vimrc aus:</translation>
<translation>Verwende .vimrc aus:</translation>
</message>
<message>
<source>Show position of text marks</source>
<translation type="unfinished">Position der Textmarken anzeigen</translation>
<translation>Position der Textmarken anzeigen</translation>
</message>
<message>
<source>Pass control keys</source>
<translation type="unfinished"></translation>
<translation>Steuerungstasten weitergeben</translation>
</message>
<message>
<source>Pass keys in insert mode</source>
<translation type="unfinished">Tastenanschläge im Einfügemodus weitergeben</translation>
<translation>Tastenanschläge im Einfügemodus weitergeben</translation>
</message>
<message>
<source>Start of line</source>
<translation type="unfinished">Zeilenanfang</translation>
<translation>Zeilenanfang</translation>
</message>
<message>
<source>Tabulator size:</source>
<translation type="unfinished">Tabulatorweite:</translation>
<translation>Tabulatorweite:</translation>
</message>
<message>
<source>Smart tabulators</source>
<translation type="unfinished">&quot;Smart&quot;-Tabularmodus</translation>
<translation>&quot;Smart&quot;-Tabulatormodus</translation>
</message>
<message>
<source>Highlight search results</source>
<translation type="unfinished">Suchergebnisse hervorheben</translation>
<translation>Suchergebnisse hervorheben</translation>
</message>
<message>
<source>Shift width:</source>
<translation type="unfinished">Einrückung:</translation>
<translation>Einrückungsweite:</translation>
</message>
<message>
<source>Expand tabulators</source>
<translation type="unfinished">Tabulatoren expandieren</translation>
<translation>Tabulatoren expandieren</translation>
</message>
<message>
<source>Automatic indentation</source>
<translation type="unfinished">Automatische Einrückung</translation>
<translation>Automatische Einrückung</translation>
</message>
<message>
<source>Smart indentation</source>
<translation type="unfinished">Intelligente Einrückung</translation>
<translation>Intelligente Einrückung</translation>
</message>
<message>
<source>Incremental search</source>
<translation type="unfinished">Inkrementelle Suche</translation>
<translation>Inkrementelle Suche</translation>
</message>
<message>
<source>Use search dialog</source>
<translation type="unfinished">Suchdialog verwenden</translation>
<translation>Suchdialog verwenden</translation>
</message>
<message>
<source>Use smartcase</source>
<translation type="unfinished">Smartcase verwenden</translation>
<translation>Smartcase verwenden</translation>
</message>
<message>
<source>Use ignorecase</source>
<translation type="unfinished">ignorecase verwenden</translation>
<translation>ignorecase verwenden</translation>
</message>
<message>
<source>Use wrapscan</source>
<translation type="unfinished">Wrapscan verwenden</translation>
<translation>wrapscan verwenden</translation>
</message>
<message>
<source>Use tildeop</source>
<translation type="unfinished"></translation>
<translation>tildeop verwenden</translation>
</message>
<message>
<source>Show partial command</source>
<translation type="unfinished">Teil des Kommandos anzeigen</translation>
<translation>Teil des Kommandos anzeigen</translation>
</message>
<message>
<source>Show line numbers relative to cursor</source>
<translation type="unfinished">Zeilennummern relativ zur Einfügemarke anzeigen</translation>
<translation>Zeilennummern relativ zur Einfügemarke anzeigen</translation>
</message>
<message>
<source>Blinking cursor</source>
<translation type="unfinished">Blinkende Einfügemarke</translation>
<translation>Blinkende Einfügemarke</translation>
</message>
<message>
<source>Scroll offset:</source>
<translation type="unfinished">Rollversatz:</translation>
<translation>Scroll Offset:</translation>
</message>
<message>
<source>Backspace:</source>
<translation type="unfinished">Rücktaste:</translation>
<translation>Rücktaste:</translation>
</message>
<message>
<source>Keyword characters:</source>
<translation type="unfinished">Wortbildende Zeichen:</translation>
<translation>Wortbildende Zeichen:</translation>
</message>
<message>
<source>Displays line numbers relative to the line containing text cursor.</source>
<translation type="unfinished">Zeige Zeilennummern relativ zur Zeile mit der Einfügemarke an.</translation>
<translation>Zeilennummern relativ zur Zeile mit der Einfügemarke anzeigen.</translation>
</message>
<message>
<source>Does not interpret key sequences like Ctrl-S in FakeVim but handles them as regular shortcuts. This gives easier access to core functionality at the price of losing some features of FakeVim.</source>
<translation type="unfinished">Zeichenfolgen wie Strg-S nicht in FakeVim verarbeiten, sondern sie als gewöhnliche Tastenkombinationen behandeln. Dies erleichtert den Zugriff auf die Kernfunktionalität auf Kosten eingeschränkter Funktionalität von FakeVim.</translation>
<translation>Tastensequenzen wie Strg-S nicht in FakeVim verarbeiten, sondern sie als gewöhnliche Tastenkombinationen behandeln. Dies erleichtert den Zugriff auf die Kernfunktionalität auf Kosten eingeschränkter Funktionalität von FakeVim.</translation>
</message>
<message>
<source>Does not interpret some key presses in insert mode so that code can be properly completed and expanded.</source>
<translation type="unfinished">Einige Zeichenfolgen nicht im Einfügemodus verarbeiten, damit Quelltext korrekt vervollständigt und erweitert werden kann.</translation>
<translation>Einige Tastenanschläge nicht im Einfügemodus verarbeiten, damit Quelltext korrekt vervollständigt und erweitert werden kann.</translation>
</message>
<message>
<source>Vim tabstop option.</source>
<translation type="unfinished">Vim-Tabulator-Einstellung.</translation>
<translation>Vim-Tabulatorstopp-Einstellung.</translation>
</message>
<message>
<source>Unknown option: %1</source>
@@ -26836,11 +26836,12 @@ zu deaktivieren, deaktiviert auch die folgenden Plugins:
</message>
<message>
<source>Type Meta-Shift-Y, Meta-Shift-Y to quit FakeVim mode.</source>
<translation type="unfinished"></translation>
<translatorcomment>These are the names of the actual keys on my german Apple keyboard https://support.apple.com/de-de/HT201236</translatorcomment>
<translation>Benutzen sie Control-Umschalt-Y, Control-Umschalt-Y, um den FakeVim-Modus zu verlassen.</translation>
</message>
<message>
<source>Type Alt-Y, Alt-Y to quit FakeVim mode.</source>
<translation type="unfinished"></translation>
<translation>Benutzen Sie Alt-Y, Alt-Y, um den FakeVim-Modus zu verlassen.</translation>
</message>
<message>
<source>Unknown option:</source>
@@ -26999,23 +27000,23 @@ zu deaktivieren, deaktiviert auch die folgenden Plugins:
</message>
<message>
<source>Copy Text Editor Settings</source>
<translation type="unfinished">Texteditor-Einstellungen übernehmen</translation>
<translation>Texteditor-Einstellungen kopieren</translation>
</message>
<message>
<source>Set Qt Style</source>
<translation type="unfinished">Qt-Stil setzen</translation>
<translation>Qt-Stil einstellen</translation>
</message>
<message>
<source>Set Plain Style</source>
<translation type="unfinished">Einfachen Stil setzen</translation>
<translation>Einfachen Stil einstellen</translation>
</message>
<message>
<source>Vim Behavior</source>
<translation type="unfinished">Vim-Verhalten</translation>
<translation>Vim-Verhalten</translation>
</message>
<message>
<source>Plugin Emulation</source>
<translation type="unfinished"></translation>
<translation>Plugin-Emulation</translation>
</message>
<message>
<source>Action</source>
@@ -27035,19 +27036,20 @@ zu deaktivieren, deaktiviert auch die folgenden Plugins:
</message>
<message>
<source>Meta+Shift+Y,Meta+Shift+Y</source>
<translation type="unfinished"></translation>
<translatorcomment>The actual shortcut in Qt terms</translatorcomment>
<translation>Meta+Shift+Y,Meta+Shift+Y</translation>
</message>
<message>
<source>Alt+Y,Alt+Y</source>
<translation type="unfinished"></translation>
<translation>Alt+Y,Alt+Y</translation>
</message>
<message>
<source>Meta+Shift+Y,%1</source>
<translation type="unfinished"></translation>
<translation>Meta+Shift+Y,%1</translation>
</message>
<message>
<source>Alt+Y,%1</source>
<translation type="unfinished"></translation>
<translation>Alt+Y,%1</translation>
</message>
<message>
<source>Execute User Action #%1</source>
@@ -32045,7 +32047,7 @@ Beispiel: *.cpp%1*.h</translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Beschreibung</translation>
<translation>Beschreibung</translation>
</message>
<message>
<source>Macro</source>

View File

@@ -194,7 +194,7 @@ bool MultiTextCursor::hasMultipleCursors() const
int MultiTextCursor::cursorCount() const
{
return m_cursorList.size();
return static_cast<int>(m_cursorList.size());
}
void MultiTextCursor::movePosition(QTextCursor::MoveOperation operation,

View File

@@ -8,6 +8,7 @@ add_qtc_plugin(ClangTools
PLUGIN_DEPENDS Core Debugger CppEditor
PLUGIN_RECOMMENDS CppEditor
PLUGIN_TEST_DEPENDS QmakeProjectManager QbsProjectManager
SKIP_PCH
DEFINES
CLANG_VERSION="${CLANG_VERSION}"
CLANG_INCLUDE_DIR="${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"

View File

@@ -241,11 +241,6 @@ QWidget *ConsoleItemDelegate::createEditor(QWidget *parent,
"margin-top: 4px;"
"background-color: transparent;"
"}");
connect(editor, &ConsoleEdit::editingFinished, this, [this, editor] {
auto delegate = const_cast<ConsoleItemDelegate*>(this);
emit delegate->commitData(editor);
emit delegate->closeEditor(editor);
});
return editor;
}

View File

@@ -146,9 +146,9 @@ const QString stmCubeProgrammerDetectionPath{HostOsInfo::isWindowsHost()
? QString("bin/STM32_Programmer_CLI.exe")
: QString("bin/STM32_Programmer.sh")};
const char renesasProgrammerSetting[]{"RenesasFlashProgrammer"};
const char renesasProgrammerSetting[]{"FlashProgrammerPath"};
const char renesasProgrammerCmakeVar[]{"RENESAS_FLASH_PROGRAMMER_PATH"};
const QString renesasProgrammerEnvVar{renesasProgrammerCmakeVar};
const QString renesasProgrammerEnvVar{"RenesasFlashProgrammer_PATH"};
const char renesasProgrammerLabel[]{"Renesas Flash Programmer"};
const QString renesasProgrammerDetectionPath{HostOsInfo::withExecutableSuffix("rfp-cli")};
@@ -1106,7 +1106,7 @@ void McuSupportTest::test_legacy_createBoardSdk_data()
<< iar_mimxrt1064_evk_freertos_json << boardSdkCmakeVar << "EVK_MIMXRT1064_SDK_PATH"
<< QStringList{boardSdkVersion};
QTest::newRow("ghs_rh850_d1m1a_baremetal_json")
<< ghs_rh850_d1m1a_baremetal_json << boardSdkCmakeVar << "RGL_DIR" << QStringList{"2.0.0a"};
<< ghs_rh850_d1m1a_baremetal_json << boardSdkCmakeVar << "RGL_DIR" << QStringList{"2.0.0", "2.0.0a"};
}
void McuSupportTest::test_legacy_createBoardSdk()

View File

@@ -8312,11 +8312,14 @@ QAction * TextEditorWidget::insertExtraToolBarWidget(TextEditorWidget::Side side
d->m_stretchAction->setVisible(false);
if (side == Left) {
auto findLeftMostAction = [this](QAction *action) {
if (d->m_toolbarOutlineAction && action == d->m_toolbarOutlineAction)
return false;
return d->m_toolBar->widgetForAction(action) != nullptr;
};
QAction *before = Utils::findOr(d->m_toolBar->actions(),
d->m_fileEncodingLabelAction,
[this](QAction *action) {
return d->m_toolBar->widgetForAction(action) != nullptr;
});
findLeftMostAction);
return d->m_toolBar->insertWidget(before, widget);
} else {
return d->m_toolBar->insertWidget(d->m_fileEncodingLabelAction, widget);
@@ -8339,7 +8342,7 @@ void TextEditorWidget::setToolbarOutline(QWidget *widget)
if (widget->sizePolicy().horizontalPolicy() & QSizePolicy::ExpandFlag)
d->m_stretchAction->setVisible(false);
d->m_toolbarOutlineAction = d->m_toolBar->insertWidget(d->m_stretchAction, widget);
d->m_toolbarOutlineAction = insertExtraToolBarWidget(Left, widget);
} else {
// check for a widget with an expanding size policy otherwise re-enable the stretcher
for (auto action : d->m_toolBar->actions()) {

View File

@@ -56,17 +56,23 @@ def checkLastBuild(expectedToFail=False, createTasksFileOnError=True):
return not gotErrors
# helper function to check the compilation when build wasn't successful
def checkCompile():
def checkCompile(expectToFail=False):
ensureChecked(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton")
output = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
waitFor("len(str(output.plainText))>0",5000)
if compileSucceeded(output.plainText):
if os.getenv("SYSTEST_DEBUG") == "1":
test.log("Compile Output:\n%s" % str(output.plainText))
test.passes("Compile successful")
if expectToFail:
test.fail("Compile successful - but was expected to fail.")
else:
test.passes("Compile successful")
return True
else:
test.fail("Compile Output:\n%s" % output.plainText)
if expectToFail:
test.passes("Expected fail - Compile output:\n%s" % str(output.plainText))
else:
test.fail("Compile Output:\n%s" % str(output.plainText))
return False
def compileSucceeded(compileOutput):
@@ -220,28 +226,32 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
switchViewTo(ViewConstants.EDIT)
# verify if building and running of project was successful
def verifyBuildAndRun():
def verifyBuildAndRun(expectCompileToFail=False):
# check compile output if build successful
checkCompile()
checkCompile(expectCompileToFail)
# check application output log
appOutput = logApplicationOutput()
if appOutput:
test.verify((re.search(".* exited with code \d+", str(appOutput)) or
re.search(".* crashed\.", str(appOutput))) and
re.search(".* crashed\.", str(appOutput)) or
re.search(".* was ended forcefully\.", str(appOutput))) and
re.search('[Ss]tarting.*', str(appOutput)),
"Verifying if built app started and closed successfully.")
# run project for debug and release
def runVerify():
def runVerify(expectCompileToFailFor=None):
availableConfigs = iterateBuildConfigs()
if not availableConfigs:
test.fatal("Haven't found build configurations, quitting")
saveAndExit()
for kit, config in availableConfigs:
selectBuildConfig(kit, config)
expectCompileToFail = False
if expectCompileToFailFor is not None and kit in expectCompileToFailFor:
expectCompileToFail = True
test.log("Using build config '%s'" % config)
if runAndCloseApp() == None:
checkCompile()
if runAndCloseApp(expectCompileToFail) == None:
checkCompile(expectCompileToFail)
continue
verifyBuildAndRun()
verifyBuildAndRun(expectCompileToFail)
mouseClick(waitForObject(":*Qt Creator.Clear_QToolButton"))

View File

@@ -248,7 +248,7 @@ def verifyBreakPoint(bpToVerify):
windowTitle = str(waitForObject(":Qt Creator_Core::Internal::MainWindow").windowTitle)
test.verify(windowTitle.startswith(os.path.basename(fileName) + " "),
"Verify that Creator's window title changed according to current file")
return test.compare(line, bpToVerify.values()[0],
return test.compare(line, list(bpToVerify.values())[0],
"Compare hit breakpoint to expected line number in %s" % fileName)
else:
test.fatal("Expected a dict for bpToVerify - got '%s'" % className(bpToVerify))

View File

@@ -157,7 +157,7 @@ def __handleTextTips__(textTip, expectedVals, alternativeVals):
props = object.properties(textTip)
expFail = False
eResult = verifyProperties(props, expectedVals)
for val in eResult.itervalues():
for val in eResult.values():
if not val:
expFail = True
break

View File

@@ -454,13 +454,15 @@ def waitForProcessRunning(running=True):
# run and close an application
# returns None if the build failed, False if the subprocess did not start, and True otherwise
def runAndCloseApp():
def runAndCloseApp(expectCompileToFail=False):
runButton = waitForObject(":*Qt Creator.Run_Core::Internal::FancyToolButton")
clickButton(runButton)
waitForCompile(300000)
buildSucceeded = checkLastBuild()
buildSucceeded = checkLastBuild(expectCompileToFail)
ensureChecked(waitForObject(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton"))
if not buildSucceeded:
if expectCompileToFail:
return None
test.fatal("Build inside run wasn't successful - leaving test")
return None
if not waitForProcessRunning():

View File

@@ -11,6 +11,9 @@ def main():
return
createProject_Qt_GUI(tempDir(), "SampleApp", buildSystem="qmake")
# run project for debug and release and verify results
runVerify()
expectToFail = None
if platform.system() in ('Microsoft', 'Windows'):
expectToFail = [Targets.DESKTOP_5_4_1_GCC]
runVerify(expectToFail)
#close Qt Creator
invokeMenuItem("File", "Exit")

View File

@@ -13,9 +13,23 @@ def main():
availableConfigs = iterateBuildConfigs()
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
expectConfigureToFail = []
expectBuildToFail = []
if platform.system() in ('Microsoft', 'Windows'):
expectConfigureToFail = [ Targets.DESKTOP_5_4_1_GCC ] # gcc 4.9 does not know C++17
# Qt5.10 does not default enable C++17
expectBuildToFail = [ Targets.DESKTOP_5_10_1_DEFAULT ]
for kit, config in availableConfigs:
selectBuildConfig(kit, config)
test.log("Testing build configuration: " + config)
if runAndCloseApp() == None:
checkCompile()
if kit in expectConfigureToFail:
test.log("Not performing build test. Kit '%s' not supported."
% Targets.getStringForTarget(kit))
continue
buildFailExpected = kit in expectBuildToFail
if runAndCloseApp(buildFailExpected) == None:
checkCompile(buildFailExpected)
invokeMenuItem("File", "Exit")

View File

@@ -105,8 +105,15 @@ def __compFunc__(it, foundComp, foundCompNames):
pathLineEdit = findObject(":Path.Utils_BaseValidatingLineEdit")
foundComp.append(str(pathLineEdit.text))
except:
varsBatCombo = waitForObjectExists("{name='varsBatCombo' type='QComboBox' visible='1'}")
foundComp.append({it:str(varsBatCombo.currentText)})
varsBatComboStr = "{name='varsBatCombo' type='QComboBox' visible='1'}"
varsBatCombo = waitForObjectExists(varsBatComboStr)
parameterComboStr = "{type='QComboBox' visible='1' unnamed='1' leftWidget=%s}" % varsBatComboStr
try:
parameterCombo = findObject(parameterComboStr)
parameter = ' ' + str(parameterCombo.currentText)
except:
parameter = ''
foundComp.append({it:str(varsBatCombo.currentText) + parameter})
foundCompNames.append(it)
@@ -156,6 +163,21 @@ def __kitFunc__(it, foundQt, foundCompNames):
details = details.replace("<b>", "").replace("</b>", "")
test.warning("Detected error and/or warning: %s" % details)
def __LLVMInRegistry__():
# following only works on Win64 (Win32 has different registry keys)
try:
output = subprocess.check_output(['reg', 'query',
r'HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\LLVM\LLVM'],
shell=True)
for line in output.splitlines():
if '(Default)' in line:
path = line.split(' REG_SZ ')[1].strip()
if os.path.exists(os.path.join(path, 'bin', 'clang-cl.exe')):
return True
except subprocess.CalledProcessError:
pass
return False
def __getExpectedCompilers__():
# TODO: enhance this to distinguish between C and C++ compilers
expected = []
@@ -173,6 +195,11 @@ def __getExpectedCompilers__():
if xcodeClang and os.path.exists(xcodeClang) and xcodeClang not in expected:
expected.append(xcodeClang)
if platform.system() in ('Microsoft', 'Windows'):
clangClInPath = len(findAllFilesInPATH('clang-cl.exe'))
if clangClInPath > 0 or __LLVMInRegistry__():
expected.append({'^LLVM \d{2} bit based on MSVC\d{4}$' : ''})
for compiler in compilers:
compilerPath = which(compiler)
if compilerPath:
@@ -195,19 +222,23 @@ def __getWinCompilers__():
parameters = testData.field(record, "displayedParameters").split(",")
usedParameters = testData.field(record, "usedParameters").split(",")
idePath = testData.field(record, "IDEPath")
displayName = testData.field(record, 'displayName')
if len(idePath):
if not os.path.exists(os.path.abspath(os.path.join(envvar, idePath))):
continue
if testData.field(record, "isSDK") == "true":
for para, used in zip(parameters, usedParameters):
result.append(
{"%s \(.*?\) \(%s\)" % (testData.field(record, 'displayName'),
para)
:"%s %s" % (compiler, used)})
{"%s \(.*?\) \(%s\)" % (displayName, para)
: "%s %s" % (compiler, used)})
else:
for para, used in zip(parameters, usedParameters):
result.append({"%s (%s)" % (testData.field(record, 'displayName'), para)
:"%s %s" % (compiler, used)})
if "[.0-9]+" in displayName:
result.append({"%s \(%s\)" % (displayName, para)
: "%s %s" % (compiler, used)})
else:
result.append({"%s (%s)" % (displayName, para)
: "%s %s" % (compiler, used)})
return result
def __getExpectedDebuggers__():
@@ -263,8 +294,10 @@ def __compareCompilers__(foundCompilers, expectedCompilers):
key = list(currentExp.keys())[0]
# the regex .*? is used for the different possible version strings of the WinSDK
# if it's present a regex will be validated otherwise simple string comparison
if (((".*?" in key and re.match(key, list(currentFound.keys())[0], flags))
or currentFound.keys() == currentExp.keys())):
# same applies for [.0-9]+ which is used for minor/patch versions
isRegex = ".*?" in key or "[.0-9]+" in key
if (((isRegex and re.match(key, list(currentFound.keys())[0], flags)))
or currentFound.keys() == currentExp.keys()):
if ((isWin and os.path.abspath(currentFound.values()[0].lower())
== os.path.abspath(currentExp.values()[0].lower()))
or currentFound.values() == currentExp.values()):

View File

@@ -23,6 +23,9 @@
"VS120COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C++ Compiler 12.0" "x86,amd64,x86_amd64,ia64,x86_ia64" "x86,amd64,x86_amd64,ia64,x86_ia64" "false" ""
"VS140COMNTOOLS" "..\..\VC\Bin" "vcvars32.bat" "Microsoft Visual C++ Compiler 14.0" "x86" "" "false" "..\IDE\devenv.exe"
"VS140COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C++ Compiler 14.0" "x86,amd64,x86_amd64,x86_arm,amd64_arm,amd64_x86" "x86,amd64,x86_amd64,x86_arm,amd64_arm,amd64_x86" "false" "..\IDE\devenv.exe"
"VS140COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C\+\+ Compiler 14[.0-9]+" "x86,amd64,x86_amd64,x86_arm,amd64_arm,amd64_x86" "x86,amd64,x86_amd64,x86_arm,amd64_arm,amd64_x86" "false" ""
"ProgramFiles" "Microsoft Visual C++ Build Tools" "vcbuildtools.bat" "Microsoft Visual C++ Build Tools" "x86,x64,x86_arm,x64_arm" "x86,amd64,x86_arm,amd64_arm" "false" ""
"ProgramFiles(x86)" "Microsoft Visual C++ Build Tools" "vcbuildtools.bat" "Microsoft Visual C++ Build Tools" "x86,x64,x86_arm,x64_arm" "x86,amd64,x86_arm,amd64_arm" "false" ""
"ProgramFiles(x86)" "Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build" "vcvarsall.bat" "Microsoft Visual C++ Compiler 15.0" "x86,amd64_x86,amd64,x86_amd64" "x86,amd64_x86,amd64,x86_amd64" "false" ""
"ProgramFiles(x86)" "Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build" "vcvarsall.bat" "Microsoft Visual C\+\+ Compiler 15[.0-9]+" "x86,amd64_x86,amd64,x86_amd64" "x86,amd64_x86,amd64,x86_amd64" "false" ""
"ProgramFiles(x86)" "Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build" "vcvarsall.bat" "Microsoft Visual C\+\+ Compiler 16[.0-9]+" "x86,amd64_x86,amd64,x86_amd64" "x86,amd64_x86,amd64,x86_amd64" "false" ""
"ProgramFiles" "Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build" "vcvarsall.bat" "Microsoft Visual C\+\+ Compiler 17[.0-9]+" "x86,amd64_x86,amd64,x86_amd64" "x86,amd64_x86,amd64,x86_amd64" "false" ""
Can't render this file because it contains an unexpected character in line 26 and column 195.

View File

@@ -58,7 +58,7 @@ def checkOrUncheckMyTasks():
"My Tasks"))
def getBuildIssuesTypeCounts(model):
issueTypes = map(lambda x: x.data(Qt.UserRole + 5).toInt(), dumpIndices(model))
issueTypes = list(map(lambda x: x.data(Qt.UserRole + 5).toInt(), dumpIndices(model)))
result = [issueTypes.count(0), issueTypes.count(1), issueTypes.count(2)]
if len(issueTypes) != sum(result):
test.fatal("Found unexpected value(s) for TaskType...")