Mercurial > projects > qtd
comparison generator/abstractmetalang.cpp @ 288:f9559a957be9 signals
new signals and slots implementation
author | eldar |
---|---|
date | Sun, 08 Nov 2009 19:28:01 +0000 |
parents | a5cba313c924 |
children | 8627891e4556 |
comparison
equal
deleted
inserted
replaced
287:b6984b290e46 | 288:f9559a957be9 |
---|---|
40 ****************************************************************************/ | 40 ****************************************************************************/ |
41 | 41 |
42 #include "abstractmetalang.h" | 42 #include "abstractmetalang.h" |
43 #include "reporthandler.h" | 43 #include "reporthandler.h" |
44 #include "jumptable.h" | 44 #include "jumptable.h" |
45 #include <iostream> | |
45 | 46 |
46 /******************************************************************************* | 47 /******************************************************************************* |
47 * AbstractMetaType | 48 * AbstractMetaType |
48 */ | 49 */ |
49 AbstractMetaType *AbstractMetaType::copy() const | 50 AbstractMetaType *AbstractMetaType::copy() const |
666 } | 667 } |
667 | 668 |
668 return QString(); | 669 return QString(); |
669 } | 670 } |
670 | 671 |
671 QString AbstractMetaFunction::minimalSignature() const | 672 QString AbstractMetaFunction::minimalSignature(int reduce) const |
672 { | 673 { |
673 if (!m_cached_minimal_signature.isEmpty()) | 674 if (!m_cached_minimal_signature.isEmpty() && !reduce) |
674 return m_cached_minimal_signature; | 675 return m_cached_minimal_signature; |
675 | 676 |
676 QString minimalSignature = originalName() + "("; | 677 QString minimalSignature = originalName() + "("; |
677 AbstractMetaArgumentList arguments = this->arguments(); | 678 AbstractMetaArgumentList arguments = this->arguments(); |
678 | 679 int argsCount = arguments.count() - reduce; |
679 for (int i=0; i<arguments.count(); ++i) { | 680 for (int i=0; i<argsCount; ++i) { |
680 AbstractMetaType *t = arguments.at(i)->type(); | 681 AbstractMetaType *t = arguments.at(i)->type(); |
681 | 682 |
682 if (i > 0) | 683 if (i > 0) |
683 minimalSignature += ","; | 684 minimalSignature += ","; |
684 | 685 |
687 minimalSignature += ")"; | 688 minimalSignature += ")"; |
688 if (isConstant()) | 689 if (isConstant()) |
689 minimalSignature += "const"; | 690 minimalSignature += "const"; |
690 | 691 |
691 minimalSignature = QMetaObject::normalizedSignature(minimalSignature.toLocal8Bit().constData()); | 692 minimalSignature = QMetaObject::normalizedSignature(minimalSignature.toLocal8Bit().constData()); |
692 m_cached_minimal_signature = minimalSignature; | 693 if(!reduce) |
694 m_cached_minimal_signature = minimalSignature; | |
693 | 695 |
694 return minimalSignature; | 696 return minimalSignature; |
695 } | 697 } |
696 | 698 |
697 FunctionModificationList AbstractMetaFunction::modifications(const AbstractMetaClass *implementor) const | 699 FunctionModificationList AbstractMetaFunction::modifications(const AbstractMetaClass *implementor) const |