diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-09 14:05:20 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-09 14:05:20 (GMT) |
commit | f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2 (patch) | |
tree | 56b9e94aea9571cda947dca8ca5bfc000c6effed /tools/linguist | |
parent | d85b149a5c7f3532f8e1a593a79298c9ae38a95f (diff) | |
parent | bb966fe9dd8be25530da5a66727c7fe2123fafbb (diff) | |
download | Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.zip Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.tar.gz Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'tools/linguist')
-rw-r--r-- | tools/linguist/lupdate/cpp.cpp | 28 | ||||
-rw-r--r-- | tools/linguist/phrasebooks/russian.qph | 40 |
2 files changed, 60 insertions, 8 deletions
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp index 6bd9108..2d5620e 100644 --- a/tools/linguist/lupdate/cpp.cpp +++ b/tools/linguist/lupdate/cpp.cpp @@ -260,6 +260,8 @@ private: bool qualifyOneCallbackOwn(const Namespace *ns, void *context) const; bool qualifyOneCallbackUsing(const Namespace *ns, void *context) const; bool qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment, + NamespaceList *resolved, QSet<HashStringList> *visitedUsings) const; + bool qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment, NamespaceList *resolved) const; bool fullyQualify(const NamespaceList &namespaces, int nsCnt, const QList<HashString> &segments, bool isDeclaration, @@ -1036,15 +1038,16 @@ QStringList CppParser::stringListifySegments(const QList<HashString> &segments) } struct QualifyOneData { - QualifyOneData(const NamespaceList &ns, int nsc, const HashString &seg, NamespaceList *rslvd) - : namespaces(ns), nsCount(nsc), segment(seg), resolved(rslvd) + QualifyOneData(const NamespaceList &ns, int nsc, const HashString &seg, NamespaceList *rslvd, + QSet<HashStringList> *visited) + : namespaces(ns), nsCount(nsc), segment(seg), resolved(rslvd), visitedUsings(visited) {} const NamespaceList &namespaces; int nsCount; const HashString &segment; NamespaceList *resolved; - QSet<HashStringList> visitedUsings; + QSet<HashStringList> *visitedUsings; }; bool CppParser::qualifyOneCallbackOwn(const Namespace *ns, void *context) const @@ -1078,18 +1081,19 @@ bool CppParser::qualifyOneCallbackUsing(const Namespace *ns, void *context) cons { QualifyOneData *data = (QualifyOneData *)context; foreach (const HashStringList &use, ns->usings) - if (!data->visitedUsings.contains(use)) { - data->visitedUsings.insert(use); - if (qualifyOne(use.value(), use.value().count(), data->segment, data->resolved)) + if (!data->visitedUsings->contains(use)) { + data->visitedUsings->insert(use); + if (qualifyOne(use.value(), use.value().count(), data->segment, data->resolved, + data->visitedUsings)) return true; } return false; } bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment, - NamespaceList *resolved) const + NamespaceList *resolved, QSet<HashStringList> *visitedUsings) const { - QualifyOneData data(namespaces, nsCnt, segment, resolved); + QualifyOneData data(namespaces, nsCnt, segment, resolved, visitedUsings); if (visitNamespace(namespaces, nsCnt, &CppParser::qualifyOneCallbackOwn, &data)) return true; @@ -1097,6 +1101,14 @@ bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const Has return visitNamespace(namespaces, nsCnt, &CppParser::qualifyOneCallbackUsing, &data); } +bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment, + NamespaceList *resolved) const +{ + QSet<HashStringList> visitedUsings; + + return qualifyOne(namespaces, nsCnt, segment, resolved, &visitedUsings); +} + bool CppParser::fullyQualify(const NamespaceList &namespaces, int nsCnt, const QList<HashString> &segments, bool isDeclaration, NamespaceList *resolved, QStringList *unresolved) const diff --git a/tools/linguist/phrasebooks/russian.qph b/tools/linguist/phrasebooks/russian.qph index 9d40bd3..ae1a9b9 100644 --- a/tools/linguist/phrasebooks/russian.qph +++ b/tools/linguist/phrasebooks/russian.qph @@ -1164,4 +1164,44 @@ <source>Table of Contents</source> <target>Оглавление</target> </phrase> +<phrase> + <source>parse</source> + <target>разобрать</target> +</phrase> +<phrase> + <source>parsing</source> + <target>разбор</target> +</phrase> +<phrase> + <source>phrasebook</source> + <target>глоссарий</target> +</phrase> +<phrase> + <source>phrase book</source> + <target>глоссарий</target> +</phrase> +<phrase> + <source>In use</source> + <target>Используется</target> +</phrase> +<phrase> + <source>Access denied</source> + <target>Доступ запрещён</target> +</phrase> +<phrase> + <source>No error</source> + <target>Нет ошибки</target> +</phrase> +<phrase> + <source>Not supported</source> + <target>Не поддерживается</target> +</phrase> +<phrase> + <source>Already exists</source> + <target>Уже существует</target> +</phrase> +<phrase> + <source>Permission denied</source> + <target>Доступ запрещён</target> +</phrase> </QPH> |