aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-08-24 16:46:37 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-08-24 16:54:42 -0300
commit25dc57003ae47dd6d66cd44156872ff484868bce (patch)
tree91cf650b6c43a01592d986bafb49d66afe94ecc5
parenta55f92588474349b8b5623525b359c655e950fec (diff)
Fix bug#308 - "Confusing error for wrong argument types"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
-rw-r--r--cppgenerator.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 6b7fe9e88..28d23f98c 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -1355,9 +1355,16 @@ void CppGenerator::writeErrorSection(QTextStream& s, OverloadData& overloadData)
const PrimitiveTypeEntry* ptp = reinterpret_cast<const PrimitiveTypeEntry*>(argType->typeEntry());
while (ptp->aliasedTypeEntry())
ptp = ptp->aliasedTypeEntry();
- strArg = ptp->name().replace(QRegExp("^signed\\s+"), "");
- if (strArg == "double")
- strArg = "float";
+
+ if (strArg == "QString") {
+ strArg = "unicode";
+ } else if (strArg == "QChar") {
+ strArg = "1-unicode";
+ } else {
+ strArg = ptp->name().replace(QRegExp("^signed\\s+"), "");
+ if (strArg == "double")
+ strArg = "float";
+ }
} else if (argType->typeEntry()->isContainer()) {
strArg = argType->fullName();
if (strArg == "QList" || strArg == "QVector"