summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-22 14:42:32 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-22 15:22:13 -0300
commitd96d5df9b8d3f5caaa66a7f75f2f8fe1a1395159 (patch)
tree4d896dc599ed3f22805b8753f45c8f08a6d0241c
parentb8de1873b727e57ce627a3826e2fc7c3874a847d (diff)
downloadshiboken-d96d5df9b8d3f5caaa66a7f75f2f8fe1a1395159.tar.gz
shiboken-d96d5df9b8d3f5caaa66a7f75f2f8fe1a1395159.tar.xz
shiboken-d96d5df9b8d3f5caaa66a7f75f2f8fe1a1395159.zip
Fix error message for containers, replacing QList by list, QHash by dict, etc.
Reviewer: Bruno Ara├║jo <bruno.araujo@openbossa.org> Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org>
-rw-r--r--cppgenerator.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 3d0ee5f3..e8590413 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -1006,6 +1006,18 @@ void CppGenerator::writeErrorSection(QTextStream& s, OverloadData& overloadData)
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"
+ || strArg == "QLinkedList" || strArg == "QStack"
+ || strArg == "QQueue") {
+ strArg = "list";
+ } else if (strArg == "QMap" || strArg == "QHash"
+ || strArg == "QMultiMap" || strArg == "QMultiHash") {
+ strArg = "dict";
+ } else if (strArg == "QPair") {
+ strArg == "2-tuple";
+ }
} else {
strArg = argType->fullName();
}