mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +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();
|
||||
}
|
||||
|
||||
ScriptsModel::~ScriptsModel() {
|
||||
for (int i = _treeNodes.size() - 1; i >= 0; i--) {
|
||||
delete _treeNodes.at(i);
|
||||
}
|
||||
_treeNodes.clear();
|
||||
}
|
||||
|
||||
TreeNodeBase* ScriptsModel::getTreeNodeFromIndex(const QModelIndex& index) const {
|
||||
if (index.isValid()) {
|
||||
return static_cast<TreeNodeBase*>(index.internalPointer());
|
||||
|
|
|
@ -67,6 +67,7 @@ class ScriptsModel : public QAbstractItemModel {
|
|||
Q_OBJECT
|
||||
public:
|
||||
ScriptsModel(QObject* parent = NULL);
|
||||
~ScriptsModel();
|
||||
QModelIndex index(int row, int column, const QModelIndex& parent) const;
|
||||
QModelIndex parent(const QModelIndex& child) const;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
||||
|
|
|
@ -68,6 +68,7 @@ RunningScriptsWidget::RunningScriptsWidget(QWidget* parent) :
|
|||
|
||||
RunningScriptsWidget::~RunningScriptsWidget() {
|
||||
delete ui;
|
||||
_scriptsModel.deleteLater();
|
||||
}
|
||||
|
||||
void RunningScriptsWidget::updateFileFilter(const QString& filter) {
|
||||
|
|
Loading…
Reference in a new issue