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

@@ -54,8 +54,9 @@ class SnippetsCollection : public QObject
{
Q_OBJECT
public:
SnippetsCollection();
~SnippetsCollection();
virtual ~SnippetsCollection();
static SnippetsCollection *instance();
class Hint
{
@@ -100,6 +101,9 @@ private slots:
void identifyGroups();
private:
SnippetsCollection();
Q_DISABLE_COPY(SnippetsCollection)
int groupIndex(const QString &groupId) const;
bool isGroupKnown(const QString &groupId) const;
@@ -123,7 +127,8 @@ private:
static const QLatin1String kModified;
// Built-in snippets are specified in XMLs distributed in a system's folder. Snippets
// created or modified/removed (if they are built-ins) by the user are stored in another
// created or modified/removed (if they are built-ins) by the user are stored in user's
// folder.
QString m_userSnippetsPath;
QString m_userSnippetsFile;
QStringList m_builtInSnippetsFiles;