diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-23 15:21:58 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:10:01 -0300 |
commit | 3026fe34cabf67394c7d45becccf30e8fd9e0a2e (patch) | |
tree | 34ab1b16ff1a93d9214d3122ae0f18d65afe51b5 /abstractmetabuilder.cpp | |
parent | b42f0be98cf4a4e679d4ec6c50447ae1ae817efe (diff) |
Remove detection of duplicated enum values, this was implemented due to a bug on boost::python which
doesn't exists nowadays.
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r-- | abstractmetabuilder.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp index d12cd9411..d6b348ae3 100644 --- a/abstractmetabuilder.cpp +++ b/abstractmetabuilder.cpp @@ -803,55 +803,6 @@ void AbstractMetaBuilder::figureOutEnumValuesForClass(AbstractMetaClass *metaCla lst.at(i)->setValue(value); value++; } - -#ifndef APIEXTRACTOR_ENABLE_DUPLICATE_ENUM_VALUES - // Check for duplicate values... - EnumTypeEntry *ete = e->typeEntry(); - if (!ete->forceInteger()) { - QHash<int, AbstractMetaEnumValue *> entries; - foreach (AbstractMetaEnumValue *v, lst) { - - bool vRejected = ete->isEnumValueRejected(v->name()); - - AbstractMetaEnumValue *current = entries.value(v->value()); - if (current) { - bool currentRejected = ete->isEnumValueRejected(current->name()); - if (!currentRejected && !vRejected) { - ReportHandler::warning( - QString("duplicate enum values: %1::%2, %3 and %4 are %5, already rejected: (%6)") - .arg(metaClass->name()) - .arg(e->name()) - .arg(v->name()) - .arg(entries[v->value()]->name()) - .arg(v->value()) - .arg(ete->enumValueRejections().join(", "))); - continue; - } - } - - if (!vRejected) - entries[v->value()] = v; - } - - // Entries now contain all the original entries, no - // rejected ones... Use this to generate the enumValueRedirection table. - foreach (AbstractMetaEnumValue *reject, lst) { - if (!ete->isEnumValueRejected(reject->name())) - continue; - - AbstractMetaEnumValue *used = entries.value(reject->value()); - if (!used) { - ReportHandler::warning( - QString::fromLatin1("Rejected enum has no alternative...: %1::%2\n") - .arg(metaClass->name()) - .arg(reject->name())); - continue; - } - ete->addEnumValueRedirection(reject->name(), used->name()); - } - - } -#endif } *classes += metaClass; |