Added test for Python written models returning new objects without keeping reference to them.

Reviewed by Lauro Moura <lauro.neto@openbossa.org>
eviewed by Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
Marcelo Lira 2010-12-13 17:47:16 -03:00
commit 6b720050ef
6 changed files with 101 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#ifndef TESTVIEW_H
#define TESTVIEW_H
#include <QObject>
#include <QAbstractListModel>
#ifdef pysidetest_EXPORTS
#define PYSIDE_EXPORTS 1
#endif
#include "pysidemacros.h"
class PYSIDE_API TestView : public QObject
{
Q_OBJECT
public:
TestView(QAbstractListModel* model, QObject* parent = 0) : QObject(parent), m_model(model) {}
QAbstractListModel* model() { return m_model; }
QObject* getData();
private:
QAbstractListModel* m_model;
};
#endif // TESTVIEW_H