Warning, file /sdk/lokalize/src/completionstorage.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002   This file is part of Lokalize
0003 
0004   SPDX-FileCopyrightText: 2009 Nick Shaforostoff <shafff@ukr.net>
0005   SPDX-FileCopyrightText: 2018-2019 Simon Depiets <sdepiets@gmail.com>
0006 
0007   SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0008 */
0009 
0010 
0011 #ifndef COMPLETIONSTORAGE_H
0012 #define COMPLETIONSTORAGE_H
0013 #include <QMap>
0014 #include "catalog.h"
0015 
0016 class CompletionStorage
0017 {
0018 private:
0019     CompletionStorage(): rxSplit("\\W+|\\d+") {}
0020     ~CompletionStorage() {}
0021     static CompletionStorage* _instance;
0022     static void cleanupCompletionStorage();
0023 public:
0024     static CompletionStorage* instance();
0025 
0026     void scanCatalog(Catalog*);
0027     QStringList makeCompletion(const QString&) const;
0028 
0029 public:
0030     QRegExp rxSplit;
0031 private:
0032     QMap<QString, int> m_words; //how many occurencies a word has
0033     //QSet save which files we scanned?
0034 };
0035 
0036 #endif // COMPLETIONSTORAGE_H