summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-09-18 12:35:12 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-09-23 15:44:28 +0200
commit313c49628ac74f647df0f3b1e2a660ebd1f4436c (patch)
treeb62d459502c50c799d841da6b77c81268a488f5a /tools
parent13fa5aa35e6cbf6bf7710952f541810fee7bba27 (diff)
downloadqt4-tools-313c49628ac74f647df0f3b1e2a660ebd1f4436c.tar.gz
remove dead code
needsTrFunctions was never set any more
Diffstat (limited to 'tools')
-rw-r--r--tools/linguist/lupdate/cpp.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index f6ebfb1fab..c6f38a06bc 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -76,7 +76,7 @@ struct Namespace {
Namespace() :
isClass(false),
- hasTrFunctions(false), needsTrFunctions(false), complained(false)
+ hasTrFunctions(false), complained(false)
{}
QString name;
@@ -89,7 +89,6 @@ struct Namespace {
bool isClass;
bool hasTrFunctions;
- bool needsTrFunctions;
bool complained; // ... that tr functions are missing.
};
@@ -875,7 +874,6 @@ Namespace *ParseResults::include(Namespace *that, const Namespace *other)
// (though not necessary) if they are shared
thisSub->isClass |= otherSub->isClass;
thisSub->hasTrFunctions |= otherSub->hasTrFunctions;
- thisSub->needsTrFunctions |= otherSub->needsTrFunctions;
thisSub->complained |= otherSub->complained;
if (Namespace *newSub = include(thisSub, otherSub)) {
@@ -1843,17 +1841,8 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
#endif
break;
case Tok_RightBrace:
- if (yyBraceDepth + 1 == namespaceDepths.count()) {
- // class or namespace
- Namespace *ns = namespaces.last();
- if (ns->needsTrFunctions && !ns->hasTrFunctions && !ns->complained) {
- qWarning("%s:%d: Class '%s' lacks Q_OBJECT macro\n",
- qPrintable(yyFileName), yyLineNo,
- qPrintable(stringifyNamespace(namespaces)));
- ns->complained = true;
- }
+ if (yyBraceDepth + 1 == namespaceDepths.count()) // class or namespace
truncateNamespaces(&namespaces, namespaceDepths.pop());
- }
if (yyBraceDepth == namespaceDepths.count()) {
// function, class or namespace
if (!yyBraceDepth && !directInclude) {