Merge remote-tracking branch 'origin/14.0'

Conflicts:
	src/plugins/android/androidmanager.cpp
	src/plugins/android/androidrunner.cpp
	src/plugins/android/androidrunner.h
	src/plugins/qmldesigner/components/texteditor/texteditorview.cpp
	src/plugins/qmldesigner/components/texteditor/texteditorview.h
	src/plugins/qmldesigner/designmodecontext.cpp
	src/plugins/qmldesigner/designmodecontext.h
	src/plugins/qmljseditor/qmljseditingsettingspage.cpp

Change-Id: Idada49bb7441e8c5b748bd75b2e6bb2351bd323e
This commit is contained in:
Eike Ziller
2024-07-25 12:56:53 +02:00
49 changed files with 2465 additions and 1395 deletions

View File

@@ -17,6 +17,8 @@ General
([Documentation](https://doc-snapshots.qt.io/qtcreator-extending/lua-extensions.html))
* Added a mode for managing extensions
* Added `Clear` and `Save Contents` to context menus of all output views
* Fixed the tab focus order in the search toolbar
([QTCREATORBUG-30791](https://bugreports.qt.io/browse/QTCREATORBUG-30791))
* Locator
* Added the option to show results relative to project root
([QTCREATORBUG-29462](https://bugreports.qt.io/browse/QTCREATORBUG-29462))
@@ -46,6 +48,14 @@ Editing
([QTCREATORBUG-31116](https://bugreports.qt.io/browse/QTCREATORBUG-31116))
* Fixed the unindenting with backspace when multiple cursors are active
([QTCREATORBUG-31158](https://bugreports.qt.io/browse/QTCREATORBUG-31158))
* Fixed the `Save` shortcut after closing a document while the document's
drop-down menu is shown
([QTCREATORBUG-31205](https://bugreports.qt.io/browse/QTCREATORBUG-31205))
* Fixed the highlighting of matches for `Whole Words Only` searches
([QTCREATORBUG-31020](https://bugreports.qt.io/browse/QTCREATORBUG-31020))
* Fixed that the documents chooser did not close when releasing `Ctrl` in
some setups
([QTCREATORBUG-31228](https://bugreports.qt.io/browse/QTCREATORBUG-31228))
### C++
@@ -79,6 +89,9 @@ Editing
([QTCREATORBUG-29943](https://bugreports.qt.io/browse/QTCREATORBUG-29943))
* Fixed the handling of system headers
([QTCREATORBUG-30474](https://bugreports.qt.io/browse/QTCREATORBUG-30474))
* Fixed a warning when adding an empty session to the list of sessions with
a single Clangd instance
([QTCREATORBUG-31186](https://bugreports.qt.io/browse/QTCREATORBUG-31186))
* Built-in
* Added the `Enable indexing` option in `Preferences` > `C++` > `Code Model`
to turn off the built-in indexer
@@ -101,6 +114,8 @@ Editing
([Documentation](https://doc.qt.io/qtcreator/creator-quick-ui-forms.html))
* Fixed that the color preview did not work on named colors
([QTCREATORBUG-30594](https://bugreports.qt.io/browse/QTCREATORBUG-30594))
* Fixed the default path to `qmlformat` on Windows
([QTCREATORBUG-31257](https://bugreports.qt.io/browse/QTCREATORBUG-31257))
* Language Server
* Switched on by default for Qt 6.8 and later
* Added an option for generating `qmlls.ini` files for CMake projects in
@@ -206,6 +221,8 @@ Projects
([QTCREATORBUG-30836](https://bugreports.qt.io/browse/QTCREATORBUG-30836))
* Added support for custom build types
([QTCREATORBUG-30014](https://bugreports.qt.io/browse/QTCREATORBUG-30014))
* Fixed issues with cross-compilation setups
([QTCREATORBUG-31249](https://bugreports.qt.io/browse/QTCREATORBUG-31249))
([Documentation](https://doc-snapshots.qt.io/qtcreator-14.0/creator-build-settings-cmake-presets.html))
@@ -317,6 +334,9 @@ Platforms
* Improved the performance of the generic deployment method
* Fixed that the file size check that is performed before parsing C++ files
could freeze Qt Creator until finished for remote projects
* Fixed that the deployment of a directory deployed only its contents instead
of the directory itself
([QTCREATORBUG-31136](https://bugreports.qt.io/browse/QTCREATORBUG-31136))
### Qt Application Manager
@@ -333,8 +353,9 @@ Ahmad Samir
Aleksei German
Alessandro Portale
Alexander Drozdov
Alexandre Laurent
Ali Kianian
Andre Hartmann
André Hartmann
André Pönitz
Artem Sokolovskii
Assam Boudjelthia
@@ -364,6 +385,7 @@ Mats Honkamaa
Michael Weghorn
Miikka Heikkinen
Orgad Shaneh
Pino Toscano
Pranta Dastider
Ralf Habacker
Robert Löhning

View File

@@ -38,6 +38,7 @@
<li><a href="creator-qml-debugging-example.html">Qt Quick debugging</a></li>
<li><a href="creator-tutorial-python-application-qt-widgets.html">Qt Widgets and Python</a></li>
<li><a href="creator-writing-program.html">Qt Widgets application</a></li>
<li><a href="creator-tutorial-python-application-qt-widgets-ui.html">Qt Widgets UI and Python</a></li>
<li><a href="creator-tutorial-adding-internal-libraries-to-projects.html">Use internal libraries with qmake</a></li>
<li><a href="creator-tutorials.html">Tutorials</a></li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -60,32 +60,32 @@
The \uicontrol Timeline view displays a graphical representation of trace
events and a condensed view of all recorded events.
\image qtcreator-ctf-visualizer-timeline.png "Chrome Trace Format Visualizer"
\image qtcreator-ctf-visualizer-timeline.webp {Timeline view}
Each category in the timeline describes a thread in the application. Move
the cursor on an event (1) on a row to view its duration and event category.
the cursor on an event (5) on a row to view its duration and event category.
To display the information only when an event is selected, disable the
\uicontrol {View Event Information on Mouseover} button (2).
\uicontrol {View Event Information on Mouseover} button (4).
The outline (3) summarizes the period for which data was collected. Drag
the zoom range (4) or click the outline to move on the outline. To move
The outline (10) summarizes the period for which data was collected. Drag
the zoom range (8) or click the outline to move on the outline. To move
between events, select the \uicontrol {Jump to Previous Event} and
\uicontrol {Jump to Next Event} buttons (5).
\uicontrol {Jump to Next Event} buttons (1).
Select the \uicontrol {Show Zoom Slider} button (6) to open a slider that
you can use to set the zoom level. You can also drag the zoom handles (7).
Select the \uicontrol {Show Zoom Slider} button (2) to open a slider that
you can use to set the zoom level. You can also drag the zoom handles (9).
To reset the default zoom level, right-click the timeline to open the
context menu, and select \uicontrol {Reset Zoom}.
Select the \inlineimage icons/filtericon.png
(\uicontrol {Restrict to Threads}) button (10) to select the threads to
(\uicontrol {Restrict to Threads}) button (6) to select the threads to
show.
\section2 Selecting Event Ranges
You can select an event range (8) to view the time it represents or to zoom
You can select an event range (7) to view the time it represents or to zoom
into a specific region of the trace. Select the \uicontrol {Select Range}
button (9) to activate the selection tool. Then click in the timeline to
button (3) to activate the selection tool. Then click in the timeline to
specify the beginning of the event range. Drag the selection handle to
define the end of the range.

View File

@@ -39,10 +39,16 @@
\uicontrol Help mode, go to \preferences > \uicontrol Help.
\endlist
\if defined(qtdesignstudio)
The following image shows the context sensitive help in the \l Code view.
\image qds-help-in-code-view.webp {Context-sensitive help in the Code view.}
\else
The following image shows the context sensitive help in the \uicontrol Edit
mode.
\image qtcreator-context-sensitive-help.webp {Context-sensitive help in Edit mode}
\endif
\section1 Change the font
@@ -88,7 +94,13 @@
To use a keyboard shortcut for viewing help tooltips, select
\uicontrol {Show help tooltips using keyboard shortcut (Alt)}.
\if defined(qtdesignstudio)
\section1 See Also
\generatelist creator-how-to-get-help
\else
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/
/*!
@@ -140,7 +152,9 @@
\endlist
\if defined(qtcreator)
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/
/*!
@@ -180,7 +194,9 @@
\uicontrol General and select \uicontrol {Import Bookmarks} or
\uicontrol {Export Bookmarks}.
\if defined(qtcreator)
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/
/*!
@@ -236,7 +252,9 @@
punctuation, such as domain names, use the asterisk as a wild card. For
example, to find \c {Pastebin.Com}, enter the search term \c {Pastebin*}.
\if defined(qtcreator)
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/
/*!
@@ -268,7 +286,9 @@
\endlist
\if defined(qtcreator)
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/
/*!
@@ -287,7 +307,11 @@
code editor when you press \key F1. If there is not enough vertical
space, the help opens in the full-screen help mode.
\if defined(qtdesignstudio)
\image qds-help-in-code-view.webp {Context-sensitive help in the Code view.}
\else
\image qtcreator-context-sensitive-help.webp {Context-sensitive help in Edit mode}
\endif
To specify that the help always opens in full-screen mode or in an external
window, go to \preferences > \uicontrol Help > \uicontrol General.
@@ -300,7 +324,9 @@
To change this setting in a help view, select \inlineimage icons/linkicon.png.
\if defined(qtcreator)
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/
/*!
@@ -335,7 +361,9 @@
home page.
\endlist
\if defined(qtcreator)
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/
/*!
@@ -401,5 +429,7 @@
To remove the selected filter, select \inlineimage icons/minus.png.
\if defined(qtcreator)
\sa {Read Documentation}{How To: Read Documentation}
\endif
*/

View File

@@ -6,6 +6,7 @@
\previouspage creator-how-tos.html
\ingroup creator-how-to-projects-create
\ingroup creator-how-to-projects-files
\title Add wizards

View File

@@ -52,13 +52,13 @@
translations in the .json file using the following syntax:
\code
"trDisplayName": { "C": "default", "en_US": "english", "de_DE": "deutsch" }
"trDisplayName": { "C": "default", "en": "english", "de": "deutsch" }
\endcode
For example:
\code
"trDisplayName": { "C": "Project Location", "en_US": "Project Location", "de_DE": "Projekt Verzeichnis" }
"trDisplayName": { "C": "Project Location", "en": "Project Location", "de": "Projektverzeichnis" }
\endcode
\section1 Creating Wizards

View File

@@ -102,9 +102,14 @@
\li \uicontrol Name
\li Name of the kit. You can use variables to generate the kit name
based on the values you set in the other fields.
\row
\li \inlineimage icons/qtcreator-desktopdevice-button.png
\li Image to use as an icon for the kit.
Click the \inlineimage icons/qtcreator-desktopdevice-button.png icon next to the field,
and select the image that is displayed in the kit selector for this kit.
Select \uicontrol Browse to select an
image in a supported file format (for example, PNG). The image is
scaled to the size 64x64 pixels. For example, using the compiler
logo as an icon allows you to easily see, which compiler is used to
build the project for the selected kit.
\row
\li \uicontrol {File system name}
\li Name for the kit to use as a part of directory names. This value is
@@ -113,13 +118,6 @@
\row
\li \uicontrol{Run device type}
\li Type of the run device.
Double-click the icon next to the field to select the image that is
displayed in the kit selector for this kit. You can use any
image in a supported file format (for example, PNG). The image is
scaled to the size 64x64 pixels. For example, using the compiler
logo as an icon allows you to easily see, which compiler is used to
build the project for the selected kit.
\row
\li \uicontrol {Run device}
\li The device to run applications on.

View File

@@ -160,7 +160,7 @@
\if defined(qtdesignstudio)
\note In this section, you are using advanced menu items. These are not
visible by default. To toggle the visibility of advanced menu items, see
\l{Customizing the Menu}.
\l{Customizing the Menu Bar}.
\endif
With QML Profiler, you can find causes for typical performance problems

View File

@@ -79,6 +79,7 @@
\previouspage creator-how-tos.html
\ingroup creator-how-to-projects-create
\ingroup creator-how-to-projects-configure
\title Create VCS repositories for new projects

View File

@@ -474,7 +474,7 @@
\li Mode
\li Modes correspond to complete screens of controls, specialized
for a task.
\image qtcreator-mode-selector.png {Mode selector}
\image qtcreator-mode-selector.webp {Mode selector}
\li You can add a mode for a new type of editor, for example.
Use descriptive, but short mode names. They have to fit in the
\uicontrol {Mode selector}.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -3456,7 +3456,7 @@ The foreground component should be transparent, and the background component sho
<name>FontSection</name>
<message>
<source>Font</source>
<translation>Zeichensatz</translation>
<translation>Schrift</translation>
</message>
<message>
<source>Sets the font of the text.</source>
@@ -7811,7 +7811,7 @@ Please check the output pane for more information.</source>
</message>
<message>
<source>Also warns in the code editor about QML features that are not properly supported by the Qt Quick Designer.</source>
<translation>Zeigt auch im Code-Editor eine Warnung bei QML-Features an, die vom Qt Quick Designer nicht vollständig unterstützt werden.</translation>
<translation>Zeigt auch im Code-Editor eine Warnung bei QML-Funktionen an, die vom Qt Quick Designer nicht vollständig unterstützt werden.</translation>
</message>
<message>
<source>Internationalization</source>
@@ -9554,7 +9554,7 @@ Locked components cannot be modified or selected.</source>
</message>
<message>
<source>Font Files</source>
<translation>Schriftart-Dateien</translation>
<translation>Schriftdateien</translation>
</message>
<message>
<source>Sound Files</source>
@@ -10927,7 +10927,7 @@ Dies kann nicht rückgängig gemacht werden.</translation>
</message>
<message>
<source>The device has to be connected with ADB debugging enabled to use this feature.</source>
<translation>Das Gerät muss mit aktiviertem ADB-Debuggen angeschlossen sein, um diese Funktionalität nutzen zu können.</translation>
<translation>Das Gerät muss mit aktiviertem ADB-Debuggen angeschlossen sein, um diese Funktion nutzen zu können.</translation>
</message>
<message>
<source>Opening connection port %1 failed.</source>
@@ -11088,7 +11088,7 @@ Dies kann nicht rückgängig gemacht werden.</translation>
</message>
<message>
<source>Include default features for Qt modules.</source>
<translation>Standard-Features für Qt-Module einschließen.</translation>
<translation>Standardfunktionen für Qt-Module einschließen.</translation>
</message>
<message>
<source>Add</source>
@@ -13902,11 +13902,11 @@ Wollen Sie &quot;%1&quot; mit der Standardanwendung öffnen?</translation>
</message>
<message>
<source>Remove Server Configuration</source>
<translation>Server-Konfiguration löschen</translation>
<translation>Server-Konfiguration entfernen</translation>
</message>
<message>
<source>Remove the server configuration &quot;%1&quot;?</source>
<translation>Server-Konfiguration &quot;%1&quot; löschen?</translation>
<translation>Server-Konfiguration &quot;%1&quot; entfernen?</translation>
</message>
<message>
<source>Add Dashboard Configuration</source>
@@ -16965,7 +16965,7 @@ Stellen Sie sicher, dass der Wert der CMAKE_BUILD_TYPE-Variable derselbe wie der
</message>
<message>
<source>With clangd enabled, Qt Creator fully supports modern C++ when highlighting code, completing symbols and so on.&lt;br&gt;This comes at a higher cost in terms of CPU load and memory usage compared to the built-in code model, which therefore might be the better choice on older machines and/or with legacy code.&lt;br&gt;You can enable/disable and fine-tune clangd &lt;a href=&quot;dummy&quot;&gt;here&lt;/a&gt;.</source>
<translation>Wenn Clangd aktiviert ist, unterstützt Qt Creator semantische Hervorhebung, Symbolvervollständigung und so weiter für Code, der modernes C++ nutzt.&lt;br/&gt;Das wirkt sich nachteilig auf CPU-Last und Speicherverbrauch im Vergleich zum eingebauten Codemodell aus, das deshalb eine bessere Wahl für ältere Maschinen und/oder für Legacy Code sein kann.&lt;br/&gt;Sie können Clangd &lt;a href=&quot;dummy&quot;&gt;hier&lt;/a&gt; aktivieren/deaktivieren und anpassen.</translation>
<translation>Wenn Clangd aktiviert ist, unterstützt Qt Creator semantische Hervorhebung, Symbolvervollständigung und so weiter für Code, der modernes C++ nutzt.&lt;br/&gt;Das wirkt sich nachteilig auf CPU-Last und Speicherverbrauch im Vergleich zum integrierten Codemodell aus, das deshalb eine bessere Wahl für ältere Maschinen und/oder für Legacy Code sein kann.&lt;br/&gt;Sie können Clangd &lt;a href=&quot;dummy&quot;&gt;hier&lt;/a&gt; aktivieren/deaktivieren und anpassen.</translation>
</message>
<message>
<source>Enable Anyway</source>
@@ -19953,7 +19953,7 @@ konnte nicht unter Versionsverwaltung (%2) gestellt werden
</message>
<message>
<source>Remove tool.</source>
<translation>Werkzeug löschen.</translation>
<translation>Werkzeug entfernen.</translation>
</message>
<message>
<source>Revert tool to default.</source>
@@ -25762,7 +25762,7 @@ markers in the source code editor.</source>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enables stepping backwards.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This feature is very slow and unstable on the GDB side. It exhibits unpredictable behavior when going backwards over system calls and is very likely to destroy your debugging session.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Rückwärts-Debuggen aktivieren.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Hinweis:&lt;/b&gt; Diese Funktionalität ist sehr langsam und instabil innerhalb von GDB. Es kann unvorhergesehenes Verhalten auftreten, wenn man rückwärts über einen Systemaufruf springt, und die Debugger-Sitzung kann leicht zerstört werden.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Rückwärts-Debuggen aktivieren.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Hinweis:&lt;/b&gt; Diese Funktion ist sehr langsam und instabil innerhalb von GDB. Es kann unvorhergesehenes Verhalten auftreten, wenn man rückwärts über einen Systemaufruf springt, und die Debugger-Sitzung kann leicht zerstört werden.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Debug all child processes</source>
@@ -27297,7 +27297,7 @@ Soll es erneut versucht werden?</translation>
</message>
<message>
<source>Remove</source>
<translation>Löschen</translation>
<translation>Entfernen</translation>
</message>
<message>
<source>Source Paths Mapping</source>
@@ -28143,7 +28143,7 @@ Bitte wählen Sie einen 64-bit-Debugger in den Kit-Einstellungen für dieses Kit
</message>
<message>
<source>This feature is very slow and unstable on the GDB side. It exhibits unpredictable behavior when going backwards over system calls and is very likely to destroy your debugging session.</source>
<translation>Diese Funktionalität ist sehr langsam und instabil innerhalb von GDB. Es kann unvorhergesehenes Verhalten auftreten, wenn man rückwärts über einen Systemaufruf springt, und die Debugger-Sitzung kann leicht unbenutzbar werden.</translation>
<translation>Diese Funktion ist sehr langsam und instabil innerhalb von GDB. Es kann unvorhergesehenes Verhalten auftreten, wenn man rückwärts über einen Systemaufruf springt, und die Debugger-Sitzung kann leicht unbenutzbar werden.</translation>
</message>
<message>
<source>Reverse Direction</source>
@@ -28685,11 +28685,11 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl
</message>
<message>
<source>Remove All Breakpoints</source>
<translation>Alle Haltepunkte löschen</translation>
<translation>Alle Haltepunkte entfernen</translation>
</message>
<message>
<source>Are you sure you want to remove all breakpoints from all files in the current session?</source>
<translation>Möchten Sie wirklich alle Haltepunkte aus allen Dateien der aktuellen Sitzung löschen?</translation>
<translation>Möchten Sie wirklich alle Haltepunkte aus allen Dateien der aktuellen Sitzung entfernen?</translation>
</message>
<message>
<source>Perspective</source>
@@ -30636,7 +30636,7 @@ zu deaktivieren, deaktiviert auch die folgenden Plugins:
</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>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>
<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 Funktion 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>
@@ -34062,11 +34062,11 @@ Hinweis: Dies macht Sie anfällig für Man-in-the-middle-Angriffe.</translation>
</message>
<message>
<source>Font</source>
<translation>Zeichensatz</translation>
<translation>Schrift</translation>
</message>
<message>
<source>Family:</source>
<translation>Name:</translation>
<translation>Familie:</translation>
</message>
<message>
<source>Style:</source>
@@ -36111,7 +36111,7 @@ Für gültige Einstellungen schauen Sie in die Dokumentation des verwendeten Lan
</message>
<message>
<source>Remove</source>
<translation>Löschen</translation>
<translation>Entfernen</translation>
</message>
<message>
<source>Macros</source>
@@ -38937,11 +38937,11 @@ Außer: %2
</message>
<message>
<source>Cancel Build &amp;&amp; Remove Build Configuration</source>
<translation>Build abbrechen und Build-Konfiguration löschen</translation>
<translation>Build abbrechen und Build-Konfiguration entfernen</translation>
</message>
<message>
<source>Remove Build Configuration %1?</source>
<translation>Build-Konfiguration %1 löschen?</translation>
<translation>Build-Konfiguration %1 entfernen?</translation>
</message>
<message>
<source>The build configuration &lt;b&gt;%1&lt;/b&gt; is currently being built.</source>
@@ -38949,11 +38949,11 @@ Außer: %2
</message>
<message>
<source>Do you want to cancel the build process and remove the Build Configuration anyway?</source>
<translation>Möchten Sie die Erstellung abbrechen und die Build-Konfiguration trotzdem löschen?</translation>
<translation>Möchten Sie die Build-Konfiguration trotzdem entfernen und die Erstellung abbrechen?</translation>
</message>
<message>
<source>Remove Build Configuration?</source>
<translation>Build-Konfiguration löschen?</translation>
<translation>Build-Konfiguration entfernen?</translation>
</message>
<message>
<source>Do you really want to delete build configuration &lt;b&gt;%1&lt;/b&gt;?</source>
@@ -39207,7 +39207,7 @@ konnte dem Projekt &quot;%2&quot; nicht hinzugefügt werden.</translation>
</message>
<message>
<source>Remove Run Configuration?</source>
<translation>Aktive Ausführungskonfiguration löschen?</translation>
<translation>Aktive Ausführungskonfiguration entfernen?</translation>
</message>
<message>
<source>Do you really want to delete the run configuration &lt;b&gt;%1&lt;/b&gt;?</source>
@@ -39238,7 +39238,7 @@ Title of a the cloned RunConfiguration window, text of the window</extracomment>
</message>
<message>
<source>Remove Run Configurations?</source>
<translation>Ausführungskonfiguration löschen?</translation>
<translation>Ausführungskonfigurationen entfernen?</translation>
</message>
<message>
<source>Do you really want to delete all run configurations?</source>
@@ -39250,11 +39250,11 @@ Title of a the cloned RunConfiguration window, text of the window</extracomment>
</message>
<message>
<source>Cancel Build &amp;&amp; Remove Deploy Configuration</source>
<translation>Build abbrechen und Deployment-Konfiguration löschen</translation>
<translation>Build abbrechen und Deployment-Konfiguration entfernen</translation>
</message>
<message>
<source>Remove Deploy Configuration %1?</source>
<translation>Deployment-Konfiguration %1 löschen?</translation>
<translation>Deployment-Konfiguration %1 entfernen?</translation>
</message>
<message>
<source>The deploy configuration &lt;b&gt;%1&lt;/b&gt; is currently being built.</source>
@@ -39262,11 +39262,11 @@ Title of a the cloned RunConfiguration window, text of the window</extracomment>
</message>
<message>
<source>Do you want to cancel the build process and remove the Deploy Configuration anyway?</source>
<translation>Möchten Sie die Erstellung abbrechen und die Deployment-Konfiguration trotzdem löschen?</translation>
<translation>Möchten Sie die Deployment-Konfiguration trotzdem entfernen und die Erstellung abbrechen?</translation>
</message>
<message>
<source>Remove Deploy Configuration?</source>
<translation>Deployment-Konfiguration löschen?</translation>
<translation>Deployment-Konfiguration entfernen?</translation>
</message>
<message>
<source>Do you really want to delete deploy configuration &lt;b&gt;%1&lt;/b&gt;?</source>
@@ -39924,7 +39924,7 @@ Bitte versuchen Sie es erneut.</translation>
</message>
<message>
<source>Run Configuration Removed</source>
<translation>Ausführungskonfiguration gelöscht</translation>
<translation>Ausführungskonfiguration entfernt</translation>
</message>
<message>
<source>The configuration that was supposed to run is no longer available.</source>
@@ -40374,7 +40374,7 @@ The name of the build configuration created by default for a generic project.</e
</message>
<message>
<source>Remove Item</source>
<translation>Element löschen</translation>
<translation>Element entfernen</translation>
</message>
<message>
<source>Removing Step failed</source>
@@ -41040,7 +41040,7 @@ Aktivieren Sie dies, wenn Sie 32bit-x86-Binärdateien erstellen wollen, ohne ein
</message>
<message>
<source>%1 (%2, %3 %4 at %5)</source>
<translation>%1 (%2, %3 %4 an %5)</translation>
<translation>%1 (%2, %3 %4: %5)</translation>
</message>
<message>
<source>Remove</source>
@@ -43210,7 +43210,7 @@ Sie sollten nicht mehrere Test-Frameworks im selben Projekt mischen.</translatio
</message>
<message>
<source>At least one required feature is not present.</source>
<translation>Mindestens ein benötigtes Feature ist nicht vorhanden.</translation>
<translation>Mindestens eine benötigte Funktion ist nicht vorhanden.</translation>
</message>
<message>
<source>Platform is not supported.</source>
@@ -43218,7 +43218,7 @@ Sie sollten nicht mehrere Test-Frameworks im selben Projekt mischen.</translatio
</message>
<message>
<source>At least one preferred feature is not present.</source>
<translation>Mindestens ein bevorzugtes Feature ist nicht vorhanden.</translation>
<translation>Mindestens eine bevorzugte Funktion ist nicht vorhanden.</translation>
</message>
<message>
<source>Feature list is set and not of type list.</source>
@@ -49027,7 +49027,7 @@ Möchten Sie fortfahren?</translation>
%1?</source>
<translation>Möchten Sie
%1
wirklich löschen?</translation>
wirklich entfernen?</translation>
</message>
<message>
<source>QNX</source>
@@ -50560,7 +50560,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
</message>
<message>
<source>Remove Prefix...</source>
<translation>Präfix löschen...</translation>
<translation>Präfix entfernen...</translation>
</message>
<message>
<source>Remove Missing Files</source>
@@ -50604,11 +50604,11 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
</message>
<message>
<source>Remove Prefix</source>
<translation>Präfix löschen</translation>
<translation>Präfix entfernen</translation>
</message>
<message>
<source>Remove prefix %1 and all its files?</source>
<translation>Präfix %1 und alle zugehörigen Dateien löschen?</translation>
<translation>Präfix %1 und alle zugehörigen Dateien entfernen?</translation>
</message>
<message>
<source>File Removal Failed</source>
@@ -51976,7 +51976,7 @@ Testfall &quot;%2&quot; wird nicht aufgezeichnet.</translation>
</message>
<message>
<source>Remove Shared Folder</source>
<translation>Gemeinsames Verzeichnis löschen</translation>
<translation>Gemeinsames Verzeichnis entfernen</translation>
</message>
<message>
<source>Open Squish Suites...</source>
@@ -52012,7 +52012,7 @@ Testfall &quot;%2&quot; wird nicht aufgezeichnet.</translation>
</message>
<message>
<source>Remove Shared File</source>
<translation>Gemeinsame Datei löschen</translation>
<translation>Gemeinsame Datei entfernen</translation>
</message>
<message>
<source>Cancel</source>
@@ -52020,7 +52020,7 @@ Testfall &quot;%2&quot; wird nicht aufgezeichnet.</translation>
</message>
<message>
<source>Failed to remove &quot;%1&quot;.</source>
<translation>&quot;%1&quot; konnte nicht gelöscht werden.</translation>
<translation>&quot;%1&quot; konnte nicht entfernt werden.</translation>
</message>
<message>
<source>Remove &quot;%1&quot; from the list of shared folders?</source>
@@ -52838,11 +52838,11 @@ Die Datei &quot;%1&quot; konnte nicht geöffnet werden.</translation>
</message>
<message>
<source>Family:</source>
<translation>Name:</translation>
<translation>Familie:</translation>
</message>
<message>
<source>The font family used in the terminal.</source>
<translation>Der Name der Zeichensatz-Familie, die im Terminal verwendet wird.</translation>
<translation>Die Schriftfamilie, die im Terminal verwendet wird.</translation>
</message>
<message>
<source>Size:</source>
@@ -52850,7 +52850,7 @@ Die Datei &quot;%1&quot; konnte nicht geöffnet werden.</translation>
</message>
<message>
<source>The font size used in the terminal (in points).</source>
<translation>Die Größe des Zeichensatzes, der im Terminal verwendet wird (in Punkten).</translation>
<translation>Die Größe der Schrift, die im Terminal verwendet wird (in Punkten).</translation>
</message>
<message>
<source>Allow blinking cursor</source>
@@ -52930,7 +52930,7 @@ Die Datei &quot;%1&quot; konnte nicht geöffnet werden.</translation>
</message>
<message>
<source>Font</source>
<translation>Zeichensatz</translation>
<translation>Schrift</translation>
</message>
<message>
<source>Colors</source>
@@ -53045,11 +53045,11 @@ Die Datei &quot;%1&quot; konnte nicht geöffnet werden.</translation>
</message>
<message>
<source>Remove All Bookmarks</source>
<translation>Alle Lesezeichen löschen</translation>
<translation>Alle Lesezeichen entfernen</translation>
</message>
<message>
<source>Are you sure you want to remove all bookmarks from all files in the current session?</source>
<translation>Möchten Sie wirklich alle Lesezeichen aus allen Dateien der aktuellen Sitzung löschen?</translation>
<translation>Möchten Sie wirklich alle Lesezeichen aus allen Dateien der aktuellen Sitzung entfernen?</translation>
</message>
<message>
<source>&amp;Bookmarks</source>
@@ -53239,7 +53239,7 @@ Die Datei &quot;%1&quot; konnte nicht geöffnet werden.</translation>
</message>
<message>
<source>Font</source>
<translation>Zeichensatz</translation>
<translation>Schrift</translation>
</message>
<message>
<source>Underline</source>
@@ -53273,7 +53273,7 @@ Die Datei &quot;%1&quot; konnte nicht geöffnet werden.</translation>
</message>
<message>
<source>Family:</source>
<translation>Name:</translation>
<translation>Familie:</translation>
</message>
<message>
<source>Size:</source>
@@ -53371,7 +53371,7 @@ Werte kleiner als 100% können überlappende und falsch ausgerichtete Darstellun
</message>
<message>
<source>Font &amp;&amp; Colors</source>
<translation>Zeichensatz &amp;&amp; Farben</translation>
<translation>Schrift &amp;&amp; Farben</translation>
</message>
<message>
<source>Jumps to the given line in the current document.</source>
@@ -53613,7 +53613,7 @@ Werte kleiner als 100% können überlappende und falsch ausgerichtete Darstellun
</message>
<message>
<source>%1 [built-in]</source>
<translation>%1 [eingebaut]</translation>
<translation>%1 [integriert]</translation>
</message>
<message>
<source>%1 [customizable]</source>
@@ -53822,7 +53822,7 @@ Gibt an, wie sich die Rücktaste bezüglich Einrückung verhält.
</message>
<message>
<source>Enable built-in camel case &amp;navigation</source>
<translation>Eingebaute CamelCase-&amp;Navigation aktivieren</translation>
<translation>Integrierte CamelCase-&amp;Navigation aktivieren</translation>
</message>
<message>
<source>On Mouseover</source>
@@ -53990,7 +53990,7 @@ Gibt an, wie sich die Rücktaste bezüglich Einrückung verhält.
</message>
<message>
<source>&lt;i&gt;Set &lt;a href=&quot;font zoom&quot;&gt;font line spacing&lt;/a&gt; to 100% to enable text wrapping option.&lt;/i&gt;</source>
<translation>&lt;i&gt;Setzen Sie den &lt;a href=&quot;font zoom&quot;&gt;Zeilenabstand&lt;/a&gt; des Zeichensatzes auf 100%, um die Einstellung für Textumbruch zu aktivieren.&lt;/i&gt;</translation>
<translation>&lt;i&gt;Setzen Sie den &lt;a href=&quot;font zoom&quot;&gt;Zeilenabstand&lt;/a&gt; der Schrift auf 100%, um die Einstellung für Textumbruch zu aktivieren.&lt;/i&gt;</translation>
</message>
<message>
<source>Tint whole margin area</source>
@@ -55028,7 +55028,7 @@ Drücken Sie zusätzlich die Umschalttaste, wird ein Escape-Zeichen an der aktue
</message>
<message>
<source>Documentation Comments</source>
<translation>Kommentare für Dokumentation</translation>
<translation>Dokumentationskommentare</translation>
</message>
<message>
<source>Automatically creates a Doxygen comment upon pressing enter after a &apos;/**&apos;, &apos;/*!&apos;, &apos;//!&apos; or &apos;///&apos;.</source>
@@ -55582,7 +55582,7 @@ Außer Leerzeichen innerhalb von Kommentaren und Zeichenketten.</translation>
</message>
<message>
<source>Applied to removed characters in differences (in side-by-side diff editor).</source>
<translation>Wird auf gelöschte Zeichen in den Unterschieden angewendet (bei Anzeige mit Gegenüberstellung der Unterschiede).</translation>
<translation>Wird auf entfernte Zeichen in den Unterschieden angewendet (bei Anzeige mit Gegenüberstellung der Unterschiede).</translation>
</message>
<message>
<source>Diff Destination Line</source>
@@ -56766,15 +56766,15 @@ Die Trace-Daten sind verloren.</translation>
</message>
<message>
<source>Refusing to remove the standard directory &quot;%1&quot;.</source>
<translation>Das Standardverzeichnis &quot;%1&quot; kann nicht entfernt werden.</translation>
<translation>Das Standardverzeichnis &quot;%1&quot; kann nicht gelöscht werden.</translation>
</message>
<message>
<source>Refusing to remove root directory.</source>
<translation>Das Wurzelverzeichnis kann nicht entfernt werden.</translation>
<translation>Das Wurzelverzeichnis kann nicht gelöscht werden.</translation>
</message>
<message>
<source>Refusing to remove your home directory.</source>
<translation>Das Benutzerverzeichnis (Home) kann nicht entfernt werden.</translation>
<translation>Das Benutzerverzeichnis (Home) kann nicht gelöscht werden.</translation>
</message>
<message>
<source>Failed to remove directory &quot;%1&quot;.</source>
@@ -57118,7 +57118,7 @@ Die Trace-Daten sind verloren.</translation>
</message>
<message>
<source>Remove File</source>
<translation>Datei entfernen</translation>
<translation>Datei löschen</translation>
</message>
<message>
<source>Remove Folder</source>
@@ -57126,7 +57126,7 @@ Die Trace-Daten sind verloren.</translation>
</message>
<message>
<source>File to remove:</source>
<translation>Zu entfernende Datei:</translation>
<translation>Zu löschende Datei:</translation>
</message>
<message>
<source>Folder to remove:</source>

File diff suppressed because it is too large Load Diff

View File

@@ -304,9 +304,9 @@ bool FilePath::equals(const FilePath &first, const FilePath &second, Qt::CaseSen
}
/*!
* Returns true if the two file paths compare equal case-sensitively.
* Returns \c true if this file path compares equal to \a other case-sensitively.
* This is relevant on semi-case sensitive systems like Windows with NTFS.
* @see QTCREATORBUG-30846
* \sa {https://bugreports.qt.io/browse/QTCREATORBUG-30846}{QTCREATORBUG-30846}
*/
bool FilePath::equalsCaseSensitive(const FilePath &other) const
{

View File

@@ -362,7 +362,7 @@ void Layout::setContentsMargins(int left, int top, int right, int bottom)
}
/*!
Attaches the constructed layout to the provided QWidget \a w.
Attaches the constructed layout to the provided QWidget \a widget.
This operation can only be performed once per LayoutBuilder instance.
*/
@@ -373,7 +373,7 @@ void Layout::attachTo(QWidget *widget)
}
/*!
Adds the layout item \a item as sub items.
Adds the layout item \a item as a sub item.
*/
void Layout::addItem(I item)
{

View File

@@ -274,7 +274,10 @@ QString MacroExpander::expand(const QString &stringWithVariables) const
FilePath MacroExpander::expand(const FilePath &fileNameWithVariables) const
{
// We want single variables to expand to fully qualified strings.
return FilePath::fromUserInput(expand(fileNameWithVariables.toString()));
const QString host = expand(fileNameWithVariables.host().toString());
const QString scheme = expand(fileNameWithVariables.scheme().toString());
const QString path = expand(fileNameWithVariables.path());
return FilePath::fromParts(scheme, host, path);
}
QByteArray MacroExpander::expand(const QByteArray &stringWithVariables) const

View File

@@ -46,22 +46,23 @@ AndroidRunner::AndroidRunner(RunControl *runControl, const QString &intentName)
m_packageName = intent.left(intent.indexOf('/'));
qCDebug(androidRunnerLog) << "Intent name:" << intent << "Package name" << m_packageName;
m_worker.reset(new AndroidRunnerWorker(this, m_packageName));
m_worker = new AndroidRunnerWorker(this, m_packageName);
m_worker->setIntentName(intent);
m_worker->moveToThread(&m_thread);
QObject::connect(&m_thread, &QThread::finished, m_worker, &QObject::deleteLater);
connect(this, &AndroidRunner::asyncStart, m_worker.data(), &AndroidRunnerWorker::asyncStart);
connect(this, &AndroidRunner::asyncStop, m_worker.data(), &AndroidRunnerWorker::asyncStop);
connect(this, &AndroidRunner::asyncStart, m_worker, &AndroidRunnerWorker::asyncStart);
connect(this, &AndroidRunner::asyncStop, m_worker, &AndroidRunnerWorker::asyncStop);
connect(this, &AndroidRunner::androidDeviceInfoChanged,
m_worker.data(), &AndroidRunnerWorker::setAndroidDeviceInfo);
connect(m_worker.data(), &AndroidRunnerWorker::remoteProcessStarted,
m_worker, &AndroidRunnerWorker::setAndroidDeviceInfo);
connect(m_worker, &AndroidRunnerWorker::remoteProcessStarted,
this, &AndroidRunner::handleRemoteProcessStarted);
connect(m_worker.data(), &AndroidRunnerWorker::remoteProcessFinished,
connect(m_worker, &AndroidRunnerWorker::remoteProcessFinished,
this, &AndroidRunner::handleRemoteProcessFinished);
connect(m_worker.data(), &AndroidRunnerWorker::remoteOutput,
this, &AndroidRunner::remoteOutput);
connect(m_worker.data(), &AndroidRunnerWorker::remoteErrorOutput,
connect(m_worker, &AndroidRunnerWorker::remoteOutput, this, &AndroidRunner::remoteOutput);
connect(m_worker, &AndroidRunnerWorker::remoteErrorOutput,
this, &AndroidRunner::remoteErrorOutput);
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,

View File

@@ -51,7 +51,7 @@ private:
QString m_packageName;
QThread m_thread;
QScopedPointer<AndroidRunnerWorker> m_worker;
AndroidRunnerWorker *m_worker = nullptr;
QPointer<ProjectExplorer::Target> m_target;
Utils::Port m_debugServerPort;
QUrl m_qmlServer;

View File

@@ -172,24 +172,26 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunWorker *runner, const QString &packa
m_extraAppParams = runControl->commandLine().arguments();
if (const Store sd = runControl->settingsData(Constants::ANDROID_AM_START_ARGS);
!sd.values().isEmpty()) {
!sd.isEmpty()) {
QTC_CHECK(sd.first().typeId() == QMetaType::QString);
const QString startArgs = sd.first().toString();
m_amStartExtraArgs = ProcessArgs::splitArgs(startArgs, OsTypeOtherUnix);
}
if (const Store sd = runControl->settingsData(Constants::ANDROID_PRESTARTSHELLCMDLIST);
!sd.values().isEmpty()) {
QTC_CHECK(sd.first().typeId() == QMetaType::QString);
const QStringList commands = sd.first().toString().split('\n', Qt::SkipEmptyParts);
!sd.isEmpty()) {
const QVariant &first = sd.first();
QTC_CHECK(first.typeId() == QMetaType::QStringList);
const QStringList commands = first.toStringList();
for (const QString &shellCmd : commands)
m_beforeStartAdbCommands.append(QString("shell %1").arg(shellCmd));
}
if (const Store sd = runControl->settingsData(Constants::ANDROID_POSTFINISHSHELLCMDLIST);
!sd.values().isEmpty()) {
QTC_CHECK(sd.first().typeId() == QMetaType::QString);
const QStringList commands = sd.first().toString().split('\n', Qt::SkipEmptyParts);
!sd.isEmpty()) {
const QVariant &first = sd.first();
QTC_CHECK(first.typeId() == QMetaType::QStringList);
const QStringList commands = first.toStringList();
for (const QString &shellCmd : commands)
m_afterFinishAdbCommands.append(QString("shell %1").arg(shellCmd));
}
@@ -204,6 +206,7 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunWorker *runner, const QString &packa
QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
m_useAppParamsForQmlDebugger = version->qtVersion() >= QVersionNumber(5, 12);
m_pidRunner.setParent(this); // Move m_pidRunner object together with *this into a separate thread.
}
AndroidRunnerWorker::~AndroidRunnerWorker()

View File

@@ -37,3 +37,8 @@ extend_qtc_plugin(ClangFormat
DEFINES
TESTDATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/data"
)
extend_qtc_plugin(ClangFormat
CONDITION TARGET LLVM
DEPENDS LLVM
)

View File

@@ -1168,6 +1168,10 @@ Kit *CMakeProjectImporter::createKit(void *directoryData) const
if (!cmtcd.originalTargetTriple.isEmpty())
toolchain->setExplicitCodeModelTargetTriple(cmtcd.originalTargetTriple);
// Mark CMake presets toolchains as manual
if (!data->cmakePresetDisplayname.isEmpty() && tcd.areTemporary)
toolchain->setDetection(Toolchain::ManualDetection);
ToolchainKitAspect::setToolchain(k, toolchain);
}

View File

@@ -558,12 +558,12 @@ void EditorManagerPrivate::init()
this, &EditorManagerPrivate::closeAllEditorsExceptVisible);
connect(m_openGraphicalShellContextAction, &QAction::triggered, this, [this] {
if (!m_contextMenuEntry || m_contextMenuEntry->filePath().isEmpty())
if (!m_contextMenuDocument || m_contextMenuEntry->filePath().isEmpty())
return;
FileUtils::showInGraphicalShell(ICore::dialogParent(), m_contextMenuEntry->filePath());
});
connect(m_showInFileSystemViewContextAction, &QAction::triggered, this, [this] {
if (!m_contextMenuEntry || m_contextMenuEntry->filePath().isEmpty())
if (!m_contextMenuDocument || m_contextMenuEntry->filePath().isEmpty())
return;
FileUtils::showInFileSystemView(m_contextMenuEntry->filePath());
});
@@ -571,7 +571,7 @@ void EditorManagerPrivate::init()
connect(m_findInDirectoryAction, &QAction::triggered,
this, &EditorManagerPrivate::findInDirectory);
connect(m_filePropertiesAction, &QAction::triggered, this, [this] {
if (!m_contextMenuEntry || m_contextMenuEntry->filePath().isEmpty())
if (!m_contextMenuDocument || m_contextMenuEntry->filePath().isEmpty())
return;
DocumentManager::showFilePropertiesDialog(m_contextMenuEntry->filePath());
});
@@ -2434,14 +2434,14 @@ void EditorManagerPrivate::handleContextChange(const QList<IContext *> &context)
void EditorManagerPrivate::copyFilePathFromContextMenu()
{
if (!d->m_contextMenuEntry)
if (!d->m_contextMenuDocument)
return;
setClipboardAndSelection(d->m_contextMenuEntry->filePath().toUserOutput());
}
void EditorManagerPrivate::copyLocationFromContextMenu()
{
if (!d->m_contextMenuEntry)
if (!d->m_contextMenuDocument)
return;
const QString text = d->m_contextMenuEntry->filePath().toUserOutput()
+ QLatin1Char(':') + m_copyLocationContextAction->data().toString();
@@ -2450,28 +2450,28 @@ void EditorManagerPrivate::copyLocationFromContextMenu()
void EditorManagerPrivate::copyFileNameFromContextMenu()
{
if (!d->m_contextMenuEntry)
if (!d->m_contextMenuDocument)
return;
setClipboardAndSelection(d->m_contextMenuEntry->filePath().fileName());
}
void EditorManagerPrivate::saveDocumentFromContextMenu()
{
IDocument *document = d->m_contextMenuEntry ? d->m_contextMenuEntry->document : nullptr;
IDocument *document = d->m_contextMenuDocument.get();
if (document)
saveDocument(document);
}
void EditorManagerPrivate::saveDocumentAsFromContextMenu()
{
IDocument *document = d->m_contextMenuEntry ? d->m_contextMenuEntry->document : nullptr;
IDocument *document = d->m_contextMenuDocument.get();
if (document)
saveDocumentAs(document);
}
void EditorManagerPrivate::revertToSavedFromContextMenu()
{
IDocument *document = d->m_contextMenuEntry ? d->m_contextMenuEntry->document : nullptr;
IDocument *document = d->m_contextMenuDocument.get();
if (document)
revertToSaved(document);
}
@@ -2481,7 +2481,7 @@ void EditorManagerPrivate::closeEditorFromContextMenu()
if (d->m_contextMenuEditor) {
closeEditorOrDocument(d->m_contextMenuEditor);
} else {
IDocument *document = d->m_contextMenuEntry ? d->m_contextMenuEntry->document : nullptr;
IDocument *document = d->m_contextMenuDocument.get();
if (document)
EditorManager::closeDocuments({document});
}
@@ -2489,7 +2489,7 @@ void EditorManagerPrivate::closeEditorFromContextMenu()
void EditorManagerPrivate::closeOtherDocumentsFromContextMenu()
{
IDocument *document = d->m_contextMenuEntry ? d->m_contextMenuEntry->document : nullptr;
IDocument *document = d->m_contextMenuDocument.get();
EditorManager::closeOtherDocuments(document);
}
@@ -2645,14 +2645,14 @@ void EditorManagerPrivate::autoSuspendDocuments()
void EditorManagerPrivate::openTerminal()
{
if (!d->m_contextMenuEntry || d->m_contextMenuEntry->filePath().isEmpty())
if (!d->m_contextMenuDocument || d->m_contextMenuEntry->filePath().isEmpty())
return;
FileUtils::openTerminal(d->m_contextMenuEntry->filePath().parentDir(), {});
}
void EditorManagerPrivate::findInDirectory()
{
if (!d->m_contextMenuEntry || d->m_contextMenuEntry->filePath().isEmpty())
if (!d->m_contextMenuDocument || d->m_contextMenuEntry->filePath().isEmpty())
return;
const FilePath path = d->m_contextMenuEntry->filePath();
emit m_instance->findOnFileSystemRequest(
@@ -2661,7 +2661,7 @@ void EditorManagerPrivate::findInDirectory()
void EditorManagerPrivate::togglePinned()
{
if (!d->m_contextMenuEntry || d->m_contextMenuEntry->filePath().isEmpty())
if (!d->m_contextMenuDocument || d->m_contextMenuEntry->filePath().isEmpty())
return;
const bool currentlyPinned = d->m_contextMenuEntry->pinned;
@@ -2864,6 +2864,7 @@ void EditorManager::addSaveAndCloseEditorActions(QMenu *contextMenu, DocumentMod
{
QTC_ASSERT(contextMenu, return);
d->m_contextMenuEntry = entry;
d->m_contextMenuDocument = entry ? entry->document : nullptr;
d->m_contextMenuEditor = editor;
const FilePath filePath = entry ? entry->filePath() : FilePath();
@@ -2943,6 +2944,7 @@ void EditorManager::addNativeDirAndOpenWithActions(QMenu *contextMenu, DocumentM
{
QTC_ASSERT(contextMenu, return);
d->m_contextMenuEntry = entry;
d->m_contextMenuDocument = entry ? entry->document : nullptr;
bool enabled = entry && !entry->filePath().isEmpty();
d->m_openGraphicalShellContextAction->setEnabled(enabled);
d->m_showInFileSystemViewContextAction->setEnabled(enabled);

View File

@@ -252,7 +252,8 @@ private:
QAction *m_filePropertiesAction = nullptr;
QAction *m_pinAction = nullptr;
DocumentModel::Entry *m_contextMenuEntry = nullptr;
IEditor *m_contextMenuEditor = nullptr;
QPointer<IDocument> m_contextMenuDocument;
QPointer<IEditor> m_contextMenuEditor;
OpenEditorsWindow *m_windowPopup = nullptr;

View File

@@ -201,6 +201,9 @@ bool OpenEditorsWindow::eventFilter(QObject *obj, QEvent *e)
auto ke = static_cast<QKeyEvent*>(e);
qCDebug(openEditorsLog()) << ke;
if (ke->modifiers() == 0
/* On some platforms, the key event can claim both that Ctrl is released and that
Ctrl is still pressed, see QTCREATORBUG-31228 */
|| (ke->modifiers() == Qt::ControlModifier && ke->key() == Qt::Key_Control)
/*HACK this is to overcome some event inconsistencies between platforms*/
|| (ke->modifiers() == Qt::AltModifier
&& (ke->key() == Qt::Key_Alt || ke->key() == -1))) {

View File

@@ -848,7 +848,7 @@ QList<IContext *> ICore::currentContextObjects()
Returns the widget of the top level IContext of the current context, or \c
nullptr if there is none.
\sa currentContextObject()
\sa currentContextObjects()
*/
QWidget *ICore::currentContextWidget()
{
@@ -2256,7 +2256,7 @@ QList<IContext *> ICore::contextObjects(QWidget *widget)
\sa removeContextObject()
\sa updateAdditionalContexts()
\sa currentContextObject()
\sa currentContextObjects()
\sa {The Action Manager and Commands}
*/
@@ -2275,7 +2275,7 @@ void ICore::addContextObject(IContext *context)
\sa addContextObject()
\sa updateAdditionalContexts()
\sa currentContextObject()
\sa currentContextObjects()
*/
void ICore::removeContextObject(IContext *context)

View File

@@ -293,7 +293,16 @@ void OutputWindow::contextMenuEvent(QContextMenuEvent *event)
menu->addSeparator();
QAction *saveAction = menu->addAction(Tr::tr("Save Contents..."));
connect(saveAction, &QAction::triggered, this, [this] {
QFileDialog::saveFileContent(toPlainText().toUtf8(), d->outputFileNameHint);
const FilePath file = FileUtils::getSaveFilePath(
ICore::dialogParent(), {}, FileUtils::homePath() / d->outputFileNameHint);
if (!file.isEmpty()) {
QString error;
Utils::TextFileFormat format;
format.codec = EditorManager::defaultTextCodec();
format.lineTerminationMode = EditorManager::defaultLineEnding();
if (!format.writeFile(file, toPlainText(), &error))
MessageManager::writeDisrupting(error);
}
});
saveAction->setEnabled(!document()->isEmpty());
QAction *openAction = menu->addAction(Tr::tr("Copy Contents to Scratch Buffer"));

View File

@@ -146,6 +146,7 @@ void DebuggerItem::reinitializeFromFile(QString *error, Utils::Environment *cust
}
Environment env = customEnv ? *customEnv : m_command.deviceEnvironment();
DebuggerItem::addAndroidLldbPythonEnv(m_command, env);
// QNX gdb unconditionally checks whether the QNX_TARGET env variable is
// set and bails otherwise, even when it is not used by the specific

View File

@@ -575,9 +575,11 @@ void DebuggerRunTool::start()
connect(engine, &DebuggerEngine::attachToCoreRequested, this, [this](const QString &coreFile) {
auto rc = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
rc->copyDataFromRunControl(runControl());
rc->resetDataForAttachToCore();
auto name = QString(Tr::tr("%1 - Snapshot %2").arg(runControl()->displayName()).arg(++d->snapshotCounter));
auto debugger = new DebuggerRunTool(rc);
debugger->setStartMode(AttachToCore);
debugger->setCloseMode(DetachAtClose);
debugger->setRunControlName(name);
debugger->setCoreFilePath(FilePath::fromString(coreFile), true);
debugger->startRunControl();

View File

@@ -282,6 +282,8 @@ public:
}
});
connect(ExtensionSystem::PluginManager::instance(),
&ExtensionSystem::PluginManager::pluginsChanged, this, &PluginStatusWidget::update);
connect(m_restartButton, &QAbstractButton::clicked,
ICore::instance(), &ICore::restart, Qt::QueuedConnection);
@@ -429,6 +431,7 @@ ExtensionManagerWidget::ExtensionManagerWidget()
m_linksTitle = sectionTitle(h6CapitalTF, Tr::tr("More information"));
m_links = tfLabel(contentTF, false);
m_links->setOpenExternalLinks(true);
m_links->setTextInteractionFlags(Qt::TextBrowserInteraction);
m_imageTitle = sectionTitle(h6CapitalTF, {});
m_image = new QLabel;
m_imageMovie.setDevice(&m_imageDataBuffer);

View File

@@ -25,4 +25,17 @@ QtcPlugin {
"haskelltokenizer.cpp", "haskelltokenizer.h",
"stackbuildstep.cpp", "stackbuildstep.h"
]
Qt.core.resourceFileBaseName: "HaskellWizards" // avoid conflicting qrc file
Group {
name: "Wizard files"
Qt.core.resourceSourceBase: sourceDirectory
Qt.core.resourcePrefix: "haskell/"
fileTags: "qt.core.resource_data"
prefix: "share/wizards/"
files: [
"module/file.hs",
"module/wizard.json",
]
}
}

View File

@@ -10,6 +10,11 @@ QtcPlugin {
Depends { name: "sol2" }
Depends { name: "TextEditor" }
Properties {
condition: qbs.toolchain.contains("mingw")
cpp.optimization: "fast"
}
files: [
// "generateqtbindings.cpp", // use this if you need to generate some code
"lua_global.h",

View File

@@ -85,7 +85,7 @@ static QString translatedOrUntranslatedText(QVariantMap &map, const QString &key
{
if (key.size() >= 1) {
const QString trKey = "tr" + key.at(0).toUpper() + key.mid(1); // "text" -> "trText"
const QString trValue = JsonWizardFactory::localizedString(consumeValue(map, trKey).toString());
const QString trValue = JsonWizardFactory::localizedString(consumeValue(map, trKey));
if (!trValue.isEmpty())
return trValue;
}
@@ -188,9 +188,10 @@ JsonFieldPage::Field *JsonFieldPage::Field::parse(const QVariant &input, QString
*errorMessage = Tr::tr("Field \"%1\" has unsupported type \"%2\".").arg(name).arg(type);
return nullptr;
}
data->setTexts(name,
JsonWizardFactory::localizedString(consumeValue(tmp, DISPLAY_NAME_KEY).toString()),
JsonWizardFactory::localizedString(consumeValue(tmp, TOOLTIP_KEY).toString()));
data->setTexts(
name,
JsonWizardFactory::localizedString(consumeValue(tmp, DISPLAY_NAME_KEY)),
JsonWizardFactory::localizedString(consumeValue(tmp, TOOLTIP_KEY)));
data->setVisibleExpression(consumeValue(tmp, VISIBLE_KEY, true));
data->setEnabledExpression(consumeValue(tmp, ENABLED_KEY, true));
@@ -837,6 +838,7 @@ void PathChooserField::setup(JsonFieldPage *page, const QString &name)
QTC_ASSERT(w, return);
page->registerFieldWithName(name, w, "path", SIGNAL(textChanged(QString)));
QObject::connect(w, &PathChooser::textChanged, page, &WizardPage::completeChanged);
QObject::connect(w, &PathChooser::validChanged, page, &WizardPage::completeChanged);
}
bool PathChooserField::validate(MacroExpander *expander, QString *message)
@@ -973,7 +975,7 @@ std::unique_ptr<QStandardItem> createStandardItemFromListItem(const QVariant &it
auto standardItem = std::make_unique<QStandardItem>();
if (item.typeId() == QMetaType::QVariantMap) {
QVariantMap tmp = item.toMap();
const QString key = JsonWizardFactory::localizedString(consumeValue(tmp, "trKey", QString()).toString());
const QString key = JsonWizardFactory::localizedString(consumeValue(tmp, "trKey"));
const QVariant value = consumeValue(tmp, "value", key);
if (key.isNull() || key.isEmpty()) {
@@ -984,7 +986,7 @@ std::unique_ptr<QStandardItem> createStandardItemFromListItem(const QVariant &it
standardItem->setData(value, ListField::ValueRole);
standardItem->setData(consumeValue(tmp, "condition", true), ListField::ConditionRole);
standardItem->setData(consumeValue(tmp, "icon"), ListField::IconStringRole);
standardItem->setToolTip(JsonWizardFactory::localizedString(consumeValue(tmp, "trToolTip", QString()).toString()));
standardItem->setToolTip(JsonWizardFactory::localizedString(consumeValue(tmp, "trToolTip")));
warnAboutUnsupportedKeys(tmp, QString(), "List");
} else {
const QString keyvalue = item.toString();

View File

@@ -769,10 +769,9 @@ QString JsonWizardFactory::localizedString(const QVariant &value)
return {};
if (value.typeId() == QMetaType::QVariantMap) {
QVariantMap tmp = value.toMap();
const QString locale = languageSetting().toLower();
QStringList locales;
locales << locale << QLatin1String("en") << QLatin1String("C") << tmp.keys();
for (const QString &locale : std::as_const(locales)) {
const QString currentLocale = languageSetting().toLower();
const QStringList locales{currentLocale, "en", "C"};
for (const QString &locale : locales) {
QString result = tmp.value(locale, QString()).toString();
if (!result.isEmpty())
return result;

View File

@@ -364,6 +364,12 @@ void RunControl::copyDataFromRunControl(RunControl *runControl)
d->copyData(runControl->d.get());
}
void RunControl::resetDataForAttachToCore()
{
d->m_workers.clear();
d->state = RunControlState::Initialized;
}
void RunControl::copyDataFromRunConfiguration(RunConfiguration *runConfig)
{
QTC_ASSERT(runConfig, return);

View File

@@ -150,6 +150,7 @@ public:
void copyDataFromRunConfiguration(RunConfiguration *runConfig);
void copyDataFromRunControl(RunControl *runControl);
void resetDataForAttachToCore();
void setAutoDeleteOnStop(bool autoDelete);

View File

@@ -49,11 +49,6 @@ TextEditorView::TextEditorView(ExternalDependenciesInterface &externalDependenci
: AbstractView{externalDependencies}
, m_widget(new TextEditorWidget(this))
{
IContext::attach(m_widget,
Context(Constants::C_QMLTEXTEDITOR, Constants::C_QT_QUICK_TOOLS_MENU),
[this](const IContext::HelpCallback &callback) {
m_widget->contextHelp(callback);
});
}
TextEditorView::~TextEditorView()
@@ -70,7 +65,11 @@ void TextEditorView::modelAttached(Model *model)
auto textEditor = Utils::UniqueObjectLatePtr<TextEditor::BaseTextEditor>(
QmlDesignerPlugin::instance()->currentDesignDocument()->textEditor()->duplicate());
IContext::attach(textEditor->widget(),
Context(Constants::C_QMLTEXTEDITOR, Constants::C_QT_QUICK_TOOLS_MENU),
[this](const IContext::HelpCallback &callback) {
m_widget->contextHelp(callback);
});
m_widget->setTextEditor(std::move(textEditor));
}

View File

@@ -63,7 +63,8 @@ const char CUSTOM_COMMAND[] = "QmlJSEditor.useCustomFormatCommand";
const char CUSTOM_ANALYZER[] = "QmlJSEditor.useCustomAnalyzer";
const char DISABLED_MESSAGES[] = "QmlJSEditor.disabledMessages";
const char DISABLED_MESSAGES_NONQUICKUI[] = "QmlJSEditor.disabledMessagesNonQuickUI";
const char DEFAULT_CUSTOM_FORMAT_COMMAND[] = "%{CurrentDocument:Project:QT_HOST_BINS}/qmlformat";
const char DEFAULT_CUSTOM_FORMAT_COMMAND[]
= "%{CurrentDocument:Project:QT_HOST_BINS}/qmlformat%{HostOs:ExecutableSuffix}";
QmlJsEditingSettings &settings()
{

View File

@@ -127,12 +127,15 @@ static inline QString getModuleName(const ScopeChain &scopeChain, const Document
bool QmlJSHoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Document::Ptr &qmlDocument,
const ObjectValue *value, const QStringList &qName)
{
QString moduleName = getModuleName(scopeChain, qmlDocument, value);
const QString moduleName = getModuleName(scopeChain, qmlDocument, value);
static const QRegularExpression anyVersion("((-1|\\d+)\\.-1)|(\\d+\\.\\d+)$");
QStringList helpIdCandidates;
QStringList helpIdPieces(qName);
helpIdPieces.prepend(moduleName);
QString strippedModuleName = moduleName;
strippedModuleName.remove(anyVersion);
helpIdPieces.prepend(strippedModuleName);
helpIdPieces.prepend("QML");
helpIdCandidates += helpIdPieces.join('.');
@@ -155,8 +158,8 @@ bool QmlJSHoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Docum
const HelpItem::Links links = helpItem.links();
// Check if the module name contains a major version.
QRegularExpression version("^([^\\d]*)(\\d+)\\.*\\d*$");
QRegularExpressionMatch m = version.match(moduleName);
static QRegularExpression version("^([^\\d]*)(\\d+)\\.*\\d*$");
const QRegularExpressionMatch m = version.match(moduleName);
if (m.hasMatch()) {
QMap<QString, QUrl> filteredUrlMap;
const QString maj = m.captured(2);

View File

@@ -49,7 +49,7 @@ QString uniqueProjectName(const QString &path)
/***********************/
QdsNewDialog::QdsNewDialog(QWidget *parent)
: m_dialog{new QQuickWidget(parent)}
: m_dialog{Utils::makeUniqueObjectPtr<QQuickWidget>(parent)}
, m_categoryModel{new PresetCategoryModel(&m_presetData, this)}
, m_presetModel{new PresetModel(&m_presetData, this)}
, m_screenSizeModel{new ScreenSizeModel(this)}
@@ -57,7 +57,7 @@ QdsNewDialog::QdsNewDialog(QWidget *parent)
, m_recentsStore{"RecentPresets.json", StorePolicy::UniqueValues}
, m_userPresetsStore{"UserPresets.json", StorePolicy::UniqueNames}
{
setParent(m_dialog);
connect(m_dialog.get(), &QObject::destroyed, this, &QObject::deleteLater);
m_recentsStore.setReverseOrder();
m_recentsStore.setMaximum(10);
@@ -89,9 +89,10 @@ QdsNewDialog::QdsNewDialog(QWidget *parent)
m_dialog->installEventFilter(this);
QObject::connect(&m_wizard, &WizardHandler::wizardCreationFailed, this, [this] {
QMessageBox::critical(m_dialog, tr("New Project"), tr("Failed to initialize data."));
// TODO: if the dialog itself could react on the error
// the would not be necessary
QMessageBox::critical(m_dialog.get(), tr("New Project"), tr("Failed to initialize data."));
reject();
deleteLater();
});
QObject::connect(m_styleModel.data(), &StyleModel::modelAboutToBeReset, this, [this] {
@@ -101,7 +102,7 @@ QdsNewDialog::QdsNewDialog(QWidget *parent)
bool QdsNewDialog::eventFilter(QObject *obj, QEvent *event)
{
if (obj == m_dialog && event->type() == QEvent::KeyPress
if (obj == m_dialog.get() && event->type() == QEvent::KeyPress
&& static_cast<QKeyEvent *>(event)->key() == Qt::Key_Escape) {
reject();
return true;
@@ -314,7 +315,7 @@ void QdsNewDialog::setWizardFactories(QList<Core::IWizardFactory *> factories_,
{
Utils::Id platform = Utils::Id::fromSetting("Desktop");
WizardFactories factories{factories_, m_dialog, platform};
WizardFactories factories{factories_, m_dialog.get(), platform};
std::vector<UserPresetData> recents = m_recentsStore.fetchAll();
std::vector<UserPresetData> userPresets = m_userPresetsStore.fetchAll();
@@ -404,8 +405,6 @@ void QdsNewDialog::accept()
m_recentsStore.save(preset);
m_dialog->close();
m_dialog->deleteLater();
m_dialog = nullptr;
}
void QdsNewDialog::reject()
@@ -415,12 +414,13 @@ void QdsNewDialog::reject()
m_wizard.destroyWizard();
m_dialog->close();
m_dialog = nullptr;
m_dialog.reset();
}
QString QdsNewDialog::chooseProjectLocation()
{
Utils::FilePath newPath = Utils::FileUtils::getExistingDirectory(m_dialog, tr("Choose Directory"),
Utils::FilePath newPath = Utils::FileUtils::getExistingDirectory(m_dialog.get(),
tr("Choose Directory"),
m_qmlProjectLocation);
return QDir::toNativeSeparators(newPath.toString());
@@ -473,7 +473,7 @@ void QdsNewDialog::savePresetDialogAccept()
UserPresetData preset = currentUserPresetData(m_qmlPresetName);
if (!m_userPresetsStore.save(preset)) {
QMessageBox::warning(m_dialog,
QMessageBox::warning(m_dialog.get(),
tr("Save Preset"),
tr("A preset with this name already exists."));
return;

View File

@@ -7,6 +7,7 @@
#include <coreplugin/dialogs/newdialog.h>
#include <utils/infolabel.h>
#include <utils/uniqueobjectptr.h>
#include "wizardhandler.h"
#include "presetmodel.h"
@@ -64,7 +65,7 @@ public:
explicit QdsNewDialog(QWidget *parent);
QWidget *widget() override { return m_dialog; }
QWidget *widget() override { return m_dialog.get(); }
void setWizardFactories(QList<Core::IWizardFactory *> factories, const Utils::FilePath &defaultLocation,
const QVariantMap &extraVariables) override;
@@ -139,7 +140,7 @@ private slots:
void onWizardCreated(QStandardItemModel *screenSizeModel, QStandardItemModel *styleModel);
private:
QQuickWidget *m_dialog = nullptr;
Utils::UniqueObjectPtr<QQuickWidget> m_dialog;
PresetData m_presetData;
QPointer<PresetCategoryModel> m_categoryModel;

View File

@@ -53,7 +53,10 @@ void WizardHandler::setupWizard()
initializeProjectPage(m_wizard->page(0));
initializeFieldsPage(m_wizard->page(1));
if (!m_detailsPage) {
emit wizardCreationFailed();
return;
}
auto *screenFactorModel = getScreenFactorModel(m_detailsPage);
auto *styleModel = getStyleModel(m_detailsPage);

View File

@@ -43,7 +43,7 @@ def main():
progressBarWait(warn=False)
# select a text tutorial
mouseClick(waitForObjectItem(listView, str(tutorial.text)))
test.verify("Building and Running an Example" in
test.verify("Tutorial: Build and run" in
str(waitForObject(":Help Widget_Help::Internal::HelpWidget").windowTitle),
"Verifying: The tutorial is opened inside Help.")
# close help widget again to avoid focus issues

View File

@@ -16,10 +16,10 @@ def main():
if not startedWithoutPluginError():
return
invokeMenuItem("Edit", "Preferences...")
__checkKits__()
qmakeFound = __checkKits__()
clickButton(waitForObject(":Options.Cancel_QPushButton"))
invokeMenuItem("File", "Exit")
__checkCreatedSettings__(emptySettings)
__checkCreatedSettings__(emptySettings, qmakeFound)
def __createMinimumIni__(emptyParent):
qtProjDir = os.path.join(emptyParent, "QtProject")
@@ -61,6 +61,10 @@ def __checkKits__():
test.log(str(genericDebuggers))
# check Qt versions
qmakePath = which("qmake")
if qmakePath and (not "Using Qt version" in
getOutputFromCmdline([qmakePath, "--version"], acceptedError=1)):
# ignore dysfunctional qmake, e.g. incomplete qtchooser
qmakePath = None
foundQt = []
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Qt Versions")
__iterateTree__(":qtdirList_QTreeView", __qtFunc__, foundQt, qmakePath)
@@ -71,6 +75,7 @@ def __checkKits__():
# check kits
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Kits")
__iterateTree__(":BuildAndRun_QTreeView", __kitFunc__, foundQt, foundCompilerNames)
return qmakePath != None
def __processSubItems__(treeObjStr, section, parModelIndexStr, doneItems,
additionalFunc, *additionalParameters):
@@ -295,18 +300,11 @@ def __getExpectedDebuggers__():
def __getCDB__():
result = []
possibleLocations = ["C:\\Program Files\\Debugging Tools for Windows (x64)",
"C:\\Program Files (x86)\\Debugging Tools for Windows (x86)",
"C:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x86",
"C:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x64",
"C:\\Program Files\\Windows Kits\\8.0\\Debuggers\\x86",
"C:\\Program Files\\Windows Kits\\8.0\\Debuggers\\x64",
"C:\\Program Files (x86)\\Windows Kits\\8.1\\Debuggers\\x86",
"C:\\Program Files (x86)\\Windows Kits\\8.1\\Debuggers\\x64",
"C:\\Program Files\\Windows Kits\\8.1\\Debuggers\\x86",
"C:\\Program Files\\Windows Kits\\8.1\\Debuggers\\x64",
"C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x86",
"C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64",
"C:\\Program Files\\Windows Kits\\10\\Debuggers\\x86",
"C:\\Program Files\\Windows Kits\\10\\Debuggers\\x64"]
for cdbPath in possibleLocations:
cdb = os.path.join(cdbPath, "cdb.exe")
@@ -377,7 +375,7 @@ def __lowerStrs__(iterable):
else:
yield it
def __checkCreatedSettings__(settingsFolder):
def __checkCreatedSettings__(settingsFolder, qmakeFound):
waitForCleanShutdown()
qtProj = os.path.join(settingsFolder, "QtProject")
creatorFolder = os.path.join(qtProj, "qtcreator")
@@ -390,8 +388,9 @@ def __checkCreatedSettings__(settingsFolder):
os.path.join(creatorFolder, "devices.xml"):0,
os.path.join(creatorFolder, "helpcollection.qhc"):0,
os.path.join(creatorFolder, "profiles.xml"):0,
os.path.join(creatorFolder, "qtversion.xml"):0,
os.path.join(creatorFolder, "toolchains.xml"):0}
if qmakeFound:
files[os.path.join(creatorFolder, "qtversion.xml")] = 0
for f in folders:
test.verify(os.path.isdir(f),
"Verifying whether folder '%s' has been created." % os.path.basename(f))

View File

@@ -38,7 +38,7 @@ def main():
previous = filenames[-1]
for filename in filenames:
tempFiletype = filetype
if filetype == "QML" and not previous.endswith(".qml"):
if filetype == "QML" and not fileExtMatchesQml(previous):
tempFiletype = "Other files"
renameFile(templateDir, usedProFile, projectName + "." + tempFiletype,
previous, filename)
@@ -61,6 +61,15 @@ def verifyRenamedIncludes(templateDir, file, oldname, newname):
'Verify that new filename is included in %s' % file)):
test.log(grep("include", fileText))
def fileExtMatchesQml(fileName):
if platform.system() == "Linux":
return fileName.endswith(".qml")
else:
# On case ignoring file systems, ".QML" is the same as ".qml"
return fileName.lower().endswith(".qml")
def renameFile(projectDir, proFile, branch, oldname, newname):
oldFilePath = os.path.join(projectDir, oldname)
newFilePath = os.path.join(projectDir, newname)
@@ -115,7 +124,7 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
test.verify(oldname not in os.listdir(projectDir),
"Verify that file with old name does not exist: %s" % oldFilePath)
if newItemText.endswith("\\.qml"):
if fileExtMatchesQml(newItemText):
newItemText = newItemText.replace(".Other files.", ".QML.")
else:
newItemText = newItemText.replace(".QML.", ".Other files.")

View File

@@ -3,6 +3,15 @@
source("../../shared/qtcreator.py")
def closeMainWindowCppIfOpen():
mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000)
mainWindowCppClosed = lambda: "mainwindow.cpp " not in str(mainWindow.windowTitle)
if "mainwindow.cpp " in str(mainWindow.windowTitle):
invokeMenuItem('File', 'Close "mainwindow.cpp"')
waitFor(mainWindowCppClosed, 2000)
def main():
startQC()
if not startedWithoutPluginError():
@@ -15,11 +24,14 @@ def main():
earlyExit()
return
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
closeMainWindowCppIfOpen()
selectFromLocator("mainwindow.ui")
dragAndDrop(waitForObject("{container=':qdesigner_internal::WidgetBoxCategoryListView'"
"text='Push Button' type='QModelIndex'}"), 5, 5,
":FormEditorStack_qdesigner_internal::FormWindow", 20, 50, Qt.CopyAction)
proposalExists = lambda: object.exists(':popupFrame_TextEditor::GenericProposalWidget')
fileNameCombo = waitForObject(":Qt Creator_FilenameQComboBox", 1000)
fileSaved = lambda: not str(fileNameCombo.currentText).endswith('*')
for buttonName in [None, "aDifferentName", "anotherDifferentName", "pushButton"]:
if buttonName:
openContextMenu(waitForObject("{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack'"
@@ -31,8 +43,13 @@ def main():
else:
# Verify that everything works without ever changing the name
buttonName = "pushButton"
invokeMenuItem("File", "Save All")
waitFor(fileSaved, 1000)
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
waitForCompile()
selectFromLocator("mainwindow.cpp")
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
snooze(1)
for tryDotOperator in [False, True]:
if not placeCursorToLine(editor, "ui->setupUi(this);"):
earlyExit("Maybe the project template changed.")
@@ -42,21 +59,34 @@ def main():
if tryDotOperator:
snooze(1)
type(editor, ".")
waitFor("object.exists(':popupFrame_TextEditor::GenericProposalWidget')", 1500)
else:
type(editor, "-")
snooze(1)
type(editor, ">")
if not test.verify(waitFor(proposalExists, 1500), "Proposal should be shown"):
type(editor, "<Shift+Delete>")
continue
proposalListView = waitForObject(':popupFrame_Proposal_QListView')
items = dumpItems(proposalListView.model())
if test.verify(" %s" % buttonName in items, "Button present in proposal?"):
type(proposalListView, str(buttonName[0]))
else:
test.log(str(items))
snooze(1)
proposalExists = lambda: object.exists(':popupFrame_TextEditor::GenericProposalWidget')
nativeType("%s" % buttonName[0])
if test.verify(waitFor(proposalExists, 4000),
"Verify that GenericProposalWidget is being shown."):
nativeType("<Return>")
singleProposal = lambda: (object.exists(':popupFrame_Proposal_QListView')
and findObject(':popupFrame_Proposal_QListView').model().rowCount() == 1)
waitFor(singleProposal, 4000)
type(proposalListView, "<Return>")
lineCorrect = lambda: str(lineUnderCursor(editor)).strip() == "ui->%s" % buttonName
test.verify(waitFor(lineCorrect, 1000),
test.verify(waitFor(lineCorrect, 4000),
('Comparing line "%s" to expected "%s"'
% (lineUnderCursor(editor), "ui->%s" % buttonName)))
type(editor, "<Shift+Delete>") # Delete line
type(editor, "<Shift+Delete>") # Delete line
invokeMenuItem("File", "Save All")
closeMainWindowCppIfOpen()
selectFromLocator("mainwindow.ui")
saveAndExit()
invokeMenuItem("File", "Exit")

View File

@@ -167,7 +167,7 @@ def main():
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_GUI(tempDir(), "DesignerTestApp", False)
createProject_Qt_GUI(tempDir(), "DesignerTestApp", False, targets=[Targets.DESKTOP_6_2_4])
selectFromLocator("mainwindow.ui")
replaceEditorContent(waitForObject("{container=':*Qt Creator.Widget Box_QDockWidget' "
"type='QLineEdit' visible='1'}"), "combo")