diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-03-29 15:40:11 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-03-29 17:43:16 -0300 |
commit | 0114d40f9488170f1ff979e8fca994075dbc4b47 (patch) | |
tree | c94c32c4da023af980b31df74c40f0ddd2c8ffc7 | |
parent | f238cebb57200ce38796fad8f78801446943ebff (diff) |
Remove workaround used to fix bug 540 ("Duplicate entries in QRegExp docs") as it's now really fixed.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r-- | generators/qtdoc/qtdocgenerator.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/generators/qtdoc/qtdocgenerator.cpp b/generators/qtdoc/qtdocgenerator.cpp index ae7dcadf4..4c4a56812 100644 --- a/generators/qtdoc/qtdocgenerator.cpp +++ b/generators/qtdoc/qtdocgenerator.cpp @@ -40,11 +40,36 @@ static Indentor INDENT; static bool shouldSkip(const AbstractMetaFunction* func) { - return func->isConstructor() - || func->isModifiedRemoved() - || func->declaringClass() != func->ownerClass() - || func->isCastOperator() - || func->name() == "operator="; + bool skipable = func->isConstructor() + || func->isModifiedRemoved() + || func->declaringClass() != func->ownerClass() + || func->isCastOperator() + || func->name() == "operator="; + + // Search a const clone + if (!skipable && !func->isConstant()) { + const AbstractMetaArgumentList funcArgs = func->arguments(); + foreach (AbstractMetaFunction* f, func->ownerClass()->functions()) { + if (f != func + && f->isConstant() + && f->name() == func->name() + && f->arguments().count() == funcArgs.count()) { + // Compare each argument + bool cloneFound = true; + + const AbstractMetaArgumentList fargs = f->arguments(); + for (int i = 0, max = funcArgs.count(); i < max; ++i) { + if (funcArgs.at(i)->type()->typeEntry() != fargs.at(i)->type()->typeEntry()) { + cloneFound = false; + break; + } + } + if (cloneFound) + return true; + } + } + } + return skipable; } static bool functionSort(const AbstractMetaFunction *func1, const AbstractMetaFunction *func2) |