From a59c93d20bd26cc56a332b91653bfac0902b5f34 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 25 Mar 2024 17:31:22 +0100 Subject: [PATCH] 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 --- .../src/editors/creator-code-syntax.qdoc | 21 ++++++++----------- .../qtquick/qtquick-modules-with-plugins.qdoc | 7 +++++++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/qtcreator/src/editors/creator-code-syntax.qdoc b/doc/qtcreator/src/editors/creator-code-syntax.qdoc index dbd172678e3..65f8e5d1151 100644 --- a/doc/qtcreator/src/editors/creator-code-syntax.qdoc +++ b/doc/qtcreator/src/editors/creator-code-syntax.qdoc @@ -747,24 +747,21 @@ \section1 Resetting the Code Model - If you change the build and run kit when you have QML files open in the code - editor, the code model might become corrupt. The following error message - indicates that this might have happened: \e{Using Qt Quick 1 code model - instead of Qt Quick 2}. + If you see the following error messages after you add a new QML module, + try building the project and then resetting the code model: - 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. To reset the code model, select \uicontrol Tools > \uicontrol {QML/JS} > \uicontrol {Reset Code Model}. - \if defined(qtcreator) - 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} + \sa {Check code syntax}, {Using QML Modules with Plugins} */ /*! diff --git a/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc b/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc index 281c17319c6..abaf7cca359 100644 --- a/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-modules-with-plugins.qdoc @@ -67,6 +67,11 @@ \li Import the module into the project, as instructed in \l {Importing QML Modules}. \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 \li Build your module using the same Qt version and compiler as \QDS. For more information, see \l {Running QML Modules in Design Mode}. @@ -143,4 +148,6 @@ used only in the \uicontrol Design mode. For an example, see \l {Qt Quick Controls - Contact List}. \endif + + \sa {Resetting the Code Model} */