summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-12-04 19:25:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 19:48:45 +0100
commit284e671c064a5ff942b668f982c3b061bd3187ee (patch)
tree70cef4b557061ed5334f2405aba4037d3c9e6b1c /src
parent3a184f6a0e54dc3aecb050f6085af902ca4e7c7e (diff)
use NamespaceList more consistently
as we use HashString for the segments in *qualify*(), we should use the respective typedef'd container. Change-Id: I21e986bac951b45e556a425d0eaba4e2a736e9cf Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/linguist/lupdate/cpp.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp
index fc73091ed..c9cb34c09 100644
--- a/src/linguist/lupdate/cpp.cpp
+++ b/src/linguist/lupdate/cpp.cpp
@@ -283,7 +283,7 @@ private:
VisitRecorder &vr, const ParseResults *rslt) const;
bool visitNamespace(const NamespaceList &namespaces, int nsCount,
VisitNamespaceCallback callback, void *context) const;
- static QStringList stringListifySegments(const QList<HashString> &namespaces);
+ static QStringList stringListifySegments(const NamespaceList &namespaces);
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,
@@ -291,10 +291,10 @@ private:
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,
+ const NamespaceList &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const;
bool fullyQualify(const NamespaceList &namespaces,
- const QList<HashString> &segments, bool isDeclaration,
+ const NamespaceList &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const;
bool fullyQualify(const NamespaceList &namespaces,
const QString &segments, bool isDeclaration,
@@ -1079,7 +1079,7 @@ bool CppParser::visitNamespace(const NamespaceList &namespaces, int nsCount,
return visitNamespace(namespaces, nsCount, callback, context, vr, results);
}
-QStringList CppParser::stringListifySegments(const QList<HashString> &segments)
+QStringList CppParser::stringListifySegments(const NamespaceList &segments)
{
QStringList ret;
for (int i = 0; i < segments.count(); ++i)
@@ -1160,7 +1160,7 @@ bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const Has
}
bool CppParser::fullyQualify(const NamespaceList &namespaces, int nsCnt,
- const QList<HashString> &segments, bool isDeclaration,
+ const NamespaceList &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const
{
int nsIdx;
@@ -1201,7 +1201,7 @@ bool CppParser::fullyQualify(const NamespaceList &namespaces, int nsCnt,
}
bool CppParser::fullyQualify(const NamespaceList &namespaces,
- const QList<HashString> &segments, bool isDeclaration,
+ const NamespaceList &segments, bool isDeclaration,
NamespaceList *resolved, QStringList *unresolved) const
{
return fullyQualify(namespaces, namespaces.count(),
@@ -1214,7 +1214,7 @@ bool CppParser::fullyQualify(const NamespaceList &namespaces,
{
static QString strColons(QLatin1String("::"));
- QList<HashString> segments;
+ NamespaceList segments;
foreach (const QString &str, quali.split(strColons)) // XXX slow, but needs to be fast(?)
segments << HashString(str);
return fullyQualify(namespaces, segments, isDeclaration, resolved, unresolved);
@@ -1666,7 +1666,7 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac
*/
yyTok = getToken();
if (yyBraceDepth == namespaceDepths.count() && yyParenDepth == 0) {
- QList<HashString> quali;
+ NamespaceList quali;
HashString fct;
do {
/*
@@ -1750,7 +1750,7 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac
yyTok = getToken();
} else if (yyTok == Tok_Equals) {
// e.g. namespace Is = OuterSpace::InnerSpace;
- QList<HashString> fullName;
+ NamespaceList fullName;
yyTok = getToken();
if (yyTok == Tok_ColonColon)
fullName.append(HashString(QString()));
@@ -1778,7 +1778,7 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac
yyTok = getToken();
// XXX this should affect only the current scope, not the entire current namespace
if (yyTok == Tok_namespace) {
- QList<HashString> fullName;
+ NamespaceList fullName;
yyTok = getToken();
if (yyTok == Tok_ColonColon)
fullName.append(HashString(QString()));
@@ -1794,7 +1794,7 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac
if (fullyQualify(namespaces, fullName, false, &nsl, 0))
modifyNamespace(&namespaces)->usings << HashStringList(nsl);
} else {
- QList<HashString> fullName;
+ NamespaceList fullName;
if (yyTok == Tok_ColonColon)
fullName.append(HashString(QString()));
while (yyTok == Tok_ColonColon || yyTok == Tok_Ident) {