Showing the changes to interface/src/ScriptsModel.cpp (1 of 3 files). Show all
Unified · Split
| @@ -67,6 +67,13 @@ ScriptsModel::ScriptsModel(QObject* parent) : · 66 unmodified lines | |||
| 67 | reloadRemoteFiles(); | 67 | reloadRemoteFiles(); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | ScriptsModel::~ScriptsModel() { | ||
| 71 | for (int i = _treeNodes.size() - 1; i >= 0; i--) { | ||
| 72 | delete _treeNodes.at(i); | ||
| 73 | } | ||
| 74 | _treeNodes.clear(); | ||
| 75 | } | ||
| 76 | |||
| 70 | TreeNodeBase* ScriptsModel::getTreeNodeFromIndex(const QModelIndex& index) const { | 77 | TreeNodeBase* ScriptsModel::getTreeNodeFromIndex(const QModelIndex& index) const { |
| 71 | if (index.isValid()) { | 78 | if (index.isValid()) { |
| 72 | return static_cast<TreeNodeBase*>(index.internalPointer()); | 79 | return static_cast<TreeNodeBase*>(index.internalPointer()); |