diff --git a/doc/src/editors/creator-coding-edit-mode.qdoc b/doc/src/editors/creator-coding-edit-mode.qdoc index 4da42fe161932e93fff985465cc521721d41b291..dac877fc123e4437cf5b4f84843769fc35587525 100644 --- a/doc/src/editors/creator-coding-edit-mode.qdoc +++ b/doc/src/editors/creator-coding-edit-mode.qdoc @@ -170,12 +170,10 @@ If you change the default behavior, the shortcuts for opening link targets in the next split are used to open them in the current split. - \section1 Using Update Code Model - - To refresh the internal information in \QC pertaining to your code, - select \gui{Tools} > \gui{C++} > \gui{Update Code Model}. - - \note In \QC indexing updates the code automatically. Use - \gui{Update Code Model} only as an emergency command. + \section1 Reparsing Externally Changed Files + If source files are modified from outside \QC, the opened files will be + reparsed automatically. For all other files, you can use \gui{Tools} > + \gui{C++} > \gui{Reparse Externally Changed Files} to update the code + model. */ diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index 62640202505f326011c4a5bbfbfca2c6383b9da9..4735be7018bb2d98fef2ba87eebb534f639a4c2d 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -102,7 +102,7 @@ CppEditorPlugin::CppEditorPlugin() : m_sortedOutline(false), m_renameSymbolUnderCursorAction(0), m_findUsagesAction(0), - m_updateCodeModelAction(0), + m_reparseExternallyChangedFiles(0), m_openTypeHierarchyAction(0), m_openIncludeHierarchyAction(0), m_quickFixProvider(0) @@ -272,10 +272,10 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err // Update context in global context cppToolsMenu->addSeparator(globalContext); - m_updateCodeModelAction = new QAction(tr("Update Code Model"), this); - cmd = ActionManager::registerAction(m_updateCodeModelAction, Constants::UPDATE_CODEMODEL, globalContext); + m_reparseExternallyChangedFiles = new QAction(tr("Reparse Externally Changed Files"), this); + cmd = ActionManager::registerAction(m_reparseExternallyChangedFiles, Constants::UPDATE_CODEMODEL, globalContext); CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance(); - connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles())); + connect(m_reparseExternallyChangedFiles, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles())); cppToolsMenu->addAction(cmd); m_actionHandler = new TextEditor::TextEditorActionHandler(CppEditor::Constants::C_CPPEDITOR, @@ -359,7 +359,7 @@ void CppEditorPlugin::onTaskStarted(Core::Id type) if (type == CppTools::Constants::TASK_INDEX) { m_renameSymbolUnderCursorAction->setEnabled(false); m_findUsagesAction->setEnabled(false); - m_updateCodeModelAction->setEnabled(false); + m_reparseExternallyChangedFiles->setEnabled(false); m_openTypeHierarchyAction->setEnabled(false); m_openIncludeHierarchyAction->setEnabled(false); } @@ -370,7 +370,7 @@ void CppEditorPlugin::onAllTasksFinished(Core::Id type) if (type == CppTools::Constants::TASK_INDEX) { m_renameSymbolUnderCursorAction->setEnabled(true); m_findUsagesAction->setEnabled(true); - m_updateCodeModelAction->setEnabled(true); + m_reparseExternallyChangedFiles->setEnabled(true); m_openTypeHierarchyAction->setEnabled(true); m_openIncludeHierarchyAction->setEnabled(true); } diff --git a/src/plugins/cppeditor/cppeditorplugin.h b/src/plugins/cppeditor/cppeditorplugin.h index 427d7302876e1ff89e961f08b747b641e1cc8c31..99b0bdc811ddbd182d539d505790794e74ecc6b0 100644 --- a/src/plugins/cppeditor/cppeditorplugin.h +++ b/src/plugins/cppeditor/cppeditorplugin.h @@ -312,7 +312,7 @@ private: bool m_sortedOutline; QAction *m_renameSymbolUnderCursorAction; QAction *m_findUsagesAction; - QAction *m_updateCodeModelAction; + QAction *m_reparseExternallyChangedFiles; QAction *m_openTypeHierarchyAction; QAction *m_openIncludeHierarchyAction;