summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2011-04-15 16:19:23 +0200
committerLeandro Melo <leandro.melo@nokia.com>2011-05-18 10:46:20 +0200
commitbec4f02495b97b17e0b0f8cb67d0909634c16228 (patch)
tree21759e0b9ebc6b0dca84f01875223020665d7843 /src/plugins/cpptools/cpptoolsplugin.cpp
parentd835b769c7d6b37e59a8a74a0d68260d34e7a7f9 (diff)
downloadqt-creator-bec4f02495b97b17e0b0f8cb67d0909634c16228.tar.gz
New code assist API
This is a re-work of our completion engine. Primary goals are: - Allow the computation to run in a separate thread so the GUI is not locked. - Support a model-based approach. QStrings are still needed (filtering, etc), but internal structures are free to use more efficient representations. - Unifiy all kinds of *assist* into a more reusable and extensible framework. - Remove unnecessary dependencies on the text editor so we have more generic and easily "plugable" components (still things to be resolved).
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index 44f2da4639..8bff1f858f 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -34,13 +34,13 @@
#include "completionsettingspage.h"
#include "cppfilesettingspage.h"
#include "cppclassesfilter.h"
-#include "cppcodecompletion.h"
#include "cppfunctionsfilter.h"
#include "cppcurrentdocumentfilter.h"
#include "cppmodelmanager.h"
#include "cpptoolsconstants.h"
#include "cpplocatorfilter.h"
#include "symbolsfindfilter.h"
+#include "cppcompletionassist.h"
#include <extensionsystem/pluginmanager.h>
@@ -113,9 +113,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
m_modelManager, SLOT(updateSourceFiles(QStringList)));
addAutoReleasedObject(m_modelManager);
- CppCodeCompletion *completion = new CppCodeCompletion(m_modelManager);
- addAutoReleasedObject(completion);
-
+ addAutoReleasedObject(new CppCompletionAssistProvider);
addAutoReleasedObject(new CppLocatorFilter(m_modelManager));
addAutoReleasedObject(new CppClassesFilter(m_modelManager));
addAutoReleasedObject(new CppFunctionsFilter(m_modelManager));
@@ -141,12 +139,6 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
mcpptools->addAction(command);
connect(switchAction, SIGNAL(triggered()), this, SLOT(switchHeaderSource()));
- // Set completion settings and keep them up to date
- TextEditor::TextEditorSettings *textEditorSettings = TextEditor::TextEditorSettings::instance();
- completion->setCompletionSettings(textEditorSettings->completionSettings());
- connect(textEditorSettings, SIGNAL(completionSettingsChanged(TextEditor::CompletionSettings)),
- completion, SLOT(setCompletionSettings(TextEditor::CompletionSettings)));
-
return true;
}