Keep the Control around for as long needed.

This commit is contained in:
Roberto Raggi
2010-06-04 17:58:29 +02:00
parent a56fd7b9f4
commit cceaffca5b
5 changed files with 32 additions and 22 deletions

View File

@@ -36,6 +36,7 @@
#include <QtCore/QList>
#include <QtCore/QPair>
#include <QtCore/QSharedPointer>
namespace CPlusPlus {
@@ -45,15 +46,15 @@ public:
typedef QList< QPair<const Identifier *, FullySpecifiedType> > Substitution;
public:
static FullySpecifiedType instantiate(const Name *className, Symbol *candidate, Control *control);
static FullySpecifiedType instantiate(const Name *className, Symbol *candidate, QSharedPointer<Control> control);
private:
DeprecatedGenTemplateInstance(Control *control, const Substitution &substitution);
DeprecatedGenTemplateInstance(QSharedPointer<Control> control, const Substitution &substitution);
FullySpecifiedType gen(Symbol *symbol);
private:
Symbol *_symbol;
Control *_control;
QSharedPointer<Control> _control;
const Substitution _substitution;
};