Doc: Remove info about old way of marking syntax errors
Remove some redundancy by only describing annotations because Clang is now used by default. Task-number: QTCREATORBUG-27560 Change-Id: I02a950eac827f36575ab3bd60be9348c4b642824 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 10 KiB |
BIN
doc/qtcreator/images/qtcreator-qml-js-editing.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 19 KiB |
@@ -31,35 +31,25 @@
|
||||
\title Checking Code Syntax
|
||||
|
||||
As you write code, \QC checks code syntax. When \QC spots a syntax error in
|
||||
your code it underlines it and shows error details when you move the mouse
|
||||
pointer over the error. Similarly, when you are working on an instance of a
|
||||
JavaScript object notation (JSON) entity, \QC underlines errors in JSON data
|
||||
structure.
|
||||
your code, it underlines it, displays an icon, and shows error details when
|
||||
you move the mouse pointer over the error or the icon. If a fix is available,
|
||||
you can apply it by clicking \inlineimage icons/refactormarker.png
|
||||
.
|
||||
|
||||
Similarly, when you are working on an instance of a JavaScript object
|
||||
notation (JSON) entity, \QC underlines errors in the JSON data structure.
|
||||
|
||||
\if defined(qtcreator)
|
||||
In the following screenshot, \QC points out an error, because a semicolon is
|
||||
In the following screenshot, \QC annotates an error because a semicolon is
|
||||
missing at the end of the line:
|
||||
|
||||
\image qtcreator-syntaxerror.png
|
||||
|
||||
In the following screenshot, \QC issues a warning, because the variable is
|
||||
In the following screenshot, \QC issues a warning because the variable is
|
||||
not used:
|
||||
|
||||
\image qtcreator-semanticerror.png
|
||||
|
||||
To modify the colors used for underlining errors and warnings, select
|
||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} >
|
||||
\uicontrol {Font & Colors} > \uicontrol Copy, and select new colors for
|
||||
\uicontrol Error and \uicontrol Warning.
|
||||
|
||||
\section1 Viewing Annotations
|
||||
|
||||
When using the Clang code model, errors and warnings are additionally marked
|
||||
with icons and annotated. If a \l{http://clang.llvm.org/diagnostics.html}
|
||||
{Clang fix-it} is available, you can execute it by clicking the
|
||||
\inlineimage icons/refactormarker.png
|
||||
icon and pressing \key Enter.
|
||||
|
||||
In the following screenshot, a Qt class name contains a typo:
|
||||
|
||||
\image qtcreator-typo-clang.png
|
||||
@@ -69,14 +59,10 @@
|
||||
the \uicontrol {Annotation Settings} link to specify the position
|
||||
of the line annotations.
|
||||
|
||||
In the following screenshot, a semicolon is missing at the end of the
|
||||
line.
|
||||
|
||||
\image qtcreator-syntaxerror-clang.png
|
||||
|
||||
In the following screenshot, the variable is not used.
|
||||
|
||||
\image qtcreator-semanticerror-clang.png
|
||||
To modify the colors used for underlining errors and warnings, select
|
||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} >
|
||||
\uicontrol {Font & Colors} > \uicontrol Copy, and select new colors for
|
||||
\uicontrol Error and \uicontrol Warning.
|
||||
|
||||
\else
|
||||
In addition to underlining, errors and warnings are marked with icons and
|
||||
@@ -87,7 +73,7 @@
|
||||
|
||||
\image qml-syntax-check.png
|
||||
|
||||
\section2 Specifying Line Annotation Positions
|
||||
\section1 Specifying Line Annotation Positions
|
||||
|
||||
To specify the position where the annotations are displayed, select
|
||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Text Editor} >
|
||||
|