mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 02:45:44 -05:00
Fix memory leak in QJsonModel.
This commit is contained in:
parent
ab37c301d5
commit
b348a45834
2 changed files with 8 additions and 0 deletions
|
@ -36,6 +36,13 @@ QJsonModel::QJsonModel(QObject *parent) :
|
|||
|
||||
}
|
||||
|
||||
|
||||
QJsonModel::~QJsonModel()
|
||||
{
|
||||
delete mRootItem;
|
||||
}
|
||||
|
||||
|
||||
bool QJsonModel::load(const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
|
|
|
@ -31,6 +31,7 @@ class QJsonModel : public QAbstractItemModel
|
|||
Q_OBJECT
|
||||
public:
|
||||
explicit QJsonModel(QObject *parent = 0);
|
||||
virtual ~QJsonModel();
|
||||
bool load(const QString& fileName);
|
||||
bool load(QIODevice * device);
|
||||
bool loadJson(const QByteArray& json);
|
||||
|
|
Loading…
Add table
Reference in a new issue