summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lupdate
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-09-18 10:35:12 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-09-23 13:44:28 (GMT)
commit313c49628ac74f647df0f3b1e2a660ebd1f4436c (patch)
treeb62d459502c50c799d841da6b77c81268a488f5a /tools/linguist/lupdate
parent13fa5aa35e6cbf6bf7710952f541810fee7bba27 (diff)
downloadQt-313c49628ac74f647df0f3b1e2a660ebd1f4436c.zip
Qt-313c49628ac74f647df0f3b1e2a660ebd1f4436c.tar.gz
Qt-313c49628ac74f647df0f3b1e2a660ebd1f4436c.tar.bz2
remove dead code
needsTrFunctions was never set any more
Diffstat (limited to 'tools/linguist/lupdate')
-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 f6ebfb1..c6f38a0 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) {