summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-04-27 15:04:28 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:15:21 -0300
commitac8ada95ff40540d5e0f4baf639c0bad00e81784 (patch)
tree65b4514f13eb4d523075c0f0dce7575303574b3a
parentdce8b706047d2e247833c11a265a588012ddb0cb (diff)
Don't create cyclic graphs when there are QString, PySequence and PyObjects involved into a single overload.sb-1.0.2
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--generator/overloaddata.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/generator/overloaddata.cpp b/generator/overloaddata.cpp
index c670209e..6bb06fe5 100644
--- a/generator/overloaddata.cpp
+++ b/generator/overloaddata.cpp
@@ -330,7 +330,8 @@ void OverloadData::sortNextOverloads()
graph.addEdge(targetTypeId, qvariantIndex);
} else if (checkQString && ov->argType()->indirections() > 0
&& targetTypeEntryName != "QString"
- && targetTypeEntryName != "QByteArray") {
+ && targetTypeEntryName != "QByteArray"
+ && (!checkPyObject || targetTypeId != pyobjectIndex)) {
if (!graph.containsEdge(qstringIndex, targetTypeId)) // Avoid cyclic dependency.
graph.addEdge(targetTypeId, qstringIndex);
}