Snippets: Remove the snippets manager

Let the collection itself be the singleton.
This commit is contained in:
Leandro Melo
2010-12-08 16:05:48 +01:00
parent e699f5d594
commit fabf76d202
7 changed files with 19 additions and 135 deletions

View File

@@ -28,7 +28,6 @@
**************************************************************************/
#include "snippetcollector.h"
#include "snippetsmanager.h"
#include "snippetscollection.h"
#include <texteditor/texteditorconstants.h>
@@ -44,8 +43,7 @@ void appendSnippets(ICompletionCollector *collector,
const QIcon &icon,
int order)
{
QSharedPointer<SnippetsCollection> collection =
SnippetsManager::instance()->snippetsCollection();
SnippetsCollection *collection = SnippetsCollection::instance();
const int size = collection->totalActiveSnippets(groupId);
for (int i = 0; i < size; ++i) {
const Snippet &snippet = collection->snippet(i, groupId);