Doc: Update info about resetting the QML code model

- Add the case where you cannot see your new QML module.
- Remove obsolete use case and message.

Task-number: QTCREATORBUG-29826
Change-Id: I29c2852d32007c64e343bcbe30a1d218f9ff89d3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Leena Miettinen
2024-03-25 17:31:22 +01:00
parent 44bf71169c
commit a59c93d20b
2 changed files with 16 additions and 12 deletions

View File

@@ -747,24 +747,21 @@
\section1 Resetting the Code Model \section1 Resetting the Code Model
If you change the build and run kit when you have QML files open in the code If you see the following error messages after you add a new QML module,
editor, the code model might become corrupt. The following error message try building the project and then resetting the code model:
indicates that this might have happened: \e{Using Qt Quick 1 code model
instead of Qt Quick 2}.
To see the error message, move the mouse pointer over code that \list
\li QML module not found.
\li Unknown Component (M300).
\endlist
To see an error message, move the mouse pointer over code that
\QC underlines in the code editor or when you open a QML file in \QDS. \QC underlines in the code editor or when you open a QML file in \QDS.
To reset the code model, select \uicontrol Tools > \uicontrol {QML/JS} > To reset the code model, select \uicontrol Tools > \uicontrol {QML/JS} >
\uicontrol {Reset Code Model}. \uicontrol {Reset Code Model}.
\if defined(qtcreator) \sa {Check code syntax}, {Using QML Modules with Plugins}
If this does not help, try changing the QML emulation layer to the one that
was built with the same Qt version as the one selected in the build and run
kit.
\endif
\sa {Check code syntax}
*/ */
/*! /*!

View File

@@ -67,6 +67,11 @@
\li Import the module into the project, as instructed in \li Import the module into the project, as instructed in
\l {Importing QML Modules}. \l {Importing QML Modules}.
\endlist \endlist
\note If \QC cannot find the new QML module, build the project
and then go to \uicontrol {Tools} > \uicontrol {QML/JS} >
\uicontrol {Reset Code Model} to reset the code model.
\else \else
\li Build your module using the same Qt version and compiler as \QDS. \li Build your module using the same Qt version and compiler as \QDS.
For more information, see \l {Running QML Modules in Design Mode}. For more information, see \l {Running QML Modules in Design Mode}.
@@ -143,4 +148,6 @@
used only in the \uicontrol Design mode. used only in the \uicontrol Design mode.
For an example, see \l {Qt Quick Controls - Contact List}. For an example, see \l {Qt Quick Controls - Contact List}.
\endif \endif
\sa {Resetting the Code Model}
*/ */