Merge "Merge remote-tracking branch 'origin/11.0'"
BIN
doc/qtcreator/images/extraimages/images/EhJ1eV_6RH8.jpg
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
doc/qtcreator/images/extraimages/images/FTSvDmcAgPI.jpg
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
doc/qtcreator/images/extraimages/images/LnVjI0I7cKs.jpg
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
doc/qtcreator/images/extraimages/images/hOx3dod5-1A.jpg
Normal file
After Width: | Height: | Size: 2.7 KiB |
@@ -1,3 +1,7 @@
|
|||||||
{HTML.extraimages,qhp.QtCreator.extraFiles} += \
|
{HTML.extraimages,qhp.QtCreator.extraFiles} += \
|
||||||
images/commercial.png \
|
images/commercial.png \
|
||||||
images/5OiIqFTjUZI.jpg
|
images/5OiIqFTjUZI.jpg \
|
||||||
|
images/EhJ1eV_6RH8.jpg \
|
||||||
|
images/FTSvDmcAgPI.jpg \
|
||||||
|
images/hOx3dod5-1A.jpg \
|
||||||
|
images/LnVjI0I7cKs.jpg
|
||||||
|
BIN
doc/qtcreator/images/qtcreator-preferences.webp
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
doc/qtcreator/images/qtcreator-scratch-buffer.webp
Normal file
After Width: | Height: | Size: 2.1 KiB |
@@ -781,6 +781,10 @@
|
|||||||
the display text might do something wrong. You can step through the code and
|
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.
|
examine changes to the variable to find out where the error occurs.
|
||||||
|
|
||||||
|
The following video shows how to examine variable values:
|
||||||
|
|
||||||
|
\youtube EhJ1eV_6RH8
|
||||||
|
|
||||||
\section1 Showing Tooltips for Simple Values
|
\section1 Showing Tooltips for Simple Values
|
||||||
|
|
||||||
To display the value of a simple variable, hover the mouse pointer over its
|
To display the value of a simple variable, hover the mouse pointer over its
|
||||||
|
36
doc/qtcreator/src/howto/creator-how-to-macos.qdoc
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-macos.html
|
||||||
|
\if defined(qtcreator)
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\endif
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
\ingroup studio-how-to
|
||||||
|
|
||||||
|
\title Find menu items on \macos
|
||||||
|
|
||||||
|
\QC uses standard names and locations for standard features, such as
|
||||||
|
\e preferences. In this manual, the names and locations on
|
||||||
|
Windows and Linux are usually used to keep the instructions short. Here are
|
||||||
|
some places to check if you cannot find a function, dialog, or keyboard
|
||||||
|
shortcut on \macos when following the instructions:
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li For
|
||||||
|
\li Look In
|
||||||
|
\row
|
||||||
|
\li \uicontrol Edit > \uicontrol Preferences
|
||||||
|
\li \uicontrol {\QC} > \uicontrol Preferences
|
||||||
|
\row
|
||||||
|
\li \uicontrol Help > \uicontrol {About Plugins}
|
||||||
|
\li \uicontrol {\QC} > \uicontrol {About Plugins}
|
||||||
|
\row
|
||||||
|
\li Keyboard shortcuts
|
||||||
|
\li \uicontrol {\QC} > \uicontrol Preferences > \uicontrol Environment >
|
||||||
|
\uicontrol Keyboard
|
||||||
|
\endtable
|
||||||
|
*/
|
@@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-set-high-dpi-scaling.html
|
||||||
|
\if defined(qtcreator)
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\endif
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
\ingroup studio-how-to
|
||||||
|
|
||||||
|
\title Set high DPI scaling
|
||||||
|
|
||||||
|
The operating systems that \QC supports implement high dots-per-inch (DPI)
|
||||||
|
scaling at varying levels. Therefore, \QC handles high DPI scaling
|
||||||
|
differently on different operating systems:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li On \macos, \QC forces high DPI scaling, which means that it allows
|
||||||
|
Qt to use the system scaling factor as the \QC scaling factor.
|
||||||
|
\li On Windows, if you do not set \l{High DPI}
|
||||||
|
{scaling environment variables}, \QC instructs Qt to detect the
|
||||||
|
scaling factor and use it as the \QC scaling factor.
|
||||||
|
\li On Linux, \QC leaves it to the user to enable high DPI scaling
|
||||||
|
because the process varies so much on different distributions
|
||||||
|
and windowing systems that it cannot be reliably done automatically.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
To override the default approach and always enable high DPI scaling:
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||||
|
\uicontrol Environment > \uicontrol Interface.
|
||||||
|
\li Select \uicontrol {Enable high DPI scaling}.
|
||||||
|
\li Restart \QC to have the change take effect.
|
||||||
|
\endlist
|
||||||
|
*/
|
26
doc/qtcreator/src/howto/creator-how-to-switch-ui-themes.qdoc
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-switch-ui-themes.html
|
||||||
|
\if defined(qtcreator)
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\endif
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
\ingroup studio-how-to
|
||||||
|
|
||||||
|
\title Switch UI themes
|
||||||
|
|
||||||
|
Themes enable you to change the appearance of the UI from dark to light,
|
||||||
|
for example.
|
||||||
|
|
||||||
|
To switch themes:
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li Select \uicontrol Edit > \uicontrol Preferences >
|
||||||
|
\uicontrol Environment > \uicontrol Interface.
|
||||||
|
\image qtcreator-preferences-environment-interface.webp {Interface preferences}
|
||||||
|
\li In \uicontrol Theme, select a theme.
|
||||||
|
\endlist
|
||||||
|
*/
|
66
doc/qtcreator/src/howto/creator-how-to-view-images.qdoc
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-view-images.html
|
||||||
|
\if defined(qtcreator)
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\endif
|
||||||
|
\ingroup creator-how-to-design
|
||||||
|
\ingroup studio-how-to-image-viewer
|
||||||
|
|
||||||
|
\title View images
|
||||||
|
|
||||||
|
\QC opens image files in the image viewer.
|
||||||
|
|
||||||
|
\image qtcreator-image-viewer.png {Image viewer}
|
||||||
|
|
||||||
|
Use the toolbar buttons or \l{Keyboard Shortcuts}{keyboard shortcuts} to:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \inlineimage icons/export.png
|
||||||
|
- Export SVG images to pixmaps or copy an image as a data URL, which
|
||||||
|
enables you to include it in web pages as if it were an external
|
||||||
|
resource
|
||||||
|
\li \inlineimage icons/original-size.png
|
||||||
|
- Return images to their original size
|
||||||
|
\li \inlineimage icons/zoom-in.png
|
||||||
|
- Zoom in and out (\inlineimage icons/zoom-out.png
|
||||||
|
)
|
||||||
|
\li \inlineimage icons/run_small.png
|
||||||
|
- Play and pause animated GIF and MNG images
|
||||||
|
\li \inlineimage icons/qtcreator-desktopdevice-button.png
|
||||||
|
- Show and hide the image background
|
||||||
|
\li \inlineimage icons/switch-outline.png
|
||||||
|
- Show and hide the image outline
|
||||||
|
\li \inlineimage icons/fittoview.png
|
||||||
|
- Fit images to screen
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
Select \uicontrol {Set as Default} to use the current settings for the
|
||||||
|
background and outline modes and fitting images to screen as default
|
||||||
|
values for the image viewer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-export-svg-images.html
|
||||||
|
\if defined(qtcreator)
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\endif
|
||||||
|
\ingroup creator-how-to-design
|
||||||
|
\ingroup studio-how-to-image-viewer
|
||||||
|
|
||||||
|
\title Export SVG images
|
||||||
|
|
||||||
|
If you have a freely scalable icon in the SVG format, you can open it in the
|
||||||
|
\l{View images}{image viewer} to export it to several images of different
|
||||||
|
sizes to create a set of pixmaps.
|
||||||
|
|
||||||
|
Select \inlineimage icons/export.png
|
||||||
|
on the toolbar.
|
||||||
|
|
||||||
|
You can then use QIcon::addPixmap() to add the pixmaps to icons in
|
||||||
|
different modes and states.
|
||||||
|
*/
|
@@ -0,0 +1,32 @@
|
|||||||
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-find-settings-files.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-use
|
||||||
|
|
||||||
|
\title Find settings files
|
||||||
|
|
||||||
|
\QC creates the following files and directories:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li QtCreator.db
|
||||||
|
\li QtCreator.ini
|
||||||
|
\li qtversion.xml
|
||||||
|
\li qtcreator
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
The location of the above files and directories depends on the platform:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li On Linux and other Unix platforms, look in
|
||||||
|
\c {~/.config/QtProject} and
|
||||||
|
\c {~/.local/share/data/QtProject/qtcreator}.
|
||||||
|
\li On \macos, look in \c {~/.config/QtProject} and
|
||||||
|
\c {~/Library/Application Support/QtProject/Qt Creator}.
|
||||||
|
\li On Windows, look in
|
||||||
|
\c {%appdata%\QtProject} and \c {%localappdata%\QtProject}.
|
||||||
|
\endlist
|
||||||
|
*/
|
@@ -12,35 +12,70 @@
|
|||||||
\page creator-how-tos.html
|
\page creator-how-tos.html
|
||||||
\nextpage creator-known-issues.html
|
\nextpage creator-known-issues.html
|
||||||
|
|
||||||
\title How-tos
|
\title How-to
|
||||||
|
|
||||||
How do I:
|
The following topics describe how to use \QC to perform a particular task.
|
||||||
|
|
||||||
|
\section1 Use the UI
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li \l {Switch between modes}
|
\li \l {Find a particular preference}
|
||||||
\li \l {Move between open files}
|
|
||||||
\li \l {Switch to Edit mode}
|
|
||||||
\li \l {Find a specific setting}
|
|
||||||
\li \l {View output}
|
|
||||||
\li \l {Find keyboard shortcuts}
|
\li \l {Find keyboard shortcuts}
|
||||||
\li \l {Run \QC from the command line}
|
\li \l {Find menu items on \macos}
|
||||||
|
\li \l {Set high DPI scaling}
|
||||||
|
\li \l {Set the number of recent files shown}
|
||||||
\li \l {Show and hide sidebars}
|
\li \l {Show and hide sidebars}
|
||||||
\li \l {Move to symbols}
|
\li \l {Switch between modes}
|
||||||
\li \l {Quickly locate files using the keyboard}
|
\li \l {Switch UI themes}
|
||||||
\li \l {Perform calculations}
|
\li \l {View output}
|
||||||
\li \l {Jump to a function in QML code}
|
|
||||||
\li \l {Add a license header template for C++ code}
|
|
||||||
\li \l {Paste text from my clipboard history}
|
|
||||||
\li \l {Sort lines alphabetically}
|
|
||||||
\li \l {Enclose selected code in curly braces, parentheses, or double quotes}
|
|
||||||
\li \l {Select the enclosing block in C++}
|
|
||||||
\li \l {Add my own code snippets to the auto-complete menu}
|
|
||||||
\li \l {Quickly write down notes somewhere}
|
|
||||||
\li \l {Configure the amount of recent files shown}
|
|
||||||
\li \l {Search and replace across files using a regular expression}
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Switch between modes
|
\section1 Edit Code
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \l {Add code snippets to the auto-complete menu}
|
||||||
|
\li \l {Enclose selected code in curly braces, parentheses, or double quotes}
|
||||||
|
\li \l {Jump to a function in QML code}
|
||||||
|
\li \l {Locate files using the keyboard}
|
||||||
|
\li \l {Move between open files}
|
||||||
|
\li \l {Move to symbols}
|
||||||
|
\li \l {Paste text from clipboard history}
|
||||||
|
\li \l {Perform calculations}
|
||||||
|
\li \l {Search and replace across files using a regular expression}
|
||||||
|
\li \l {Select the enclosing block in C++}
|
||||||
|
\li \l {Sort lines alphabetically}
|
||||||
|
\li \l {Switch to Edit mode}
|
||||||
|
\li \l {Write down notes}
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section1 Design UIs
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \l {Export SVG images}
|
||||||
|
\li \l {View images}
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section1 Manage Projects
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \l {Add a license header template for C++ code}
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section1 Use \QC
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \l {Find settings files}
|
||||||
|
\li \l {Run \QC from the command line}
|
||||||
|
\endlist
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-switch-between-modes.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
|
||||||
|
\title Switch between modes
|
||||||
|
|
||||||
\QC uses different modes for different purposes. You can quickly
|
\QC uses different modes for different purposes. You can quickly
|
||||||
switch between these modes with the following keyboard shortcuts:
|
switch between these modes with the following keyboard shortcuts:
|
||||||
@@ -57,8 +92,15 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
For more information about \QC modes, see \l {Selecting Modes}.
|
For more information about \QC modes, see \l {Selecting Modes}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Move between open files
|
/*!
|
||||||
|
\page creator-how-to-move-between-open-files.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Move between open files
|
||||||
|
|
||||||
To quickly move between currently open files, press
|
To quickly move between currently open files, press
|
||||||
\key Ctrl+Tab.
|
\key Ctrl+Tab.
|
||||||
@@ -68,8 +110,15 @@
|
|||||||
(\key {Cmd+Opt+Left} on \macos). For example, if you use the \uicontrol Locator
|
(\key {Cmd+Opt+Left} on \macos). For example, if you use the \uicontrol Locator
|
||||||
to jump to a symbol in the same file, you can jump back to your original
|
to jump to a symbol in the same file, you can jump back to your original
|
||||||
location in that file by pressing \key {Alt+Left}.
|
location in that file by pressing \key {Alt+Left}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Switch to Edit mode
|
/*!
|
||||||
|
\page creator-how-to-switch-to-edit-mode.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Switch to Edit mode
|
||||||
|
|
||||||
To move to the \uicontrol Edit mode and currently active file, press
|
To move to the \uicontrol Edit mode and currently active file, press
|
||||||
\key Esc.
|
\key Esc.
|
||||||
@@ -83,13 +132,29 @@
|
|||||||
\li The second press closes secondary windows
|
\li The second press closes secondary windows
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Find a specific setting
|
/*!
|
||||||
|
\page creator-how-to-find-preferences.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
|
||||||
To find specific settings in \uicontrol Edit > \uicontrol Preferences,
|
\title Find a particular preference
|
||||||
|
|
||||||
|
To find a particular preference in \uicontrol Edit > \uicontrol Preferences,
|
||||||
use the filter located at the top left of the \uicontrol Preferences dialog.
|
use the filter located at the top left of the \uicontrol Preferences dialog.
|
||||||
|
|
||||||
\section1 View output
|
\image qtcreator-preferences.webp {Filtering preferences}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-view-output.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
|
||||||
|
\title View output
|
||||||
|
|
||||||
The \l{Viewing Output}{taskbar} shows output from
|
The \l{Viewing Output}{taskbar} shows output from
|
||||||
several sources, such as a list of errors and warnings encountered during
|
several sources, such as a list of errors and warnings encountered during
|
||||||
@@ -113,8 +178,15 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
For additional ways to view other types of output, see \l{Viewing Output}.
|
For additional ways to view other types of output, see \l{Viewing Output}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Find keyboard shortcuts
|
/*!
|
||||||
|
\page creator-how-to-find-keyboard-shortcuts.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
|
||||||
|
\title Find keyboard shortcuts
|
||||||
|
|
||||||
\QC has \l{Keyboard Shortcuts}{many useful keyboard shortcuts}.
|
\QC has \l{Keyboard Shortcuts}{many useful keyboard shortcuts}.
|
||||||
You can see the keyboard shortcut for a menu command in the menu
|
You can see the keyboard shortcut for a menu command in the menu
|
||||||
@@ -124,8 +196,15 @@
|
|||||||
\uicontrol Preferences > \uicontrol Environment > \uicontrol Keyboard.
|
\uicontrol Preferences > \uicontrol Environment > \uicontrol Keyboard.
|
||||||
|
|
||||||
\image qtcreator-keyboard-shortcuts.png "Keyboard preferences"
|
\image qtcreator-keyboard-shortcuts.png "Keyboard preferences"
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Run \QC from the command line
|
/*!
|
||||||
|
\page creator-how-to-run-from-cli.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-use
|
||||||
|
|
||||||
|
\title Run \QC from the command line
|
||||||
|
|
||||||
You can launch \QC from the command line using the name of an
|
You can launch \QC from the command line using the name of an
|
||||||
existing \l{Managing Sessions}{session} or project file by entering
|
existing \l{Managing Sessions}{session} or project file by entering
|
||||||
@@ -135,8 +214,15 @@
|
|||||||
loads the session called \e somesession.
|
loads the session called \e somesession.
|
||||||
|
|
||||||
For more information, see \l{Using Command Line Options}.
|
For more information, see \l{Using Command Line Options}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Show and hide sidebars
|
/*!
|
||||||
|
\page creator-how-to-show-and-hide-sidebars.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
|
||||||
|
\title Show and hide sidebars
|
||||||
|
|
||||||
You can toggle the left and right sidebar in some \QC modes.
|
You can toggle the left and right sidebar in some \QC modes.
|
||||||
|
|
||||||
@@ -150,8 +236,15 @@
|
|||||||
|
|
||||||
For more information on using the sidebars, see
|
For more information on using the sidebars, see
|
||||||
\l {Browsing Project Contents}.
|
\l {Browsing Project Contents}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Move to symbols
|
/*!
|
||||||
|
\page creator-how-to-move-to-symbols.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Move to symbols
|
||||||
|
|
||||||
To move straight to a symbol used in a project, select the symbol in the
|
To move straight to a symbol used in a project, select the symbol in the
|
||||||
\uicontrol Editor toolbar drop-down menu. For more information on the editor
|
\uicontrol Editor toolbar drop-down menu. For more information on the editor
|
||||||
@@ -166,8 +259,15 @@
|
|||||||
the definition or the declaration of the symbol. You can also move the
|
the definition or the declaration of the symbol. You can also move the
|
||||||
cursor on the symbol and press \key {F2}. For more information, see
|
cursor on the symbol and press \key {F2}. For more information, see
|
||||||
\l{Moving to Symbol Definition or Declaration}.
|
\l{Moving to Symbol Definition or Declaration}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Quickly locate files using the keyboard
|
/*!
|
||||||
|
\page creator-how-to-locate-files-using-keyboard.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Locate files using the keyboard
|
||||||
|
|
||||||
Use the \uicontrol Locator to browse
|
Use the \uicontrol Locator to browse
|
||||||
through projects, files, classes, functions, documentation, and file systems.
|
through projects, files, classes, functions, documentation, and file systems.
|
||||||
@@ -184,8 +284,15 @@
|
|||||||
\image qtcreator-locator-customize.webp "Locator preferences"
|
\image qtcreator-locator-customize.webp "Locator preferences"
|
||||||
|
|
||||||
For more information, see \l{Creating Locator Filters}.
|
For more information, see \l{Creating Locator Filters}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Perform calculations
|
/*!
|
||||||
|
\page creator-how-to-perform-calculations.html
|
||||||
|
\previouspage creator-how-to-move-between-open-files.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Perform calculations
|
||||||
|
|
||||||
Open the \uicontrol Locator with \key {Ctrl+K} and type =, followed by a space.
|
Open the \uicontrol Locator with \key {Ctrl+K} and type =, followed by a space.
|
||||||
You can now do basic calculations, with options to copy the results to the clipboard
|
You can now do basic calculations, with options to copy the results to the clipboard
|
||||||
@@ -194,13 +301,27 @@
|
|||||||
\image qtcreator-locator.webp "List of locator filters"
|
\image qtcreator-locator.webp "List of locator filters"
|
||||||
|
|
||||||
For more information, see \l{Executing JavaScript}.
|
For more information, see \l{Executing JavaScript}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Jump to a function in QML code
|
/*!
|
||||||
|
\page creator-how-to-jump-to-functions-in-qml-code.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Jump to a function in QML code
|
||||||
|
|
||||||
Open the \uicontrol Locator with \key {Ctrl+K} and type m, followed by a space.
|
Open the \uicontrol Locator with \key {Ctrl+K} and type m, followed by a space.
|
||||||
You can now go directly to any QML method in the file.
|
You can now go directly to any QML method in the file.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Add a license header template for C++ code
|
/*!
|
||||||
|
\page creator-how-to-add-license-header-templates.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-projects
|
||||||
|
|
||||||
|
\title Add a license header template for C++ code
|
||||||
|
|
||||||
Specify a file that has a license header for C++ in \uicontrol Edit >
|
Specify a file that has a license header for C++ in \uicontrol Edit >
|
||||||
\uicontrol Preferences > \uicontrol C++ > \uicontrol {File Naming} >
|
\uicontrol Preferences > \uicontrol C++ > \uicontrol {File Naming} >
|
||||||
@@ -223,20 +344,41 @@
|
|||||||
\li \c %$VARIABLE%: Contents of environment variable \c{VARIABLE}.
|
\li \c %$VARIABLE%: Contents of environment variable \c{VARIABLE}.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Paste text from my clipboard history
|
/*!
|
||||||
|
\page creator-how-to-paste-text-from-clipboard-history.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Paste text from clipboard history
|
||||||
|
|
||||||
\QC stores copied text in clipboard history. To retrieve clips from the
|
\QC stores copied text in clipboard history. To retrieve clips from the
|
||||||
history, press \key {Ctrl+Shift+V} until the clip appears.
|
history, press \key {Ctrl+Shift+V} until the clip appears.
|
||||||
The number of clips in the history is fixed to 10.
|
The number of clips in the history is fixed to 10.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Sort lines alphabetically
|
/*!
|
||||||
|
\page creator-how-to-sort-lines-alphabetically.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Sort lines alphabetically
|
||||||
|
|
||||||
To sort selected lines alphabetically, select \uicontrol Edit >
|
To sort selected lines alphabetically, select \uicontrol Edit >
|
||||||
\uicontrol Advanced > \uicontrol {Sort Selected Lines} or press
|
\uicontrol Advanced > \uicontrol {Sort Selected Lines} or press
|
||||||
\key {Alt+Shift+S} (or \key Ctrl+Shift+S on \macos).
|
\key {Alt+Shift+S} (or \key Ctrl+Shift+S on \macos).
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Enclose selected code in curly braces, parentheses, or double quotes
|
/*!
|
||||||
|
\page creator-enclose-code-in-characters.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Enclose selected code in curly braces, parentheses, or double quotes
|
||||||
|
|
||||||
When you have selected code and enter one of the following opening
|
When you have selected code and enter one of the following opening
|
||||||
characters, the matching closing character is added automatically
|
characters, the matching closing character is added automatically
|
||||||
@@ -253,45 +395,87 @@
|
|||||||
\uicontrol {Text Editor} > \uicontrol Completion.
|
\uicontrol {Text Editor} > \uicontrol Completion.
|
||||||
|
|
||||||
\image qtcreator-options-texteditor-completion.png "Completion preferences"
|
\image qtcreator-options-texteditor-completion.png "Completion preferences"
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Select the enclosing block in C++
|
/*!
|
||||||
|
\page creator-how-to-select-enclosing-block.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Select the enclosing block in C++
|
||||||
|
|
||||||
Press \key {Ctrl+U}.
|
Press \key {Ctrl+U}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Add my own code snippets to the auto-complete menu
|
/*!
|
||||||
|
\page creator-how-to-add-code-snippets.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
You can add, modify, and remove snippets in the snippet editor.
|
\title Add code snippets to the auto-complete menu
|
||||||
|
|
||||||
|
Add, modify, and remove snippets in the snippet editor.
|
||||||
To open the editor, select \uicontrol Edit > \uicontrol Preferences
|
To open the editor, select \uicontrol Edit > \uicontrol Preferences
|
||||||
> \uicontrol {Text Editor} > \uicontrol Snippets.
|
> \uicontrol {Text Editor} > \uicontrol Snippets.
|
||||||
|
|
||||||
\image qtcreator-snippet-modifiers.png "Snippets preferences"
|
\image qtcreator-snippet-modifiers.png "Snippets preferences"
|
||||||
|
|
||||||
For more information, see \l {Adding and Editing Snippets}.
|
For more information, see \l {Adding and Editing Snippets}.
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Quickly write down notes somewhere
|
/*!
|
||||||
|
\page creator-how-to-write-notes.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
Select \uicontrol File > \uicontrol {New File} >
|
\title Write down notes
|
||||||
\uicontrol General > \uicontrol {Scratch Buffer}.
|
|
||||||
Alternatively, \key {Ctrl+N} can be used to open this dialog, which is
|
|
||||||
fully navigable via keyboard by using the up and down arrow keys and the
|
|
||||||
tab key.
|
|
||||||
|
|
||||||
This creates a new empty text file and saves it to the temporary directory
|
To write down notes without having to worry about deleting the file
|
||||||
on your machine. You can use it to write down notes without having to worry
|
later, create a new empty text file and save it to a temporary directory
|
||||||
about deleting the file afterwards. The operating system will eventually
|
on your machine.
|
||||||
remove the file automatically. If you want to keep the file, you can easily
|
|
||||||
save it as a new file somewhere else. If you accidentally close the file,
|
|
||||||
you can find it in the \uicontrol File > \uicontrol {Recent Files} menu.
|
|
||||||
|
|
||||||
\section1 Configure the amount of recent files shown
|
\image qtcreator-scratch-buffer.webp {Scratch file open in the text editor}
|
||||||
|
|
||||||
|
To create a scratch file and open it in the text editor:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li Select \uicontrol File > \uicontrol {New File} > \uicontrol General >
|
||||||
|
\uicontrol {Scratch Buffer}.
|
||||||
|
\li Press \key {Ctrl+N}.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
Use the up and down arrow keys and the tab key to navigate in the editor.
|
||||||
|
|
||||||
|
The operating system will eventually remove the file automatically. To keep
|
||||||
|
the file, save it as a new file somewhere else. If you accidentally close the
|
||||||
|
file, find it in \uicontrol File > \uicontrol {Recent Files}.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-how-to-set-recent-files.html
|
||||||
|
\previouspage creator-how-tos.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-ui
|
||||||
|
|
||||||
|
\title Set the number of recent files shown
|
||||||
|
|
||||||
Set the value of \uicontrol Edit > \uicontrol Preferences >
|
Set the value of \uicontrol Edit > \uicontrol Preferences >
|
||||||
\uicontrol Environment > \uicontrol System
|
\uicontrol Environment > \uicontrol System
|
||||||
> \uicontrol {Maximum number of entries in "Recent Files"}.
|
> \uicontrol {Maximum number of entries in "Recent Files"}.
|
||||||
|
|
||||||
\image qtcreator-options-environment-system.png "System preferences"
|
\image qtcreator-options-environment-system.png "System preferences"
|
||||||
|
*/
|
||||||
|
|
||||||
\section1 Search and replace across files using a regular expression
|
/*!
|
||||||
|
\page creator-how-to-search-and-replace-using-regexp.html
|
||||||
|
\previouspage creator-how-to-move-between-open-files.html
|
||||||
|
\nextpage creator-known-issues.html
|
||||||
|
\ingroup creator-how-to-edit
|
||||||
|
|
||||||
|
\title Search and replace across files using a regular expression
|
||||||
|
|
||||||
As an example, say you want to replace equality checks (\c {foo == bar})
|
As an example, say you want to replace equality checks (\c {foo == bar})
|
||||||
with a function (\c {foo.equals(bar)}):
|
with a function (\c {foo.equals(bar)}):
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
This section has answers to some frequently asked questions about \QC.
|
This section has answers to some frequently asked questions about \QC.
|
||||||
You might also find answers to your questions in the
|
You might also find answers to your questions in the
|
||||||
\l{Known Issues} and \l{How-tos} sections, or the Troubleshooting
|
\l{Known Issues} and \l{How-to} sections, or the Troubleshooting
|
||||||
sections for a special area, such as
|
sections for a special area, such as
|
||||||
\l{Troubleshooting Debugger}{debugging}.
|
\l{Troubleshooting Debugger}{debugging}.
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
Remove the settings files created by \QC.
|
Remove the settings files created by \QC.
|
||||||
|
|
||||||
For more information about where the files are located on each supported
|
For more information about where the files are located on each supported
|
||||||
platform, see \l {Location of Settings Files}.
|
platform, see \l {Find settings files}.
|
||||||
|
|
||||||
\b {\QC comes with \MinGW, should I use this version with Qt?}
|
\b {\QC comes with \MinGW, should I use this version with Qt?}
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
Has answers to some frequently asked questions about \QC.
|
Has answers to some frequently asked questions about \QC.
|
||||||
|
|
||||||
\li \l{How-tos}
|
\li \l{How-to}
|
||||||
|
|
||||||
Lists useful \QC features.
|
Lists useful \QC features.
|
||||||
|
|
||||||
|
@@ -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
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
@@ -80,21 +80,18 @@
|
|||||||
For more information, see \l{Building and Running}.
|
For more information, see \l{Building and Running}.
|
||||||
\li \b {\l{Testing}}
|
\li \b {\l{Testing}}
|
||||||
|
|
||||||
\QC integrates several external native debuggers: GNU
|
\QC integrates several external native debuggers that you can use
|
||||||
Symbolic Debugger (GDB), Microsoft Console Debugger (CDB), and
|
to inspect the state of your application while debugging.
|
||||||
internal JavaScript debugger. In the \uicontrol Debug mode, you
|
|
||||||
can inspect the state of your application while debugging.
|
|
||||||
|
|
||||||
Devices have limited memory and CPU power, so
|
Devices have limited memory and CPU power, so you should use them
|
||||||
you should use them carefully. \QC integrates Valgrind code
|
carefully. \QC integrates code analysis tools for detecting
|
||||||
analysis tools for detecting memory leaks and profiling function
|
memory leaks, profiling function execution, analyzing CPU use,
|
||||||
execution. In addition, the QML Profiler enables you to profile
|
and eliminating unnecessary complexity of code. Other tools
|
||||||
Qt Quick applications.
|
provide code coverage and visualize trace events.
|
||||||
|
|
||||||
\QC integrates the \l{Qt Test}, Boost.Test, Catch 2 test,
|
\QC integrates several testing frameworks for unit testing
|
||||||
and Google C++ Testing frameworks for unit testing applications
|
applications and libraries. You can use \QC to create, build,
|
||||||
and libraries. You can use \QC to create, build, and run
|
and run autotests.
|
||||||
autotests.
|
|
||||||
|
|
||||||
For more information, see \l{Testing}.
|
For more information, see \l{Testing}.
|
||||||
\li \b {Publishing}
|
\li \b {Publishing}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2019 The Qt Company Ltd.
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
|
|
||||||
\li \l{Analyzing Code}
|
\li \l{Analyzing Code}
|
||||||
|
|
||||||
\QC integrates Valgrind code analysis tools for detecting memory
|
Use tools for analyzing C++ and QML code to identify issues in
|
||||||
leaks and profiling function execution. You must download and
|
memory management, CPU usage, coding constructs, and so on. You
|
||||||
install them separately to use them from \QC. The QML Profiler is
|
must install and configure the tools on your system to use them
|
||||||
installed as part of \QC. It enables you to profile your Qt Quick
|
from \QC. However, the QML Profiler is installed as part of \QC
|
||||||
applications.
|
for profiling Qt Quick applications.
|
||||||
|
|
||||||
\li \l{Running Autotests}
|
\li \l{Running Autotests}
|
||||||
|
|
||||||
|
@@ -123,6 +123,10 @@
|
|||||||
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
|
The following video shows how to create a Qt Widgets application project:
|
||||||
|
|
||||||
|
\youtube FTSvDmcAgPI
|
||||||
|
|
||||||
For examples of creating different types of projects, see
|
For examples of creating different types of projects, see
|
||||||
\l{Tutorials}.
|
\l{Tutorials}.
|
||||||
|
|
||||||
|
@@ -255,7 +255,7 @@
|
|||||||
\list
|
\list
|
||||||
\li \l{Using the Help Mode}
|
\li \l{Using the Help Mode}
|
||||||
\li \l{FAQ}
|
\li \l{FAQ}
|
||||||
\li \l{How-tos}
|
\li \l{How-to}
|
||||||
\li \l{Known Issues}
|
\li \l{Known Issues}
|
||||||
\li \l{Glossary}
|
\li \l{Glossary}
|
||||||
\li \l{Technical Support}
|
\li \l{Technical Support}
|
||||||
|
@@ -103,7 +103,7 @@
|
|||||||
\list
|
\list
|
||||||
\li \l{Using the Help Mode}
|
\li \l{Using the Help Mode}
|
||||||
\li \l{FAQ}
|
\li \l{FAQ}
|
||||||
\li \l{How-tos}
|
\li \l{How-to}
|
||||||
\li \l{Known Issues}
|
\li \l{Known Issues}
|
||||||
\li \l{Glossary}
|
\li \l{Glossary}
|
||||||
\endlist
|
\endlist
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2022 The Qt Company Ltd.
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
@@ -18,102 +18,85 @@
|
|||||||
|
|
||||||
\title User Interface
|
\title User Interface
|
||||||
|
|
||||||
When you start \QC, it opens to the \uicontrol Welcome mode, where you can:
|
|
||||||
|
|
||||||
\list
|
|
||||||
\if defined(qtcreator)
|
\if defined(qtcreator)
|
||||||
\li Open recent sessions
|
When you start \QC, it opens to the \uicontrol Welcome mode.
|
||||||
\endif
|
|
||||||
|
|
||||||
\li Open recent projects
|
\image qtcreator-breakdown.png {Welcome mode}
|
||||||
|
|
||||||
\li Create and open projects
|
\table
|
||||||
|
\header
|
||||||
|
\li Number
|
||||||
|
\li UI Control
|
||||||
|
\li Purpose
|
||||||
|
\li Read More
|
||||||
|
\row
|
||||||
|
\li \inlineimage numbers/01.png
|
||||||
|
\li Mode selector
|
||||||
|
\li Perform a particular task, such as designing the UI, writing code, or
|
||||||
|
debugging the application.
|
||||||
|
\li \l{Selecting Modes}
|
||||||
|
\row
|
||||||
|
\li \inlineimage numbers/02.png
|
||||||
|
\li Kit selector
|
||||||
|
\li Select the appropriate \l{glossary-buildandrun-kit}{kit} for building
|
||||||
|
the project and running it on particular hardware.
|
||||||
|
\li \l{Activating Kits for a Project}
|
||||||
|
\row
|
||||||
|
\li \inlineimage numbers/03.png
|
||||||
|
\li Run button
|
||||||
|
\li Run the application on the selected target platform.
|
||||||
|
\li \l{Running on Multiple Platforms}
|
||||||
|
\row
|
||||||
|
\li \inlineimage numbers/04.png
|
||||||
|
\li Debug button
|
||||||
|
\li Debug the application on the selected target platform.
|
||||||
|
\li \l{Debugging}
|
||||||
|
\row
|
||||||
|
\li \inlineimage numbers/05.png
|
||||||
|
\li Build button
|
||||||
|
\li Build the application using the selected kit.
|
||||||
|
\li \l{Building for Multiple Platforms}
|
||||||
|
\row
|
||||||
|
\li \inlineimage numbers/06.png
|
||||||
|
\li Locator
|
||||||
|
\li Find a particular project, file, class, or function.
|
||||||
|
\li \l{Searching with the Locator}
|
||||||
|
\row
|
||||||
|
\li \inlineimage numbers/07.png
|
||||||
|
\li Output
|
||||||
|
\li View output from building, running, and other actions.
|
||||||
|
\li \l{Viewing Output}
|
||||||
|
\endtable
|
||||||
|
|
||||||
\li Open tutorials and example projects
|
To see where the above controls are in the UI, select
|
||||||
|
|
||||||
\if defined(qtcreator)
|
|
||||||
\li Browse Qt extensions in the \l{https://marketplace.qt.io/}
|
|
||||||
{Qt Marketplace}
|
|
||||||
\li Download the Qt Installer
|
|
||||||
\endif
|
|
||||||
|
|
||||||
\li Read news from the online community and Qt blogs
|
|
||||||
|
|
||||||
\li Create or manage a Qt Account
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\if defined(qtcreator)
|
|
||||||
\image qtcreator-breakdown.png
|
|
||||||
\else
|
|
||||||
\image studio-welcome-mode.png
|
|
||||||
\endif
|
|
||||||
|
|
||||||
\if defined(qtcreator)
|
|
||||||
Do you want to perform a particular task, such as designing the UI,
|
|
||||||
writing code, or debugging the application? Select the appropriate mode in
|
|
||||||
the \l{Selecting Modes}{mode selector} (1).
|
|
||||||
|
|
||||||
Are you ready to build the application for particular hardware or (5)
|
|
||||||
run (3) or debug (4) it on a device? Use the kit selector (2) to select
|
|
||||||
the appropriate \l{glossary-buildandrun-kit}{kit}. The task bar (7)
|
|
||||||
displays output from these actions.
|
|
||||||
|
|
||||||
Are you looking for a particular project, file, class, or function?
|
|
||||||
Start typing its name in the \l{Searching with the Locator}{locator} (6).
|
|
||||||
|
|
||||||
To see where the above controls are in the user interface, select
|
|
||||||
\uicontrol Help > \uicontrol {UI Tour}.
|
\uicontrol Help > \uicontrol {UI Tour}.
|
||||||
|
|
||||||
The following sections describe some \QC controls in more detail:
|
The following video shows the parts of the UI and the \uicontrol Welcome
|
||||||
|
mode:
|
||||||
|
|
||||||
\list
|
\youtube hOx3dod5-1A
|
||||||
\li \l{Selecting Modes}{Mode selector}
|
|
||||||
\li \l{Working with Sidebars}{Sidebars}
|
|
||||||
\li \l{Browsing Project Contents}{Views}
|
|
||||||
\li \l{Viewing Output}{Output}
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\else
|
|
||||||
You can use the \l{Selecting Modes}{mode selector} to switch to the
|
|
||||||
\l{Design Views}{Design mode} (1), where you will do
|
|
||||||
most of your work and the \l{Using the Help Mode}{Help} (2) mode, where
|
|
||||||
you can read the product documentation. The other modes are for more
|
|
||||||
advanced use, and you are likely to need them less often.
|
|
||||||
|
|
||||||
Below the mode selector, you can find shortcuts to some more advanced
|
|
||||||
functions, such as running the application or finding problems in the
|
|
||||||
QML code by debugging or profiling it.
|
|
||||||
\endif
|
|
||||||
|
|
||||||
\section1 What's New?
|
\section1 What's New?
|
||||||
|
|
||||||
For information about new features and bug fixes in each \QC release,
|
For information about new features and bug fixes in each \QC release,
|
||||||
select \uicontrol Help > \uicontrol {Change Log}.
|
select \uicontrol Help > \uicontrol {Change Log}.
|
||||||
|
|
||||||
\section1 For \macos Users
|
\sa {Working with Sidebars}, {Browsing Project Contents}
|
||||||
|
\sa {Use the UI}{How-to: Use the UI}
|
||||||
|
\else
|
||||||
|
When you start \QC, it opens to the \uicontrol Welcome mode, where you can:
|
||||||
|
|
||||||
\QC uses standard names and locations for standard features, such as
|
\list
|
||||||
\e preferences. In this manual, the names and locations on
|
\li Open recent projects
|
||||||
Windows and Linux are usually used to keep the instructions short. Here are
|
\li Create and open projects
|
||||||
some places to check if you cannot find a function, dialog, or keyboard
|
\li Open tutorials and example projects
|
||||||
shortcut on \macos when following the instructions:
|
\li Read news from the online community and Qt blogs
|
||||||
|
\li Create or manage a Qt Account
|
||||||
|
\endlist
|
||||||
|
|
||||||
\table
|
\image studio-welcome-mode.webp {Welcome mode}
|
||||||
\header
|
|
||||||
\li For
|
\endif
|
||||||
\li Look In
|
|
||||||
\row
|
|
||||||
\li \uicontrol Edit > \uicontrol Preferences
|
|
||||||
\li \uicontrol {\QC} > \uicontrol Preferences
|
|
||||||
\row
|
|
||||||
\li \uicontrol Help > \uicontrol {About Plugins}
|
|
||||||
\li \uicontrol {\QC} > \uicontrol {About Plugins}
|
|
||||||
\row
|
|
||||||
\li Keyboard shortcuts
|
|
||||||
\li \uicontrol {\QC} > \uicontrol Preferences > \uicontrol Environment >
|
|
||||||
\uicontrol Keyboard
|
|
||||||
\endtable
|
|
||||||
|
|
||||||
\if defined(qtdesignstudio)
|
\if defined(qtdesignstudio)
|
||||||
\section1 Customizing the Menu
|
\section1 Customizing the Menu
|
||||||
@@ -134,143 +117,26 @@
|
|||||||
|
|
||||||
You need to restart \QDS to apply changes made to these settings.
|
You need to restart \QDS to apply changes made to these settings.
|
||||||
|
|
||||||
\endif
|
\section1 Customizing the UI
|
||||||
|
|
||||||
\section1 Switching UI Themes
|
The following topics describe how to customize the UI:
|
||||||
|
|
||||||
Themes enable you to change the appearance of the UI from dark to light,
|
|
||||||
for example. To switch themes, select \uicontrol Edit > \uicontrol Preferences
|
|
||||||
> \uicontrol Environment, and then select a theme in the \uicontrol Theme
|
|
||||||
field.
|
|
||||||
|
|
||||||
\image qtcreator-preferences-environment-interface.webp {Interface preferences}
|
|
||||||
|
|
||||||
\section1 Changing Languages
|
|
||||||
|
|
||||||
\QC has several language versions. If the system language
|
|
||||||
is one of the supported languages, \QC selects it automatically. To
|
|
||||||
change the language, select \uicontrol Edit > \uicontrol Preferences >
|
|
||||||
\uicontrol Environment and select a language in the \uicontrol Language
|
|
||||||
field. Select \uicontrol {Restart Now} to restart \QC and have the change
|
|
||||||
take effect.
|
|
||||||
|
|
||||||
\section1 High DPI Scaling
|
|
||||||
|
|
||||||
The operating systems that \QC supports implement high dots-per-inch (DPI)
|
|
||||||
scaling at varying levels. Therefore, \QC handles high DPI scaling
|
|
||||||
differently on different operating systems:
|
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li On \macos, \QC forces high DPI scaling, which means that it allows
|
\li \l {Find menu items on \macos}
|
||||||
Qt to use the system scaling factor as the \QC scaling factor.
|
\li \l {Set high DPI scaling}
|
||||||
\li On Windows, if you do not set \l{High DPI}
|
\li \l {Switch UI themes}
|
||||||
{scaling environment variables}, \QC instructs Qt to detect the
|
|
||||||
scaling factor and use it as the \QC scaling factor.
|
|
||||||
\li On Linux, \QC leaves it to the user to enable high DPI scaling
|
|
||||||
because the process varies so much on different distributions
|
|
||||||
and windowing systems that it cannot be reliably done automatically.
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
To override the default approach and always enable high-DPI scaling, select
|
|
||||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol Environment >
|
|
||||||
\uicontrol {Enable high DPI scaling}. The changes will take effect after you
|
|
||||||
restart \QC.
|
|
||||||
|
|
||||||
\section1 Navigating with Keyboard
|
|
||||||
|
|
||||||
\QC caters not only to those users who like to use the mouse, but also
|
|
||||||
to those who are more comfortable with the keyboard. A wide range of
|
|
||||||
\l{keyboard-shortcuts}{keyboard} and \l{Searching with the Locator}
|
|
||||||
{navigation} shortcuts are available to help you work faster.
|
|
||||||
|
|
||||||
\if defined(qtcreator)
|
|
||||||
\section1 Useful Features
|
|
||||||
|
|
||||||
For a list of useful \QC features described in other parts of the
|
|
||||||
documentation, see \l{How-tos}.
|
|
||||||
\endif
|
|
||||||
|
|
||||||
\section1 Viewing Images
|
\section1 Viewing Images
|
||||||
|
|
||||||
\QC opens image files in the image viewer.
|
The following topics describe how to use the image viewer:
|
||||||
|
|
||||||
\image qtcreator-image-viewer.png "Image viewer"
|
|
||||||
|
|
||||||
Use the toolbar buttons or \l{Keyboard Shortcuts}{keyboard shortcuts} to:
|
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li \inlineimage icons/export.png
|
\li \l {Export SVG images}
|
||||||
- Export SVG images to pixmaps or copy an image as a data URL, which
|
\li \l {View images}
|
||||||
enables you to include it in web pages as if it were an external
|
|
||||||
resource
|
|
||||||
\li \inlineimage icons/original-size.png
|
|
||||||
- Return images to their original size
|
|
||||||
\li \inlineimage icons/zoom-in.png
|
|
||||||
- Zoom in and out (\inlineimage icons/zoom-out.png
|
|
||||||
)
|
|
||||||
\li \inlineimage icons/run_small.png
|
|
||||||
- Play and pause animated GIF and MNG images
|
|
||||||
\li \inlineimage icons/qtcreator-desktopdevice-button.png
|
|
||||||
- Show and hide the image background
|
|
||||||
\li \inlineimage icons/switch-outline.png
|
|
||||||
- Show and hide the image outline
|
|
||||||
\li \inlineimage icons/fittoview.png
|
|
||||||
- Fit images to screen
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
Select \uicontrol {Set as Default} to use the current settings for the
|
|
||||||
background and outline modes and fitting images to screen as default
|
|
||||||
values for the image viewer.
|
|
||||||
|
|
||||||
\section2 Exporting SVG Images
|
|
||||||
|
|
||||||
If you have a freely scalable icon in the SVG format,
|
|
||||||
you can export it to several images of different sizes to create a set of
|
|
||||||
pixmaps.
|
|
||||||
\if defined(qtcreator)
|
|
||||||
You can then use QIcon::addPixmap() to add the pixmaps to icons in
|
|
||||||
different modes and states.
|
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
\if defined(qtcreator)
|
|
||||||
\section1 Location of Settings Files
|
|
||||||
|
|
||||||
\QC creates the following files and directories:
|
|
||||||
|
|
||||||
\list
|
|
||||||
|
|
||||||
\li QtCreator.db
|
|
||||||
|
|
||||||
\li QtCreator.ini
|
|
||||||
|
|
||||||
\li qtversion.xml
|
|
||||||
|
|
||||||
\li toolChains.xml
|
|
||||||
|
|
||||||
\li qtcreator
|
|
||||||
|
|
||||||
\li qtc-qmldump
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
The location of the above files and directories depends on the platform:
|
|
||||||
|
|
||||||
\list
|
|
||||||
|
|
||||||
\li On Linux and other Unix platforms, look in
|
|
||||||
\c {~/.config/QtProject} and
|
|
||||||
\c {~/.local/share/data/QtProject/qtcreator}.
|
|
||||||
|
|
||||||
\li On \macos, look in \c {~/.config/QtProject} and
|
|
||||||
\c {~/Library/Application Support/QtProject/Qt Creator}.
|
|
||||||
|
|
||||||
\li On Windows, look in
|
|
||||||
\c {%appdata%\QtProject} and \c {%localappdata%\QtProject}.
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
\endif
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@@ -24,6 +24,11 @@
|
|||||||
Generally, the integrated \QD has the same functions as the standalone
|
Generally, the integrated \QD has the same functions as the standalone
|
||||||
\QD. The following sections describe the differences.
|
\QD. The following sections describe the differences.
|
||||||
|
|
||||||
|
The following video shows how to use the integrated \QD to create a small Qt
|
||||||
|
Widgets-based application:
|
||||||
|
|
||||||
|
\youtube LnVjI0I7cKs
|
||||||
|
|
||||||
\section1 Code Editor Integration
|
\section1 Code Editor Integration
|
||||||
|
|
||||||
To switch between forms (\uicontrol Design mode) and code (\uicontrol Edit mode),
|
To switch between forms (\uicontrol Design mode) and code (\uicontrol Edit mode),
|
||||||
|
@@ -87,19 +87,75 @@
|
|||||||
element. You can also add descriptive text to the UI that is always
|
element. You can also add descriptive text to the UI that is always
|
||||||
visible.
|
visible.
|
||||||
|
|
||||||
|
Consider adding tooltips for all UI elements that are not obvious from
|
||||||
|
the context. The tooltips should help users understand what the UI controls
|
||||||
|
do, so try to make them as clear as possible, even if they get a bit long.
|
||||||
|
|
||||||
|
\section3 Tooltips for Icons
|
||||||
|
|
||||||
For an icon, you can use the command name as a tool tip. In that
|
For an icon, you can use the command name as a tool tip. In that
|
||||||
case, use book style capitalization and do not add a period after the tool
|
case, use book style capitalization and do not add a period after the tool
|
||||||
tip.
|
tip.
|
||||||
|
|
||||||
\image qtcreator-tooltip.png {Tooltip}
|
\image qtcreator-tooltip.png {Tooltip}
|
||||||
|
|
||||||
Tooltips can also contain full sentences. Try to make them as short and
|
\section3 Other Tooltips
|
||||||
concise as possible, while still making them grammatically correct. Use
|
|
||||||
sentence style capitalization and punctuation as you would for any
|
Tooltips can also contain full sentences.
|
||||||
sentence.
|
|
||||||
|
|
||||||
\image qtcreator-tooltip-long.png {Sentence as a tooltip}
|
\image qtcreator-tooltip-long.png {Sentence as a tooltip}
|
||||||
|
|
||||||
|
Follow these guidelines:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li Write useful tooltips, but keep them as short and concise as
|
||||||
|
possible.
|
||||||
|
\li To help people who localize and people for whom English is a second
|
||||||
|
language, make tooltips as grammatically clear as possible. Use the
|
||||||
|
articles a, an, and the, prepositions, such as of, and demonstrative
|
||||||
|
pronouns, such as this and that, wherever possible.
|
||||||
|
\li Use sentence style capitalization and punctuation as you would for
|
||||||
|
any sentence.
|
||||||
|
\li For input fields, describe the value of the field. Tell users what
|
||||||
|
they can enter in the field, such as a name or a path, unless it is
|
||||||
|
obvious from the context. Use a noun phrase, such as \e {The name of
|
||||||
|
the user account.} Describe limitations and special requirements.
|
||||||
|
\li For actions, such as most check boxes, radio buttons, push buttons,
|
||||||
|
and menu items, describe what happens when users select them. Use a
|
||||||
|
verb phrase, such as \e {Removes trailing whitespace upon saving.}
|
||||||
|
\li For combo boxes, describe when to pick each option.
|
||||||
|
\li Describe what the UI control does, not how to use it. If the control
|
||||||
|
does not work as users would expect it to, check your design, as you
|
||||||
|
most likely chose the wrong type of control.
|
||||||
|
\li Do not describe the default value or the minimum and maximum values,
|
||||||
|
as users can see them in the field.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section3 Examples
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Control
|
||||||
|
\li Do
|
||||||
|
\li Don't
|
||||||
|
\row
|
||||||
|
\li Button - \uicontrol {Download Definitions}
|
||||||
|
\li Download missing and update existing syntax definition files.
|
||||||
|
\li You can select this button to download syntax definition files.
|
||||||
|
\row
|
||||||
|
\li Check box - \uicontrol {Clean whitespace}
|
||||||
|
\li Removes trailing whitespace upon saving.
|
||||||
|
\li Enable this check box to remove trailing whitespace upon saving.
|
||||||
|
\row
|
||||||
|
\li Combo box - \uicontrol Size
|
||||||
|
\li The font size used in the terminal (in points).
|
||||||
|
\li Use the up and down arrows to set the font size between 1 and 100.
|
||||||
|
\row
|
||||||
|
\li Field - \uicontrol {Shell arguments}
|
||||||
|
\li The arguments to be passed to the shell.
|
||||||
|
\li Sets the arguments to be passed to the shell.
|
||||||
|
\endtable
|
||||||
|
|
||||||
\section3 Writing Tooltips in Design Mode
|
\section3 Writing Tooltips in Design Mode
|
||||||
|
|
||||||
In Qt Designer, use plain text for tooltips. For extra formatting, write
|
In Qt Designer, use plain text for tooltips. For extra formatting, write
|
||||||
@@ -166,9 +222,11 @@
|
|||||||
|
|
||||||
\section3 Checking Book Style Capitalization
|
\section3 Checking Book Style Capitalization
|
||||||
|
|
||||||
You can use the to-title-case.js script in the \c{\doc\titlecase}
|
If necessary, use an online \l{https://titlecaseconverter.com/}
|
||||||
folder to check book style capitalization of UI text or headings in
|
{Title Case Converter} to check book style capitalization
|
||||||
documentation:
|
of UI text or headings in documentation.
|
||||||
|
|
||||||
|
Or, use the to-title-case.js script in the \c{\doc\titlecase} folder:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 102 KiB |
BIN
doc/qtdesignstudio/images/studio-welcome-mode.webp
Normal file
After Width: | Height: | Size: 48 KiB |
@@ -1386,7 +1386,7 @@ class DumperBase():
|
|||||||
self.putExpandable()
|
self.putExpandable()
|
||||||
return
|
return
|
||||||
|
|
||||||
if DisplayFormat.Array10 <= displayFormat and displayFormat <= DisplayFormat.Array1000:
|
if DisplayFormat.Array10 <= displayFormat and displayFormat <= DisplayFormat.Array10000:
|
||||||
n = (10, 100, 1000, 10000)[displayFormat - DisplayFormat.Array10]
|
n = (10, 100, 1000, 10000)[displayFormat - DisplayFormat.Array10]
|
||||||
self.putType(typeName)
|
self.putType(typeName)
|
||||||
self.putItemCount(n)
|
self.putItemCount(n)
|
||||||
|
@@ -1518,7 +1518,15 @@ void BoolAspect::setLabelPlacement(BoolAspect::LabelPlacement labelPlacement)
|
|||||||
d->m_labelPlacement = labelPlacement;
|
d->m_labelPlacement = labelPlacement;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckableDecider BoolAspect::checkableDecider()
|
CheckableDecider BoolAspect::askAgainCheckableDecider()
|
||||||
|
{
|
||||||
|
return CheckableDecider(
|
||||||
|
[this] { return value(); },
|
||||||
|
[this] { setValue(true); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckableDecider BoolAspect::doNotAskAgainCheckableDecider()
|
||||||
{
|
{
|
||||||
return CheckableDecider(
|
return CheckableDecider(
|
||||||
[this] { return !value(); },
|
[this] { return !value(); },
|
||||||
|
@@ -325,7 +325,9 @@ public:
|
|||||||
|
|
||||||
void addToLayout(Layouting::LayoutItem &parent) override;
|
void addToLayout(Layouting::LayoutItem &parent) override;
|
||||||
std::function<void(QObject *)> groupChecker();
|
std::function<void(QObject *)> groupChecker();
|
||||||
Utils::CheckableDecider checkableDecider();
|
|
||||||
|
Utils::CheckableDecider askAgainCheckableDecider();
|
||||||
|
Utils::CheckableDecider doNotAskAgainCheckableDecider();
|
||||||
|
|
||||||
QAction *action() override;
|
QAction *action() override;
|
||||||
|
|
||||||
|
@@ -305,6 +305,8 @@ static void addItemToFlowLayout(FlowLayout *layout, const ResultItem &item)
|
|||||||
// layout->addStretch(item.stretch);
|
// layout->addStretch(item.stretch);
|
||||||
// } else if (item.space != -1) {
|
// } else if (item.space != -1) {
|
||||||
// layout->addSpacing(item.space);
|
// layout->addSpacing(item.space);
|
||||||
|
} else if (item.empty) {
|
||||||
|
// Nothing to do, but no reason to warn, either
|
||||||
} else if (!item.text.isEmpty()) {
|
} else if (!item.text.isEmpty()) {
|
||||||
layout->addWidget(createLabel(item.text));
|
layout->addWidget(createLabel(item.text));
|
||||||
} else {
|
} else {
|
||||||
|
@@ -280,8 +280,10 @@ void TerminalInterface::sendCommand(char c)
|
|||||||
void TerminalInterface::killInferiorProcess()
|
void TerminalInterface::killInferiorProcess()
|
||||||
{
|
{
|
||||||
sendCommand('k');
|
sendCommand('k');
|
||||||
if (d->stubSocket)
|
if (d->stubSocket) {
|
||||||
d->stubSocket->waitForReadyRead();
|
d->stubSocket->waitForReadyRead();
|
||||||
|
emitFinished(-1, QProcess::CrashExit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TerminalInterface::killStubProcess()
|
void TerminalInterface::killStubProcess()
|
||||||
|
@@ -27,6 +27,7 @@ const char ANDROID_KIT_NDK[] = "Android.NDK";
|
|||||||
const char ANDROID_KIT_SDK[] = "Android.SDK";
|
const char ANDROID_KIT_SDK[] = "Android.SDK";
|
||||||
|
|
||||||
const char ANDROID_BUILD_DIRECTORY[] = "android-build";
|
const char ANDROID_BUILD_DIRECTORY[] = "android-build";
|
||||||
|
const char ANDROID_APP_PROCESS_DIRECTORY[] = "android-app-process";
|
||||||
const char JAVA_EDITOR_ID[] = "java.editor";
|
const char JAVA_EDITOR_ID[] = "java.editor";
|
||||||
const char JLS_SETTINGS_ID[] = "Java::JLSSettingsID";
|
const char JLS_SETTINGS_ID[] = "Java::JLSSettingsID";
|
||||||
const char JAVA_MIMETYPE[] = "text/x-java";
|
const char JAVA_MIMETYPE[] = "text/x-java";
|
||||||
|
@@ -138,7 +138,7 @@ void AndroidDebugSupport::start()
|
|||||||
FilePath::removeDuplicates(solibSearchPath);
|
FilePath::removeDuplicates(solibSearchPath);
|
||||||
setSolibSearchPath(solibSearchPath);
|
setSolibSearchPath(solibSearchPath);
|
||||||
qCDebug(androidDebugSupportLog).noquote() << "SoLibSearchPath: " << solibSearchPath;
|
qCDebug(androidDebugSupportLog).noquote() << "SoLibSearchPath: " << solibSearchPath;
|
||||||
setSymbolFile(buildDir.pathAppended("app_process"));
|
setSymbolFile(AndroidManager::androidAppProcessDir(target).pathAppended("app_process"));
|
||||||
setSkipExecutableValidation(true);
|
setSkipExecutableValidation(true);
|
||||||
setUseExtendedRemote(true);
|
setUseExtendedRemote(true);
|
||||||
QString devicePreferredAbi = AndroidManager::apkDevicePreferredAbi(target);
|
QString devicePreferredAbi = AndroidManager::apkDevicePreferredAbi(target);
|
||||||
|
@@ -512,6 +512,13 @@ void AndroidDeployQtStep::runImpl(QPromise<bool> &promise)
|
|||||||
itr.value().removeFile();
|
itr.value().removeFile();
|
||||||
|
|
||||||
for (auto itr = m_filesToPull.constBegin(); itr != m_filesToPull.constEnd(); ++itr) {
|
for (auto itr = m_filesToPull.constBegin(); itr != m_filesToPull.constEnd(); ++itr) {
|
||||||
|
const FilePath parentDir = itr.value().parentDir();
|
||||||
|
if (!parentDir.ensureWritableDir()) {
|
||||||
|
const QString error = QString("Package deploy: Unable to create directory %1.")
|
||||||
|
.arg(parentDir.nativePath());
|
||||||
|
reportWarningOrError(error, Task::Error);
|
||||||
|
}
|
||||||
|
|
||||||
runCommand({m_adbPath,
|
runCommand({m_adbPath,
|
||||||
AndroidDeviceInfo::adbSelector(m_serialNumber)
|
AndroidDeviceInfo::adbSelector(m_serialNumber)
|
||||||
<< "pull" << itr.key() << itr.value().nativePath()});
|
<< "pull" << itr.key() << itr.value().nativePath()});
|
||||||
@@ -528,7 +535,7 @@ void AndroidDeployQtStep::runImpl(QPromise<bool> &promise)
|
|||||||
void AndroidDeployQtStep::gatherFilesToPull()
|
void AndroidDeployQtStep::gatherFilesToPull()
|
||||||
{
|
{
|
||||||
m_filesToPull.clear();
|
m_filesToPull.clear();
|
||||||
const FilePath buildDir = AndroidManager::buildDirectory(target());
|
const FilePath appProcessDir = AndroidManager::androidAppProcessDir(target());
|
||||||
|
|
||||||
if (!m_deviceInfo.isValid())
|
if (!m_deviceInfo.isValid())
|
||||||
return;
|
return;
|
||||||
@@ -538,16 +545,16 @@ void AndroidDeployQtStep::gatherFilesToPull()
|
|||||||
const QString preferredAbi = AndroidManager::apkDevicePreferredAbi(target());
|
const QString preferredAbi = AndroidManager::apkDevicePreferredAbi(target());
|
||||||
if (preferredAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A
|
if (preferredAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A
|
||||||
|| preferredAbi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) {
|
|| preferredAbi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) {
|
||||||
m_filesToPull["/system/bin/app_process64"] = buildDir / "app_process";
|
m_filesToPull["/system/bin/app_process64"] = appProcessDir / "app_process";
|
||||||
libDirName = "lib64";
|
libDirName = "lib64";
|
||||||
linkerName = "linker64";
|
linkerName = "linker64";
|
||||||
} else {
|
} else {
|
||||||
m_filesToPull["/system/bin/app_process32"] = buildDir / "app_process";
|
m_filesToPull["/system/bin/app_process32"] = appProcessDir / "app_process";
|
||||||
m_filesToPull["/system/bin/app_process"] = buildDir / "app_process";
|
m_filesToPull["/system/bin/app_process"] = appProcessDir / "app_process";
|
||||||
}
|
}
|
||||||
|
|
||||||
m_filesToPull["/system/bin/" + linkerName] = buildDir / linkerName;
|
m_filesToPull["/system/bin/" + linkerName] = appProcessDir / linkerName;
|
||||||
m_filesToPull["/system/" + libDirName + "/libc.so"] = buildDir / "libc.so";
|
m_filesToPull["/system/" + libDirName + "/libc.so"] = appProcessDir / "libc.so";
|
||||||
|
|
||||||
for (auto itr = m_filesToPull.constBegin(); itr != m_filesToPull.constEnd(); ++itr)
|
for (auto itr = m_filesToPull.constBegin(); itr != m_filesToPull.constEnd(); ++itr)
|
||||||
qCDebug(deployStepLog).noquote() << "Pulling file from device:" << itr.key()
|
qCDebug(deployStepLog).noquote() << "Pulling file from device:" << itr.key()
|
||||||
|
@@ -229,6 +229,11 @@ FilePath AndroidManager::androidBuildDirectory(const Target *target)
|
|||||||
return buildDirectory(target) / Constants::ANDROID_BUILD_DIRECTORY;
|
return buildDirectory(target) / Constants::ANDROID_BUILD_DIRECTORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FilePath AndroidManager::androidAppProcessDir(const Target *target)
|
||||||
|
{
|
||||||
|
return buildDirectory(target) / Constants::ANDROID_APP_PROCESS_DIRECTORY;
|
||||||
|
}
|
||||||
|
|
||||||
bool AndroidManager::isQt5CmakeProject(const ProjectExplorer::Target *target)
|
bool AndroidManager::isQt5CmakeProject(const ProjectExplorer::Target *target)
|
||||||
{
|
{
|
||||||
const QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
const QtSupport::QtVersion *qt = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||||
|
@@ -74,6 +74,7 @@ public:
|
|||||||
static bool isQt5CmakeProject(const ProjectExplorer::Target *target);
|
static bool isQt5CmakeProject(const ProjectExplorer::Target *target);
|
||||||
|
|
||||||
static Utils::FilePath androidBuildDirectory(const ProjectExplorer::Target *target);
|
static Utils::FilePath androidBuildDirectory(const ProjectExplorer::Target *target);
|
||||||
|
static Utils::FilePath androidAppProcessDir(const ProjectExplorer::Target *target);
|
||||||
static Utils::FilePath buildDirectory(const ProjectExplorer::Target *target);
|
static Utils::FilePath buildDirectory(const ProjectExplorer::Target *target);
|
||||||
static Utils::FilePath manifestPath(const ProjectExplorer::Target *target);
|
static Utils::FilePath manifestPath(const ProjectExplorer::Target *target);
|
||||||
static void setManifestPath(ProjectExplorer::Target *target, const Utils::FilePath &path);
|
static void setManifestPath(ProjectExplorer::Target *target, const Utils::FilePath &path);
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
#include "testresultmodel.h"
|
#include "testresultmodel.h"
|
||||||
|
|
||||||
#include "autotesticons.h"
|
#include "autotesticons.h"
|
||||||
|
#include "testresultspane.h"
|
||||||
#include "testrunner.h"
|
#include "testrunner.h"
|
||||||
#include "testsettings.h"
|
#include "testsettings.h"
|
||||||
#include "testtreeitem.h"
|
#include "testtreeitem.h"
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
|
|
||||||
#include <QFontMetrics>
|
#include <QFontMetrics>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
@@ -185,6 +187,17 @@ TestResultItem *TestResultItem::createAndAddIntermediateFor(const TestResultItem
|
|||||||
result.setResult(ResultType::TestStart);
|
result.setResult(ResultType::TestStart);
|
||||||
TestResultItem *intermediate = new TestResultItem(result);
|
TestResultItem *intermediate = new TestResultItem(result);
|
||||||
appendChild(intermediate);
|
appendChild(intermediate);
|
||||||
|
// FIXME: make the expand button's state easier accessible
|
||||||
|
auto widgets = TestResultsPane::instance()->toolBarWidgets();
|
||||||
|
if (!widgets.empty()) {
|
||||||
|
if (QToolButton *expand = qobject_cast<QToolButton *>(widgets.at(0))) {
|
||||||
|
if (expand->isChecked()) {
|
||||||
|
QMetaObject::invokeMethod(TestResultsPane::instance(),
|
||||||
|
[intermediate] { intermediate->expand(); },
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return intermediate;
|
return intermediate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -978,6 +978,12 @@ MessageId ClangdClient::requestSymbolInfo(const Utils::FilePath &filePath, const
|
|||||||
return symReq.id();
|
return symReq.id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
ClangdFollowSymbol *ClangdClient::currentFollowSymbolOperation()
|
||||||
|
{
|
||||||
|
return d->followSymbol;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void ClangdClient::followSymbol(TextDocument *document,
|
void ClangdClient::followSymbol(TextDocument *document,
|
||||||
const QTextCursor &cursor,
|
const QTextCursor &cursor,
|
||||||
@@ -990,8 +996,8 @@ void ClangdClient::followSymbol(TextDocument *document,
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(documentOpen(document), openDocument(document));
|
QTC_ASSERT(documentOpen(document), openDocument(document));
|
||||||
|
|
||||||
delete d->followSymbol;
|
if (d->followSymbol)
|
||||||
d->followSymbol = nullptr;
|
d->followSymbol->cancel();
|
||||||
|
|
||||||
const QTextCursor adjustedCursor = d->adjustedCursor(cursor, document);
|
const QTextCursor adjustedCursor = d->adjustedCursor(cursor, document);
|
||||||
if (followTo == FollowTo::SymbolDef && !resolveTarget) {
|
if (followTo == FollowTo::SymbolDef && !resolveTarget) {
|
||||||
@@ -1001,12 +1007,14 @@ void ClangdClient::followSymbol(TextDocument *document,
|
|||||||
|
|
||||||
qCDebug(clangdLog) << "follow symbol requested" << document->filePath()
|
qCDebug(clangdLog) << "follow symbol requested" << document->filePath()
|
||||||
<< adjustedCursor.blockNumber() << adjustedCursor.positionInBlock();
|
<< adjustedCursor.blockNumber() << adjustedCursor.positionInBlock();
|
||||||
d->followSymbol = new ClangdFollowSymbol(this, adjustedCursor, editorWidget, document, callback,
|
auto clangdFollowSymbol = new ClangdFollowSymbol(this, adjustedCursor, editorWidget, document,
|
||||||
followTo, openInSplit);
|
callback, followTo, openInSplit);
|
||||||
connect(d->followSymbol, &ClangdFollowSymbol::done, this, [this] {
|
connect(clangdFollowSymbol, &ClangdFollowSymbol::done, this, [this, clangdFollowSymbol] {
|
||||||
d->followSymbol->deleteLater();
|
clangdFollowSymbol->deleteLater();
|
||||||
|
if (clangdFollowSymbol == d->followSymbol)
|
||||||
d->followSymbol = nullptr;
|
d->followSymbol = nullptr;
|
||||||
});
|
});
|
||||||
|
d->followSymbol = clangdFollowSymbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClangdClient::switchDeclDef(TextDocument *document, const QTextCursor &cursor,
|
void ClangdClient::switchDeclDef(TextDocument *document, const QTextCursor &cursor,
|
||||||
|
@@ -37,6 +37,8 @@ void setupClangdConfigFile();
|
|||||||
|
|
||||||
enum class FollowTo { SymbolDef, SymbolType };
|
enum class FollowTo { SymbolDef, SymbolType };
|
||||||
|
|
||||||
|
class ClangdFollowSymbol;
|
||||||
|
|
||||||
class ClangdClient : public LanguageClient::Client
|
class ClangdClient : public LanguageClient::Client
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -117,6 +119,10 @@ public:
|
|||||||
const LanguageServerProtocol::Position &position,
|
const LanguageServerProtocol::Position &position,
|
||||||
const SymbolInfoHandler &handler);
|
const SymbolInfoHandler &handler);
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
ClangdFollowSymbol *currentFollowSymbolOperation();
|
||||||
|
#endif
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void indexingFinished();
|
void indexingFinished();
|
||||||
void foundReferences(const Utils::SearchResultItems &items);
|
void foundReferences(const Utils::SearchResultItems &items);
|
||||||
|
@@ -90,6 +90,7 @@ public:
|
|||||||
void closeTempDocuments();
|
void closeTempDocuments();
|
||||||
bool addOpenFile(const FilePath &filePath);
|
bool addOpenFile(const FilePath &filePath);
|
||||||
bool defLinkIsAmbiguous() const;
|
bool defLinkIsAmbiguous() const;
|
||||||
|
void cancel();
|
||||||
|
|
||||||
ClangdFollowSymbol * const q;
|
ClangdFollowSymbol * const q;
|
||||||
ClangdClient * const client;
|
ClangdClient * const client;
|
||||||
@@ -169,18 +170,17 @@ ClangdFollowSymbol::ClangdFollowSymbol(ClangdClient *client, const QTextCursor &
|
|||||||
|
|
||||||
ClangdFollowSymbol::~ClangdFollowSymbol()
|
ClangdFollowSymbol::~ClangdFollowSymbol()
|
||||||
{
|
{
|
||||||
d->closeTempDocuments();
|
d->cancel();
|
||||||
if (d->virtualFuncAssistProcessor)
|
|
||||||
d->virtualFuncAssistProcessor->resetData(false);
|
|
||||||
for (const MessageId &id : std::as_const(d->pendingSymbolInfoRequests))
|
|
||||||
d->client->cancelRequest(id);
|
|
||||||
for (const MessageId &id : std::as_const(d->pendingGotoImplRequests))
|
|
||||||
d->client->cancelRequest(id);
|
|
||||||
for (const MessageId &id : std::as_const(d->pendingGotoDefRequests))
|
|
||||||
d->client->cancelRequest(id);
|
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClangdFollowSymbol::cancel()
|
||||||
|
{
|
||||||
|
d->cancel();
|
||||||
|
clear();
|
||||||
|
emitDone();
|
||||||
|
}
|
||||||
|
|
||||||
void ClangdFollowSymbol::clear()
|
void ClangdFollowSymbol::clear()
|
||||||
{
|
{
|
||||||
d->openedFiles.clear();
|
d->openedFiles.clear();
|
||||||
@@ -221,6 +221,19 @@ bool ClangdFollowSymbol::Private::defLinkIsAmbiguous() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClangdFollowSymbol::Private::cancel()
|
||||||
|
{
|
||||||
|
closeTempDocuments();
|
||||||
|
if (virtualFuncAssistProcessor)
|
||||||
|
virtualFuncAssistProcessor->resetData(false);
|
||||||
|
for (const MessageId &id : std::as_const(pendingSymbolInfoRequests))
|
||||||
|
client->cancelRequest(id);
|
||||||
|
for (const MessageId &id : std::as_const(pendingGotoImplRequests))
|
||||||
|
client->cancelRequest(id);
|
||||||
|
for (const MessageId &id : std::as_const(pendingGotoDefRequests))
|
||||||
|
client->cancelRequest(id);
|
||||||
|
}
|
||||||
|
|
||||||
bool ClangdFollowSymbol::Private::addOpenFile(const FilePath &filePath)
|
bool ClangdFollowSymbol::Private::addOpenFile(const FilePath &filePath)
|
||||||
{
|
{
|
||||||
return openedFiles.insert(filePath).second;
|
return openedFiles.insert(filePath).second;
|
||||||
|
@@ -28,6 +28,7 @@ public:
|
|||||||
TextEditor::TextDocument *document, const Utils::LinkHandler &callback,
|
TextEditor::TextDocument *document, const Utils::LinkHandler &callback,
|
||||||
FollowTo followTo, bool openInSplit);
|
FollowTo followTo, bool openInSplit);
|
||||||
~ClangdFollowSymbol();
|
~ClangdFollowSymbol();
|
||||||
|
void cancel();
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
#include "clangdtests.h"
|
#include "clangdtests.h"
|
||||||
|
|
||||||
#include "../clangdclient.h"
|
#include "../clangdclient.h"
|
||||||
|
#include "../clangdfollowsymbol.h"
|
||||||
#include "../clangmodelmanagersupport.h"
|
#include "../clangmodelmanagersupport.h"
|
||||||
|
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
@@ -428,6 +429,37 @@ void ClangdTestFollowSymbol::test()
|
|||||||
QCOMPARE(actualLink.targetColumn + 1, targetColumn);
|
QCOMPARE(actualLink.targetColumn + 1, targetColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure it is safe to call follow symbol in a follow symbol handler. Since follow symbol
|
||||||
|
// potentially opens a file that gets loaded in chunks which handles user events inbetween
|
||||||
|
// the chunks we can potentially call a follow symbol while currently handling another one.
|
||||||
|
void ClangdTestFollowSymbol::testFollowSymbolInHandler()
|
||||||
|
{
|
||||||
|
TextEditor::TextDocument *const doc = document("header.h");
|
||||||
|
QVERIFY(doc);
|
||||||
|
QTimer timer;
|
||||||
|
timer.setSingleShot(true);
|
||||||
|
QEventLoop loop;
|
||||||
|
QTextCursor cursor(doc->document());
|
||||||
|
const int pos = Text::positionInText(doc->document(), 48, 9);
|
||||||
|
cursor.setPosition(pos);
|
||||||
|
QObject::connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
|
||||||
|
|
||||||
|
bool deleted = false;
|
||||||
|
|
||||||
|
const auto handler = [&](const Link &) {
|
||||||
|
client()->followSymbol(doc, cursor, nullptr, [&](const Link &) { loop.quit(); }, true,
|
||||||
|
FollowTo::SymbolDef, false);
|
||||||
|
QVERIFY(!deleted);
|
||||||
|
};
|
||||||
|
|
||||||
|
client()->followSymbol(doc, cursor, nullptr, handler, true, FollowTo::SymbolDef, false);
|
||||||
|
QVERIFY(client()->currentFollowSymbolOperation());
|
||||||
|
connect(client()->currentFollowSymbolOperation(), &QObject::destroyed, [&] { deleted = true; });
|
||||||
|
timer.start(10000);
|
||||||
|
loop.exec();
|
||||||
|
QVERIFY(timer.isActive());
|
||||||
|
timer.stop();
|
||||||
|
}
|
||||||
|
|
||||||
ClangdTestLocalReferences::ClangdTestLocalReferences()
|
ClangdTestLocalReferences::ClangdTestLocalReferences()
|
||||||
{
|
{
|
||||||
|
@@ -86,6 +86,7 @@ public:
|
|||||||
private slots:
|
private slots:
|
||||||
void test_data();
|
void test_data();
|
||||||
void test();
|
void test();
|
||||||
|
void testFollowSymbolInHandler();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClangdTestLocalReferences : public ClangdTest
|
class ClangdTestLocalReferences : public ClangdTest
|
||||||
|
@@ -594,7 +594,7 @@ void CMakeBuildSettingsWidget::reconfigureWithInitialParameters()
|
|||||||
Core::ICore::dialogParent(),
|
Core::ICore::dialogParent(),
|
||||||
Tr::tr("Re-configure with Initial Parameters"),
|
Tr::tr("Re-configure with Initial Parameters"),
|
||||||
Tr::tr("Clear CMake configuration and configure with initial parameters?"),
|
Tr::tr("Clear CMake configuration and configure with initial parameters?"),
|
||||||
settings->askBeforeReConfigureInitialParams.checkableDecider(),
|
settings->askBeforeReConfigureInitialParams.askAgainCheckableDecider(),
|
||||||
QMessageBox::Yes | QMessageBox::No,
|
QMessageBox::Yes | QMessageBox::No,
|
||||||
QMessageBox::Yes);
|
QMessageBox::Yes);
|
||||||
|
|
||||||
|
@@ -238,7 +238,7 @@ void CMakeManager::reloadCMakePresets()
|
|||||||
Tr::tr("Reload CMake Presets"),
|
Tr::tr("Reload CMake Presets"),
|
||||||
Tr::tr("Re-generates the kits that were created for CMake presets. All manual "
|
Tr::tr("Re-generates the kits that were created for CMake presets. All manual "
|
||||||
"modifications to the CMake project settings will be lost."),
|
"modifications to the CMake project settings will be lost."),
|
||||||
settings->askBeforePresetsReload.checkableDecider(),
|
settings->askBeforePresetsReload.askAgainCheckableDecider(),
|
||||||
QMessageBox::Yes | QMessageBox::Cancel,
|
QMessageBox::Yes | QMessageBox::Cancel,
|
||||||
QMessageBox::Yes,
|
QMessageBox::Yes,
|
||||||
QMessageBox::Yes,
|
QMessageBox::Yes,
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "cmakeprojectconstants.h"
|
#include "cmakeprojectconstants.h"
|
||||||
#include "cmakeprojectmanagertr.h"
|
#include "cmakeprojectmanagertr.h"
|
||||||
#include "cmakeprojectplugin.h"
|
|
||||||
#include "cmakespecificsettings.h"
|
#include "cmakespecificsettings.h"
|
||||||
#include "fileapiparser.h"
|
#include "fileapiparser.h"
|
||||||
#include "projecttreehelper.h"
|
#include "projecttreehelper.h"
|
||||||
@@ -21,6 +20,7 @@
|
|||||||
#include <projectexplorer/projecttree.h>
|
#include <projectexplorer/projecttree.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
@@ -342,7 +342,6 @@ RawProjectParts generateRawProjectParts(const PreprocessedData &input,
|
|||||||
{
|
{
|
||||||
RawProjectParts rpps;
|
RawProjectParts rpps;
|
||||||
|
|
||||||
int counter = 0;
|
|
||||||
for (const TargetDetails &t : input.targetDetails) {
|
for (const TargetDetails &t : input.targetDetails) {
|
||||||
QDir sourceDir(sourceDirectory.toString());
|
QDir sourceDir(sourceDirectory.toString());
|
||||||
bool needPostfix = t.compileGroups.size() > 1;
|
bool needPostfix = t.compileGroups.size() > 1;
|
||||||
@@ -375,7 +374,6 @@ RawProjectParts generateRawProjectParts(const PreprocessedData &input,
|
|||||||
qtcPchFile = "qtc_cmake_pch.hxx";
|
qtcPchFile = "qtc_cmake_pch.hxx";
|
||||||
}
|
}
|
||||||
|
|
||||||
++counter;
|
|
||||||
RawProjectPart rpp;
|
RawProjectPart rpp;
|
||||||
rpp.setProjectFileLocation(t.sourceDir.pathAppended("CMakeLists.txt").toString());
|
rpp.setProjectFileLocation(t.sourceDir.pathAppended("CMakeLists.txt").toString());
|
||||||
rpp.setBuildSystemTarget(t.name);
|
rpp.setBuildSystemTarget(t.name);
|
||||||
|
@@ -36,7 +36,9 @@ CopilotSettings::CopilotSettings()
|
|||||||
const FilePath nodeFromPath = FilePath("node").searchInPath();
|
const FilePath nodeFromPath = FilePath("node").searchInPath();
|
||||||
|
|
||||||
const FilePaths searchDirs
|
const FilePaths searchDirs
|
||||||
= {FilePath::fromUserInput("~/.vim/pack/github/start/copilot.vim/copilot/dist/agent.js"),
|
|
||||||
|
= {FilePath::fromUserInput("~/.vim/pack/github/start/copilot.vim/dist/agent.js"),
|
||||||
|
FilePath::fromUserInput("~/.vim/pack/github/start/copilot.vim/copilot/dist/agent.js"),
|
||||||
FilePath::fromUserInput(
|
FilePath::fromUserInput(
|
||||||
"~/.config/nvim/pack/github/start/copilot.vim/copilot/dist/agent.js"),
|
"~/.config/nvim/pack/github/start/copilot.vim/copilot/dist/agent.js"),
|
||||||
FilePath::fromUserInput(
|
FilePath::fromUserInput(
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
|
#include <utils/algorithm.h>
|
||||||
#include <utils/aspects.h>
|
#include <utils/aspects.h>
|
||||||
#include <utils/layoutbuilder.h>
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -100,23 +101,20 @@ void IOptionsPage::setWidgetCreator(const WidgetCreator &widgetCreator)
|
|||||||
|
|
||||||
QStringList IOptionsPage::keywords() const
|
QStringList IOptionsPage::keywords() const
|
||||||
{
|
{
|
||||||
if (!m_keywordsInitialized) {
|
|
||||||
auto that = const_cast<IOptionsPage *>(this);
|
auto that = const_cast<IOptionsPage *>(this);
|
||||||
QWidget *widget = that->widget();
|
QWidget *widget = that->widget();
|
||||||
if (!widget)
|
if (!widget)
|
||||||
return {};
|
return {};
|
||||||
// find common subwidgets
|
// find common subwidgets
|
||||||
for (const QLabel *label : widget->findChildren<QLabel *>())
|
for (const QLabel *label : widget->findChildren<QLabel *>())
|
||||||
m_keywords << Utils::stripAccelerator(label->text());
|
m_keywords << label->text();
|
||||||
for (const QCheckBox *checkbox : widget->findChildren<QCheckBox *>())
|
for (const QCheckBox *checkbox : widget->findChildren<QCheckBox *>())
|
||||||
m_keywords << Utils::stripAccelerator(checkbox->text());
|
m_keywords << checkbox->text();
|
||||||
for (const QPushButton *pushButton : widget->findChildren<QPushButton *>())
|
for (const QPushButton *pushButton : widget->findChildren<QPushButton *>())
|
||||||
m_keywords << Utils::stripAccelerator(pushButton->text());
|
m_keywords << pushButton->text();
|
||||||
for (const QGroupBox *groupBox : widget->findChildren<QGroupBox *>())
|
for (const QGroupBox *groupBox : widget->findChildren<QGroupBox *>())
|
||||||
m_keywords << Utils::stripAccelerator(groupBox->title());
|
m_keywords << groupBox->title();
|
||||||
|
|
||||||
m_keywordsInitialized = true;
|
|
||||||
}
|
|
||||||
return m_keywords;
|
return m_keywords;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,7 +269,12 @@ const QList<IOptionsPage *> IOptionsPage::allOptionsPages()
|
|||||||
*/
|
*/
|
||||||
bool IOptionsPage::matches(const QRegularExpression ®exp) const
|
bool IOptionsPage::matches(const QRegularExpression ®exp) const
|
||||||
{
|
{
|
||||||
for (const QString &keyword : keywords())
|
if (!m_keywordsInitialized) {
|
||||||
|
m_keywords = Utils::transform(keywords(), Utils::stripAccelerator);
|
||||||
|
m_keywordsInitialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const QString &keyword : m_keywords)
|
||||||
if (keyword.contains(regexp))
|
if (keyword.contains(regexp))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
@@ -59,14 +59,15 @@ public:
|
|||||||
using WidgetCreator = std::function<IOptionsPageWidget *()>;
|
using WidgetCreator = std::function<IOptionsPageWidget *()>;
|
||||||
void setWidgetCreator(const WidgetCreator &widgetCreator);
|
void setWidgetCreator(const WidgetCreator &widgetCreator);
|
||||||
|
|
||||||
QStringList keywords() const;
|
|
||||||
|
|
||||||
virtual bool matches(const QRegularExpression ®exp) const;
|
|
||||||
virtual QWidget *widget();
|
virtual QWidget *widget();
|
||||||
virtual void apply();
|
virtual void apply();
|
||||||
virtual void finish();
|
virtual void finish();
|
||||||
|
|
||||||
|
virtual bool matches(const QRegularExpression ®exp) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual QStringList keywords() const;
|
||||||
|
|
||||||
void setId(Utils::Id id) { m_id = id; }
|
void setId(Utils::Id id) { m_id = id; }
|
||||||
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
|
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
|
||||||
void setCategory(Utils::Id category) { m_category = category; }
|
void setCategory(Utils::Id category) { m_category = category; }
|
||||||
|
@@ -214,7 +214,7 @@ int ManhattanStyle::pixelMetric(PixelMetric metric, const QStyleOption *option,
|
|||||||
switch (metric) {
|
switch (metric) {
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
case PM_MenuButtonIndicator:
|
case PM_MenuButtonIndicator:
|
||||||
if (widget && option->type == QStyleOption::SO_ToolButton)
|
if (widget && option && option->type == QStyleOption::SO_ToolButton)
|
||||||
return 12;
|
return 12;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -775,6 +775,20 @@ MimeTypeSettings::~MimeTypeSettings()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList MimeTypeSettings::keywords() const
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
Tr::tr("Reset MIME Types"),
|
||||||
|
Tr::tr("Reset Handlers"),
|
||||||
|
Tr::tr("Registered MIME Types"),
|
||||||
|
Tr::tr("Patterns:"),
|
||||||
|
Tr::tr("Add..."),
|
||||||
|
Tr::tr("Edit..."),
|
||||||
|
Tr::tr("Remove"),
|
||||||
|
Tr::tr("Details")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void MimeTypeSettings::restoreSettings()
|
void MimeTypeSettings::restoreSettings()
|
||||||
{
|
{
|
||||||
MimeTypeSettingsPrivate::UserMimeTypeHash mimetypes
|
MimeTypeSettingsPrivate::UserMimeTypeHash mimetypes
|
||||||
|
@@ -15,6 +15,8 @@ public:
|
|||||||
MimeTypeSettings();
|
MimeTypeSettings();
|
||||||
~MimeTypeSettings() override;
|
~MimeTypeSettings() override;
|
||||||
|
|
||||||
|
QStringList keywords() const override;
|
||||||
|
|
||||||
static void restoreSettings();
|
static void restoreSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -753,6 +753,8 @@ bool DockerDevicePrivate::startContainer()
|
|||||||
"or restart Qt Creator."));
|
"or restart Qt Creator."));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QTC_ASSERT(m_shell, return false);
|
||||||
|
|
||||||
if (m_shell->start())
|
if (m_shell->start())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@@ -460,7 +460,6 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
|
|||||||
OSFlavor flavor = UnknownFlavor;
|
OSFlavor flavor = UnknownFlavor;
|
||||||
BinaryFormat format = UnknownFormat;
|
BinaryFormat format = UnknownFormat;
|
||||||
unsigned char width = 0;
|
unsigned char width = 0;
|
||||||
int unknownCount = 0;
|
|
||||||
|
|
||||||
for (const QString &p : parts) {
|
for (const QString &p : parts) {
|
||||||
if (p == "unknown" || p == "pc"
|
if (p == "unknown" || p == "pc"
|
||||||
@@ -623,8 +622,6 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
|
|||||||
os = BareMetalOS;
|
os = BareMetalOS;
|
||||||
flavor = GenericFlavor;
|
flavor = GenericFlavor;
|
||||||
format = ElfFormat;
|
format = ElfFormat;
|
||||||
} else {
|
|
||||||
++unknownCount;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -112,7 +112,7 @@ void BuildDirectoryAspect::addToLayout(Layouting::LayoutItem &parent)
|
|||||||
StringAspect::addToLayout(parent);
|
StringAspect::addToLayout(parent);
|
||||||
d->problemLabel = new InfoLabel({}, InfoLabel::Warning);
|
d->problemLabel = new InfoLabel({}, InfoLabel::Warning);
|
||||||
d->problemLabel->setElideMode(Qt::ElideNone);
|
d->problemLabel->setElideMode(Qt::ElideNone);
|
||||||
parent.addItems({{}, d->problemLabel.data()});
|
parent.addItems({Layouting::br, Layouting::empty, d->problemLabel.data()});
|
||||||
updateProblemLabel();
|
updateProblemLabel();
|
||||||
if (!d->sourceDir.isEmpty()) {
|
if (!d->sourceDir.isEmpty()) {
|
||||||
connect(this, &StringAspect::checkedChanged, this, [this] {
|
connect(this, &StringAspect::checkedChanged, this, [this] {
|
||||||
|
@@ -141,8 +141,7 @@ public:
|
|||||||
PortList freePorts;
|
PortList freePorts;
|
||||||
FilePath debugServerPath;
|
FilePath debugServerPath;
|
||||||
FilePath debugDumperPath = Core::ICore::resourcePath("debugger/");
|
FilePath debugDumperPath = Core::ICore::resourcePath("debugger/");
|
||||||
FilePath qmlRunCommand;
|
std::optional<FilePath> qmlRunCommand;
|
||||||
bool qmlRunCommandChecked = false;
|
|
||||||
bool emptyCommandAllowed = false;
|
bool emptyCommandAllowed = false;
|
||||||
|
|
||||||
QList<Icon> deviceIcons;
|
QList<Icon> deviceIcons;
|
||||||
@@ -475,7 +474,9 @@ void IDevice::fromMap(const QVariantMap &map)
|
|||||||
d->version = map.value(QLatin1String(VersionKey), 0).toInt();
|
d->version = map.value(QLatin1String(VersionKey), 0).toInt();
|
||||||
|
|
||||||
d->debugServerPath = FilePath::fromSettings(map.value(QLatin1String(DebugServerKey)));
|
d->debugServerPath = FilePath::fromSettings(map.value(QLatin1String(DebugServerKey)));
|
||||||
d->qmlRunCommand = FilePath::fromSettings(map.value(QLatin1String(QmlRuntimeKey)));
|
const FilePath qmlRunCmd = FilePath::fromSettings(map.value(QLatin1String(QmlRuntimeKey)));
|
||||||
|
if (!qmlRunCmd.isEmpty())
|
||||||
|
d->qmlRunCommand = qmlRunCmd;
|
||||||
d->extraData = map.value(ExtraDataKey).toMap();
|
d->extraData = map.value(ExtraDataKey).toMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -508,7 +509,9 @@ QVariantMap IDevice::toMap() const
|
|||||||
map.insert(QLatin1String(VersionKey), d->version);
|
map.insert(QLatin1String(VersionKey), d->version);
|
||||||
|
|
||||||
map.insert(QLatin1String(DebugServerKey), d->debugServerPath.toSettings());
|
map.insert(QLatin1String(DebugServerKey), d->debugServerPath.toSettings());
|
||||||
map.insert(QLatin1String(QmlRuntimeKey), d->qmlRunCommand.toSettings());
|
map.insert(QLatin1String(QmlRuntimeKey),
|
||||||
|
d->qmlRunCommand ? d->qmlRunCommand->toSettings() : FilePath().toSettings());
|
||||||
|
|
||||||
map.insert(ExtraDataKey, d->extraData);
|
map.insert(ExtraDataKey, d->extraData);
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
@@ -597,20 +600,23 @@ void IDevice::setDebugServerPath(const FilePath &path)
|
|||||||
|
|
||||||
FilePath IDevice::qmlRunCommand() const
|
FilePath IDevice::qmlRunCommand() const
|
||||||
{
|
{
|
||||||
if (!d->qmlRunCommandChecked) {
|
if (d->qmlRunCommand)
|
||||||
d->qmlRunCommandChecked = true;
|
return *d->qmlRunCommand;
|
||||||
QString runtime = d->qmlRunCommand.path();
|
|
||||||
if (runtime.isEmpty())
|
const FilePath newPath = searchExecutableInPath("qml");
|
||||||
runtime = "qml";
|
if (newPath.isEmpty())
|
||||||
d->qmlRunCommand = searchExecutableInPath(runtime);
|
return {};
|
||||||
}
|
|
||||||
return d->qmlRunCommand;
|
d->qmlRunCommand = newPath;
|
||||||
|
return *d->qmlRunCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDevice::setQmlRunCommand(const FilePath &path)
|
void IDevice::setQmlRunCommand(const FilePath &path)
|
||||||
{
|
{
|
||||||
|
if (path.isEmpty())
|
||||||
|
d->qmlRunCommand.reset();
|
||||||
|
else
|
||||||
d->qmlRunCommand = path;
|
d->qmlRunCommand = path;
|
||||||
d->qmlRunCommandChecked = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDevice::setExtraData(Id kind, const QVariant &data)
|
void IDevice::setExtraData(Id kind, const QVariant &data)
|
||||||
|
@@ -350,6 +350,18 @@ public:
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList keywords() const final
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
Tr::tr("Name:"),
|
||||||
|
Tr::tr("Executable"),
|
||||||
|
Tr::tr("&Add"),
|
||||||
|
Tr::tr("&Delete"),
|
||||||
|
Tr::tr("&Clean Up"),
|
||||||
|
Tr::tr("&Make Default")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InterpreterOptionsWidget *m_widget = nullptr;
|
InterpreterOptionsWidget *m_widget = nullptr;
|
||||||
};
|
};
|
||||||
|
@@ -1059,6 +1059,20 @@ QtOptionsPage::QtOptionsPage()
|
|||||||
setWidgetCreator([] { return new QtOptionsPageWidget; });
|
setWidgetCreator([] { return new QtOptionsPageWidget; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList QtOptionsPage::keywords() const
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
Tr::tr("Add..."),
|
||||||
|
Tr::tr("Remove"),
|
||||||
|
Tr::tr("Clean Up"),
|
||||||
|
Tr::tr("Link with Qt"),
|
||||||
|
Tr::tr("Remove Link"),
|
||||||
|
Tr::tr("Qt installation path:"),
|
||||||
|
Tr::tr("qmake path:"),
|
||||||
|
Tr::tr("Register documentation:")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
bool QtOptionsPage::canLinkWithQt()
|
bool QtOptionsPage::canLinkWithQt()
|
||||||
{
|
{
|
||||||
return Internal::canLinkWithQt(nullptr);
|
return Internal::canLinkWithQt(nullptr);
|
||||||
|
@@ -12,6 +12,8 @@ class QtOptionsPage final : public Core::IOptionsPage
|
|||||||
public:
|
public:
|
||||||
QtOptionsPage();
|
QtOptionsPage();
|
||||||
|
|
||||||
|
QStringList keywords() const final;
|
||||||
|
|
||||||
static bool canLinkWithQt();
|
static bool canLinkWithQt();
|
||||||
static bool isLinkedWithQt();
|
static bool isLinkedWithQt();
|
||||||
static void linkWithQt();
|
static void linkWithQt();
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
// Copyright (C) 2022 The Qt Company Ltd.
|
// Copyright (C) 2022 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
|
#include <utils/hostosinfo.h>
|
||||||
|
|
||||||
#include "keys.h"
|
#include "keys.h"
|
||||||
|
|
||||||
namespace Terminal::Internal {
|
namespace Terminal::Internal {
|
||||||
@@ -72,8 +74,14 @@ VTermKey qtKeyToVTerm(Qt::Key key, bool keypad)
|
|||||||
return keypad ? VTERM_KEY_KP_PERIOD : VTERM_KEY_NONE;
|
return keypad ? VTERM_KEY_KP_PERIOD : VTERM_KEY_NONE;
|
||||||
case Qt::Key_Slash:
|
case Qt::Key_Slash:
|
||||||
return keypad ? VTERM_KEY_KP_DIVIDE : VTERM_KEY_NONE;
|
return keypad ? VTERM_KEY_KP_DIVIDE : VTERM_KEY_NONE;
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter: {
|
||||||
return keypad ? VTERM_KEY_KP_ENTER : VTERM_KEY_NONE;
|
VTermKey enterKey = VTERM_KEY_KP_ENTER;
|
||||||
|
|
||||||
|
if (Utils::HostOsInfo::isWindowsHost())
|
||||||
|
enterKey = VTERM_KEY_ENTER;
|
||||||
|
|
||||||
|
return keypad ? enterKey : VTERM_KEY_NONE;
|
||||||
|
}
|
||||||
case Qt::Key_Equal:
|
case Qt::Key_Equal:
|
||||||
return keypad ? VTERM_KEY_KP_EQUAL : VTERM_KEY_NONE;
|
return keypad ? VTERM_KEY_KP_EQUAL : VTERM_KEY_NONE;
|
||||||
default:
|
default:
|
||||||
|
@@ -14,41 +14,113 @@ namespace Terminal::Internal {
|
|||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
FilePaths availableShells()
|
struct ShellItemBuilder
|
||||||
|
{
|
||||||
|
explicit ShellItemBuilder(const CommandLine &value)
|
||||||
|
{
|
||||||
|
m_item.openParameters.shellCommand = value;
|
||||||
|
}
|
||||||
|
explicit ShellItemBuilder(const FilePath &value)
|
||||||
|
{
|
||||||
|
m_item.openParameters.shellCommand = CommandLine(value);
|
||||||
|
}
|
||||||
|
ShellItemBuilder &name(const QString &value)
|
||||||
|
{
|
||||||
|
m_item.name = value;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
ShellItemBuilder &icon(const FilePath &value)
|
||||||
|
{
|
||||||
|
static QFileIconProvider iconProvider;
|
||||||
|
m_item.icon = iconProvider.icon(value.toFileInfo());
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline operator ShellModelItem() { return item(); }
|
||||||
|
ShellModelItem item()
|
||||||
|
{
|
||||||
|
if (m_item.name.isEmpty())
|
||||||
|
m_item.name = m_item.openParameters.shellCommand->executable().toUserOutput();
|
||||||
|
if (m_item.icon.isNull())
|
||||||
|
icon(m_item.openParameters.shellCommand->executable());
|
||||||
|
return m_item;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
ShellModelItem m_item;
|
||||||
|
};
|
||||||
|
|
||||||
|
static QSet<FilePath> msysPaths()
|
||||||
|
{
|
||||||
|
QSet<FilePath> res;
|
||||||
|
FilePath msys2 = FilePath::fromUserInput(QStandardPaths::findExecutable("msys2.exe"));
|
||||||
|
if (msys2.exists())
|
||||||
|
res.insert(msys2.parentDir());
|
||||||
|
for (const QFileInfo &drive : QDir::drives()) {
|
||||||
|
for (const QString &name : QStringList{"msys2", "msys32", "msys64"}) {
|
||||||
|
msys2 = FilePath::fromString(drive.filePath()).pathAppended(name);
|
||||||
|
if (msys2.pathAppended("msys2.exe").exists())
|
||||||
|
res.insert(msys2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ShellModelPrivate
|
||||||
|
{
|
||||||
|
QList<ShellModelItem> localShells;
|
||||||
|
ShellModelPrivate();
|
||||||
|
};
|
||||||
|
|
||||||
|
ShellModelPrivate::ShellModelPrivate()
|
||||||
{
|
{
|
||||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||||
FilePaths shells;
|
const FilePath comspec = FilePath::fromUserInput(qtcEnvironmentVariable("COMSPEC"));
|
||||||
|
localShells << ShellItemBuilder(comspec);
|
||||||
FilePath comspec = FilePath::fromUserInput(qtcEnvironmentVariable("COMSPEC"));
|
|
||||||
shells << comspec;
|
|
||||||
|
|
||||||
if (comspec.fileName() != "cmd.exe") {
|
if (comspec.fileName() != "cmd.exe") {
|
||||||
FilePath cmd = FilePath::fromUserInput(QStandardPaths::findExecutable("cmd.exe"));
|
FilePath cmd = FilePath::fromUserInput(QStandardPaths::findExecutable("cmd.exe"));
|
||||||
shells << cmd;
|
localShells << ShellItemBuilder(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath powershell = FilePath::fromUserInput(
|
const FilePath powershell = FilePath::fromUserInput(
|
||||||
QStandardPaths::findExecutable("powershell.exe"));
|
QStandardPaths::findExecutable("powershell.exe"));
|
||||||
|
|
||||||
if (powershell.exists())
|
if (powershell.exists())
|
||||||
shells << powershell;
|
localShells << ShellItemBuilder(powershell);
|
||||||
|
|
||||||
FilePath bash = FilePath::fromUserInput(QStandardPaths::findExecutable("bash.exe"));
|
const FilePath sys_bash =
|
||||||
if (bash.exists())
|
FilePath::fromUserInput(QStandardPaths::findExecutable("bash.exe"));
|
||||||
shells << bash;
|
if (sys_bash.exists())
|
||||||
|
localShells << ShellItemBuilder({sys_bash, {"--login"}});
|
||||||
|
|
||||||
FilePath git_bash = FilePath::fromUserInput(QStandardPaths::findExecutable("git.exe"));
|
const FilePath git_exe = FilePath::fromUserInput(QStandardPaths::findExecutable("git.exe"));
|
||||||
if (git_bash.exists())
|
if (git_exe.exists()) {
|
||||||
shells << git_bash.parentDir().parentDir().pathAppended("usr/bin/bash.exe");
|
FilePath git_bash = git_exe.parentDir().parentDir().pathAppended("bin/bash.exe");
|
||||||
|
if (git_bash.exists()) {
|
||||||
|
localShells << ShellItemBuilder({git_bash, {"--login"}})
|
||||||
|
.icon(git_bash.parentDir().parentDir().pathAppended("git-bash.exe"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FilePath msys2_bash = FilePath::fromUserInput(QStandardPaths::findExecutable("msys2.exe"));
|
const QStringList msys2_args{"-defterm", "-no-start", "-here"};
|
||||||
if (msys2_bash.exists())
|
for (const FilePath &msys2_path : msysPaths()) {
|
||||||
shells << msys2_bash.parentDir().pathAppended("usr/bin/bash.exe");
|
const FilePath msys2_cmd = msys2_path.pathAppended("msys2_shell.cmd");
|
||||||
|
for (const FilePath &type : msys2_path.dirEntries({{"*.ico"}})) {
|
||||||
return shells;
|
// Only list this type if it has anything in /bin
|
||||||
|
QDirIterator it(type.path().replace(".ico", "/bin"), QDir::Files);
|
||||||
|
if (!it.hasNext())
|
||||||
|
continue;
|
||||||
|
localShells << ShellItemBuilder(
|
||||||
|
{msys2_cmd, msys2_args + QStringList{"-" + type.baseName()}})
|
||||||
|
.icon(type)
|
||||||
|
.name(type.toUserOutput().replace(".ico", ".exe"));
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
FilePath shellsFile = FilePath::fromString("/etc/shells");
|
FilePath shellsFile = FilePath::fromString("/etc/shells");
|
||||||
const auto shellFileContent = shellsFile.fileContents();
|
const auto shellFileContent = shellsFile.fileContents();
|
||||||
QTC_ASSERT_EXPECTED(shellFileContent, return {});
|
QTC_ASSERT_EXPECTED(shellFileContent, return);
|
||||||
|
|
||||||
QString shellFileContentString = QString::fromUtf8(*shellFileContent);
|
QString shellFileContentString = QString::fromUtf8(*shellFileContent);
|
||||||
|
|
||||||
@@ -63,29 +135,18 @@ FilePaths availableShells()
|
|||||||
});
|
});
|
||||||
|
|
||||||
// ... and filter out non-existing shells.
|
// ... and filter out non-existing shells.
|
||||||
return Utils::filtered(shells, [](const FilePath &shell) { return shell.exists(); });
|
localShells = Utils::transform(
|
||||||
|
Utils::filtered(shells, [](const FilePath &shell) {return shell.exists(); }),
|
||||||
|
[](const FilePath &shell) {
|
||||||
|
return ShellItemBuilder(shell).item();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ShellModelPrivate
|
|
||||||
{
|
|
||||||
QList<ShellModelItem> localShells;
|
|
||||||
};
|
|
||||||
|
|
||||||
ShellModel::ShellModel(QObject *parent)
|
ShellModel::ShellModel(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, d(new ShellModelPrivate())
|
, d(new ShellModelPrivate())
|
||||||
{
|
{
|
||||||
QFileIconProvider iconProvider;
|
|
||||||
|
|
||||||
const FilePaths shells = availableShells();
|
|
||||||
for (const FilePath &shell : shells) {
|
|
||||||
ShellModelItem item;
|
|
||||||
item.icon = iconProvider.icon(shell.toFileInfo());
|
|
||||||
item.name = shell.toUserOutput();
|
|
||||||
item.openParameters.shellCommand = {shell, {}};
|
|
||||||
d->localShells << item;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ShellModel::~ShellModel() = default;
|
ShellModel::~ShellModel() = default;
|
||||||
|
@@ -538,8 +538,15 @@ public:
|
|||||||
void paintIfDefedOutBlocks(const PaintEventData &data, QPainter &painter) const;
|
void paintIfDefedOutBlocks(const PaintEventData &data, QPainter &painter) const;
|
||||||
void paintFindScope(const PaintEventData &data, QPainter &painter) const;
|
void paintFindScope(const PaintEventData &data, QPainter &painter) const;
|
||||||
void paintCurrentLineHighlight(const PaintEventData &data, QPainter &painter) const;
|
void paintCurrentLineHighlight(const PaintEventData &data, QPainter &painter) const;
|
||||||
void paintCursorAsBlock(const PaintEventData &data, QPainter &painter,
|
QRectF cursorBlockRect(const QTextDocument *doc,
|
||||||
PaintEventBlockData &blockData, int cursorPosition) const;
|
const QTextBlock &block,
|
||||||
|
int cursorPosition,
|
||||||
|
QRectF blockBoundingRect = {},
|
||||||
|
bool *doSelection = nullptr) const;
|
||||||
|
void paintCursorAsBlock(const PaintEventData &data,
|
||||||
|
QPainter &painter,
|
||||||
|
PaintEventBlockData &blockData,
|
||||||
|
int cursorPosition) const;
|
||||||
void paintAdditionalVisualWhitespaces(PaintEventData &data, QPainter &painter, qreal top) const;
|
void paintAdditionalVisualWhitespaces(PaintEventData &data, QPainter &painter, qreal top) const;
|
||||||
void paintIndentDepth(PaintEventData &data, QPainter &painter, const PaintEventBlockData &blockData);
|
void paintIndentDepth(PaintEventData &data, QPainter &painter, const PaintEventBlockData &blockData);
|
||||||
void paintReplacement(PaintEventData &data, QPainter &painter, qreal top) const;
|
void paintReplacement(PaintEventData &data, QPainter &painter, qreal top) const;
|
||||||
@@ -2778,6 +2785,14 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e)
|
|||||||
if (ro) break;
|
if (ro) break;
|
||||||
if (e->modifiers() == Qt::NoModifier) {
|
if (e->modifiers() == Qt::NoModifier) {
|
||||||
setOverwriteMode(!inOverwriteMode);
|
setOverwriteMode(!inOverwriteMode);
|
||||||
|
if (inOverwriteMode) {
|
||||||
|
for (const QTextCursor &cursor : multiTextCursor()) {
|
||||||
|
const QRectF oldBlockRect = d->cursorBlockRect(document(),
|
||||||
|
cursor.block(),
|
||||||
|
cursor.position());
|
||||||
|
viewport()->update(oldBlockRect.toAlignedRect());
|
||||||
|
}
|
||||||
|
}
|
||||||
e->accept();
|
e->accept();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4426,19 +4441,22 @@ void TextEditorWidgetPrivate::paintCurrentLineHighlight(const PaintEventData &da
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorWidgetPrivate::paintCursorAsBlock(const PaintEventData &data, QPainter &painter,
|
QRectF TextEditorWidgetPrivate::cursorBlockRect(const QTextDocument *doc,
|
||||||
PaintEventBlockData &blockData, int cursorPosition) const
|
const QTextBlock &block,
|
||||||
|
int cursorPosition,
|
||||||
|
QRectF blockBoundingRect,
|
||||||
|
bool *doSelection) const
|
||||||
{
|
{
|
||||||
const qreal space = charWidth();
|
const qreal space = charWidth();
|
||||||
int relativePos = cursorPosition - blockData.position;
|
int relativePos = cursorPosition - block.position();
|
||||||
bool doSelection = true;
|
QTextLine line = block.layout()->lineForTextPosition(relativePos);
|
||||||
QTextLine line = blockData.layout->lineForTextPosition(relativePos);
|
|
||||||
qreal x = line.cursorToX(relativePos);
|
qreal x = line.cursorToX(relativePos);
|
||||||
qreal w = 0;
|
qreal w = 0;
|
||||||
if (relativePos < line.textLength() - line.textStart()) {
|
if (relativePos < line.textLength() - line.textStart()) {
|
||||||
w = line.cursorToX(relativePos + 1) - x;
|
w = line.cursorToX(relativePos + 1) - x;
|
||||||
if (data.doc->characterAt(cursorPosition) == QLatin1Char('\t')) {
|
if (doc->characterAt(cursorPosition) == QLatin1Char('\t')) {
|
||||||
doSelection = false;
|
if (doSelection)
|
||||||
|
*doSelection = false;
|
||||||
if (w > space) {
|
if (w > space) {
|
||||||
x += w - space;
|
x += w - space;
|
||||||
w = space;
|
w = space;
|
||||||
@@ -4448,12 +4466,30 @@ void TextEditorWidgetPrivate::paintCursorAsBlock(const PaintEventData &data, QPa
|
|||||||
w = space; // in sync with QTextLine::draw()
|
w = space; // in sync with QTextLine::draw()
|
||||||
}
|
}
|
||||||
|
|
||||||
QRectF lineRect = line.rect();
|
if (blockBoundingRect.isEmpty())
|
||||||
lineRect.moveTop(lineRect.top() + blockData.boundingRect.top());
|
blockBoundingRect = q->blockBoundingGeometry(block).translated(q->contentOffset());
|
||||||
lineRect.moveLeft(blockData.boundingRect.left() + x);
|
|
||||||
lineRect.setWidth(w);
|
QRectF cursorRect = line.rect();
|
||||||
|
cursorRect.moveTop(cursorRect.top() + blockBoundingRect.top());
|
||||||
|
cursorRect.moveLeft(blockBoundingRect.left() + x);
|
||||||
|
cursorRect.setWidth(w);
|
||||||
|
return cursorRect;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextEditorWidgetPrivate::paintCursorAsBlock(const PaintEventData &data,
|
||||||
|
QPainter &painter,
|
||||||
|
PaintEventBlockData &blockData,
|
||||||
|
int cursorPosition) const
|
||||||
|
{
|
||||||
|
bool doSelection = true;
|
||||||
|
const QRectF cursorRect = cursorBlockRect(data.doc,
|
||||||
|
data.block,
|
||||||
|
cursorPosition,
|
||||||
|
blockData.boundingRect,
|
||||||
|
&doSelection);
|
||||||
const QTextCharFormat textFormat = data.fontSettings.toTextCharFormat(C_TEXT);
|
const QTextCharFormat textFormat = data.fontSettings.toTextCharFormat(C_TEXT);
|
||||||
painter.fillRect(lineRect, textFormat.foreground());
|
painter.fillRect(cursorRect, textFormat.foreground());
|
||||||
|
int relativePos = cursorPosition - blockData.position;
|
||||||
if (doSelection) {
|
if (doSelection) {
|
||||||
blockData.selections.append(
|
blockData.selections.append(
|
||||||
createBlockCursorCharFormatRange(relativePos,
|
createBlockCursorCharFormatRange(relativePos,
|
||||||
|
@@ -4806,7 +4806,7 @@ bool Value::isValid(const Base *b) const
|
|||||||
case JsonValue::Double:
|
case JsonValue::Double:
|
||||||
if (intValue)
|
if (intValue)
|
||||||
break;
|
break;
|
||||||
// fall through
|
[[fallthrough]];
|
||||||
case JsonValue::String:
|
case JsonValue::String:
|
||||||
case JsonValue::Array:
|
case JsonValue::Array:
|
||||||
case JsonValue::Object:
|
case JsonValue::Object:
|
||||||
@@ -4885,7 +4885,7 @@ uint32_t Value::valueToStore(const JsonValue &v, uint32_t offset)
|
|||||||
if (c != INT_MAX)
|
if (c != INT_MAX)
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
// fall through
|
[[fallthrough]];
|
||||||
case JsonValue::String:
|
case JsonValue::String:
|
||||||
case JsonValue::Array:
|
case JsonValue::Array:
|
||||||
case JsonValue::Object:
|
case JsonValue::Object:
|
||||||
|
@@ -287,7 +287,7 @@ QMakeEvaluator::quoteValue(const ProString &val)
|
|||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
quote = true;
|
quote = true;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
default:
|
default:
|
||||||
ret += c;
|
ret += c;
|
||||||
break;
|
break;
|
||||||
|
@@ -295,7 +295,8 @@ ProStringList QMakeEvaluator::split_value_list(QStringView vals, int source)
|
|||||||
--x;
|
--x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// fallthrough
|
hadWord = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
hadWord = true;
|
hadWord = true;
|
||||||
break;
|
break;
|
||||||
@@ -1661,7 +1662,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::expandVariableReferences(
|
|||||||
tokPtr++;
|
tokPtr++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
default:
|
default:
|
||||||
Q_ASSERT_X(false, "expandVariableReferences", "Unrecognized token");
|
Q_ASSERT_X(false, "expandVariableReferences", "Unrecognized token");
|
||||||
break;
|
break;
|
||||||
@@ -2137,7 +2138,7 @@ QString QMakeEvaluator::formatValue(const ProString &val, bool forceQuote)
|
|||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
quote = true;
|
quote = true;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
default:
|
default:
|
||||||
ret += c;
|
ret += c;
|
||||||
break;
|
break;
|
||||||
|
@@ -1563,7 +1563,7 @@ static bool getBlock(const ushort *tokens, int limit, int &offset, QString *outS
|
|||||||
case TokRemove:
|
case TokRemove:
|
||||||
case TokReplace:
|
case TokReplace:
|
||||||
// The parameter is the sizehint for the output.
|
// The parameter is the sizehint for the output.
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case TokLine: {
|
case TokLine: {
|
||||||
ushort dummy;
|
ushort dummy;
|
||||||
ok = getUshort(tokens, limit, offset, &dummy, outStr);
|
ok = getUshort(tokens, limit, offset, &dummy, outStr);
|
||||||
|
@@ -185,7 +185,7 @@ void doExit(int exitCode)
|
|||||||
std::cout << commandLineParser.value("wait").toStdString() << std::endl;
|
std::cout << commandLineParser.value("wait").toStdString() << std::endl;
|
||||||
|
|
||||||
waitingForExitKeyPress = true;
|
waitingForExitKeyPress = true;
|
||||||
onKeyPress([exitCode] { doExit(exitCode); });
|
onKeyPress([] { doExit(0); });
|
||||||
} else {
|
} else {
|
||||||
exit(exitCode);
|
exit(exitCode);
|
||||||
}
|
}
|
||||||
@@ -206,9 +206,7 @@ void onInferiorFinished(int exitCode, QProcess::ExitStatus status)
|
|||||||
|
|
||||||
void onInferiorErrorOccurered(QProcess::ProcessError error)
|
void onInferiorErrorOccurered(QProcess::ProcessError error)
|
||||||
{
|
{
|
||||||
qCInfo(log) << "Inferior error: " << error << inferiorProcess.errorString();
|
qCWarning(log) << "Inferior error: " << error << inferiorProcess.errorString();
|
||||||
sendCrash(inferiorProcess.exitCode());
|
|
||||||
doExit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onInferiorStarted()
|
void onInferiorStarted()
|
||||||
|
@@ -8,6 +8,10 @@ set(CMAKE_AUTOMOC ON)
|
|||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
if (WINDOWS)
|
||||||
|
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui Network Widgets)
|
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui Network Widgets)
|
||||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Network Widgets)
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Network Widgets)
|
||||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Script Webkit WebkitWidgets QUIET)
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Script Webkit WebkitWidgets QUIET)
|
||||||
@@ -67,5 +71,5 @@ if (Qt${QT_VERSION_MAJOR}WebkitWidgets_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# and the plugin
|
# and the plugin
|
||||||
add_library(simple_test_plugin simple_test_plugin.cpp)
|
add_library(simple_test_plugin SHARED simple_test_plugin.cpp)
|
||||||
target_link_libraries(simple_test_plugin PRIVATE Qt${QT_VERSION_MAJOR}::Core)
|
target_link_libraries(simple_test_plugin PRIVATE Qt${QT_VERSION_MAJOR}::Core)
|
||||||
|
@@ -36,10 +36,8 @@ Qt 6.2.4 (MSVC2019, 64bit)
|
|||||||
Third - you'll have to provide some additional repositories.
|
Third - you'll have to provide some additional repositories.
|
||||||
These additional repositories are located inside ~/squish-data or C:\Users\<user>\squish-data (depending on the OS you're on).
|
These additional repositories are located inside ~/squish-data or C:\Users\<user>\squish-data (depending on the OS you're on).
|
||||||
You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH.
|
You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH.
|
||||||
This folder must contain the following:
|
This folder must contain a QtCreator repository (or source copy) of tag v4.7.0 named 'creator'
|
||||||
* a QtCreator repository (or source copy) of tag v4.7.0 named 'creator' including the submodule src/shared/qbs
|
including the submodule src/shared/qbs
|
||||||
* a subfolder called 'creator-test-data'
|
|
||||||
* a speedcrunch 0.11 repository (or source copy) inside 'creator-test-data' named 'speedcrunch'
|
|
||||||
|
|
||||||
Fourth - you'll have to make sure that some needed tools are available (no matter on which OS you're on).
|
Fourth - you'll have to make sure that some needed tools are available (no matter on which OS you're on).
|
||||||
* cmake 3.14 or newer
|
* cmake 3.14 or newer
|
||||||
|
@@ -44,7 +44,9 @@ def __closeInfoBarEntry__(leftButtonText):
|
|||||||
doNotShowAgain = toolButton % "Do Not Show Again"
|
doNotShowAgain = toolButton % "Do Not Show Again"
|
||||||
leftWidget = "leftWidget={%s}" % (toolButton % leftButtonText)
|
leftWidget = "leftWidget={%s}" % (toolButton % leftButtonText)
|
||||||
test.log("closing %s" % leftButtonText)
|
test.log("closing %s" % leftButtonText)
|
||||||
clickButton(waitForObject("{%s %s}" % (doNotShowAgain, leftWidget)))
|
buttonObjStr = "{%s %s}" % (doNotShowAgain, leftWidget)
|
||||||
|
clickButton(waitForObject(buttonObjStr))
|
||||||
|
waitFor('object.exists(buttonObjStr) == False', 2000)
|
||||||
|
|
||||||
# additionalParameters must be a list or tuple of strings or None
|
# additionalParameters must be a list or tuple of strings or None
|
||||||
def startQC(additionalParameters=None, withPreparedSettingsPath=True, closeLinkToQt=True, cancelTour=True):
|
def startQC(additionalParameters=None, withPreparedSettingsPath=True, closeLinkToQt=True, cancelTour=True):
|
||||||
|
@@ -606,3 +606,24 @@ def stringify(obj):
|
|||||||
if isinstance(obj, bytes):
|
if isinstance(obj, bytes):
|
||||||
tmp = obj.decode('cp1252') if platform.system() in ('Microsoft','Windows') else obj.decode()
|
tmp = obj.decode('cp1252') if platform.system() in ('Microsoft','Windows') else obj.decode()
|
||||||
return tmp
|
return tmp
|
||||||
|
|
||||||
|
|
||||||
|
class GitClone:
|
||||||
|
|
||||||
|
def __init__(self, url, revision):
|
||||||
|
self.localPath = os.path.join(tempDir(),
|
||||||
|
url.rsplit('/', 1)[1].rsplit('.')[0])
|
||||||
|
self.url = url
|
||||||
|
self.revision = revision
|
||||||
|
|
||||||
|
def __enter__(self):
|
||||||
|
try:
|
||||||
|
subprocess.check_call(["git", "clone", "-b", self.revision,
|
||||||
|
"--depth", "1", self.url, self.localPath])
|
||||||
|
return self.localPath
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
test.warning("Could not clone git repository %s" % self.url, str(e))
|
||||||
|
return None
|
||||||
|
|
||||||
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
|
deleteDirIfExists(self.localPath)
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
source("../../shared/qtcreator.py")
|
source("../../shared/qtcreator.py")
|
||||||
|
|
||||||
SpeedCrunchPath = ""
|
|
||||||
|
|
||||||
def buildConfigFromFancyToolButton(fancyToolButton):
|
def buildConfigFromFancyToolButton(fancyToolButton):
|
||||||
beginOfBuildConfig = "<b>Build:</b> "
|
beginOfBuildConfig = "<b>Build:</b> "
|
||||||
@@ -14,12 +13,16 @@ def buildConfigFromFancyToolButton(fancyToolButton):
|
|||||||
return toolTipText[beginIndex:endIndex]
|
return toolTipText[beginIndex:endIndex]
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if not neededFilePresent(SpeedCrunchPath):
|
with GitClone("https://bitbucket.org/heldercorreia/speedcrunch.git",
|
||||||
|
"release-0.12.0") as SpeedCrunchPath:
|
||||||
|
if not SpeedCrunchPath:
|
||||||
|
test.fatal("Could not clone SpeedCrunch")
|
||||||
return
|
return
|
||||||
startQC()
|
startQC()
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
openQmakeProject(SpeedCrunchPath, [Targets.DESKTOP_5_14_1_DEFAULT])
|
openQmakeProject(os.path.join(SpeedCrunchPath, "src", "speedcrunch.pro"),
|
||||||
|
[Targets.DESKTOP_5_14_1_DEFAULT])
|
||||||
waitForProjectParsing()
|
waitForProjectParsing()
|
||||||
|
|
||||||
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
|
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
|
||||||
@@ -44,14 +47,3 @@ def main():
|
|||||||
# Add a new run configuration
|
# Add a new run configuration
|
||||||
|
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
|
|
||||||
def init():
|
|
||||||
global SpeedCrunchPath
|
|
||||||
SpeedCrunchPath = os.path.join(srcPath, "creator-test-data", "speedcrunch", "src", "speedcrunch.pro")
|
|
||||||
cleanup()
|
|
||||||
|
|
||||||
def cleanup():
|
|
||||||
# Make sure the .user files are gone
|
|
||||||
cleanUpUserFiles(SpeedCrunchPath)
|
|
||||||
for dir in glob.glob(os.path.join(srcPath, "creator-test-data", "speedcrunch", "speedcrunch-build-*")):
|
|
||||||
deleteDirIfExists(dir)
|
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
source("../../shared/qtcreator.py")
|
source("../../shared/qtcreator.py")
|
||||||
|
|
||||||
SpeedCrunchPath = ""
|
|
||||||
BuildPath = tempDir()
|
BuildPath = tempDir()
|
||||||
|
|
||||||
def cmakeSupported():
|
def cmakeSupported():
|
||||||
@@ -27,13 +26,17 @@ def main():
|
|||||||
if not cmakeSupported():
|
if not cmakeSupported():
|
||||||
test.warning("CMake version is no more supported for QC")
|
test.warning("CMake version is no more supported for QC")
|
||||||
return
|
return
|
||||||
if not neededFilePresent(SpeedCrunchPath):
|
|
||||||
return
|
|
||||||
|
|
||||||
|
with GitClone("https://bitbucket.org/heldercorreia/speedcrunch.git",
|
||||||
|
"release-0.12.0") as SpeedCrunchPath:
|
||||||
|
if not SpeedCrunchPath:
|
||||||
|
test.fatal("Could not clone SpeedCrunch")
|
||||||
|
return
|
||||||
startQC()
|
startQC()
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
result = openCmakeProject(SpeedCrunchPath, BuildPath)
|
result = openCmakeProject(os.path.join(SpeedCrunchPath, "src", "CMakeLists.txt"),
|
||||||
|
BuildPath)
|
||||||
if not result:
|
if not result:
|
||||||
test.fatal("Could not open/create cmake project - leaving test")
|
test.fatal("Could not open/create cmake project - leaving test")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
@@ -53,13 +56,6 @@ def main():
|
|||||||
|
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
|
|
||||||
def init():
|
|
||||||
global SpeedCrunchPath
|
|
||||||
SpeedCrunchPath = srcPath + "/creator-test-data/speedcrunch/src/CMakeLists.txt"
|
|
||||||
cleanup()
|
|
||||||
|
|
||||||
def cleanup():
|
def cleanup():
|
||||||
global BuildPath
|
global BuildPath
|
||||||
# Make sure the .user files are gone
|
|
||||||
cleanUpUserFiles(SpeedCrunchPath)
|
|
||||||
deleteDirIfExists(BuildPath)
|
deleteDirIfExists(BuildPath)
|
||||||
|
@@ -5,16 +5,21 @@ source("../../shared/qtcreator.py")
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
pathCreator = srcPath + "/creator/qtcreator.pro"
|
pathCreator = srcPath + "/creator/qtcreator.pro"
|
||||||
pathSpeedcrunch = srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro"
|
if not neededFilePresent(pathCreator):
|
||||||
if not neededFilePresent(pathCreator) or not neededFilePresent(pathSpeedcrunch):
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
with GitClone("https://bitbucket.org/heldercorreia/speedcrunch.git",
|
||||||
|
"0.11") as pathSpeedcrunch:
|
||||||
|
if not pathSpeedcrunch:
|
||||||
|
test.fatal("Could not clone SpeedCrunch")
|
||||||
|
return
|
||||||
startQC()
|
startQC()
|
||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
return
|
||||||
|
|
||||||
runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton')
|
runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton')
|
||||||
openQmakeProject(pathSpeedcrunch, [Targets.DESKTOP_5_14_1_DEFAULT])
|
openQmakeProject(os.path.join(pathSpeedcrunch, "src", "speedcrunch.pro"),
|
||||||
|
[Targets.DESKTOP_5_14_1_DEFAULT])
|
||||||
# Wait for parsing to complete
|
# Wait for parsing to complete
|
||||||
waitFor("runButton.enabled", 30000)
|
waitFor("runButton.enabled", 30000)
|
||||||
# Starting before opening, because this is where Creator froze (QTCREATORBUG-10733)
|
# Starting before opening, because this is where Creator froze (QTCREATORBUG-10733)
|
||||||
@@ -50,6 +55,5 @@ def init():
|
|||||||
|
|
||||||
def cleanup():
|
def cleanup():
|
||||||
# Make sure the .user files are gone
|
# Make sure the .user files are gone
|
||||||
cleanUpUserFiles([srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro",
|
cleanUpUserFiles([srcPath + "/creator/qtcreator.pro"])
|
||||||
srcPath + "/creator/qtcreator.pro"])
|
|
||||||
|
|
||||||
|
@@ -1534,6 +1534,7 @@ TEST(SmallString, LongPathStringMoveConstuctor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
|
QT_WARNING_DISABLE_GCC("-Wpragmas")
|
||||||
QT_WARNING_DISABLE_GCC("-Wself-move")
|
QT_WARNING_DISABLE_GCC("-Wself-move")
|
||||||
QT_WARNING_DISABLE_CLANG("-Wself-move")
|
QT_WARNING_DISABLE_CLANG("-Wself-move")
|
||||||
|
|
||||||
|