mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
ScriptModel destructor
This commit is contained in:
parent
836f16276f
commit
d820df4972
3 changed files with 9 additions and 0 deletions
|
@ -67,6 +67,13 @@ ScriptsModel::ScriptsModel(QObject* parent) :
|
||||||
reloadRemoteFiles();
|
reloadRemoteFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScriptsModel::~ScriptsModel() {
|
||||||
|
for (int i = _treeNodes.size() - 1; i >= 0; i--) {
|
||||||
|
delete _treeNodes.at(i);
|
||||||
|
}
|
||||||
|
_treeNodes.clear();
|
||||||
|
}
|
||||||
|
|
||||||
TreeNodeBase* ScriptsModel::getTreeNodeFromIndex(const QModelIndex& index) const {
|
TreeNodeBase* ScriptsModel::getTreeNodeFromIndex(const QModelIndex& index) const {
|
||||||
if (index.isValid()) {
|
if (index.isValid()) {
|
||||||
return static_cast<TreeNodeBase*>(index.internalPointer());
|
return static_cast<TreeNodeBase*>(index.internalPointer());
|
||||||
|
|
|
@ -67,6 +67,7 @@ class ScriptsModel : public QAbstractItemModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ScriptsModel(QObject* parent = NULL);
|
ScriptsModel(QObject* parent = NULL);
|
||||||
|
~ScriptsModel();
|
||||||
QModelIndex index(int row, int column, const QModelIndex& parent) const;
|
QModelIndex index(int row, int column, const QModelIndex& parent) const;
|
||||||
QModelIndex parent(const QModelIndex& child) const;
|
QModelIndex parent(const QModelIndex& child) const;
|
||||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
||||||
|
|
|
@ -68,6 +68,7 @@ RunningScriptsWidget::RunningScriptsWidget(QWidget* parent) :
|
||||||
|
|
||||||
RunningScriptsWidget::~RunningScriptsWidget() {
|
RunningScriptsWidget::~RunningScriptsWidget() {
|
||||||
delete ui;
|
delete ui;
|
||||||
|
_scriptsModel.deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunningScriptsWidget::updateFileFilter(const QString& filter) {
|
void RunningScriptsWidget::updateFileFilter(const QString& filter) {
|
||||||
|
|
Loading…
Reference in a new issue