various small code cleanups and improvements

Largely refactoring work to make the code somewhat nicer to work with.
This commit is contained in:
itsmattkc
2019-12-26 19:00:08 +11:00
parent 83077c939e
commit 61c60e00d6
87 changed files with 596 additions and 567 deletions
+3 -4
View File
@@ -25,7 +25,6 @@
#include <QUrl>
#include "core.h"
#include "undo/undostack.h"
ProjectViewModel::ProjectViewModel(QObject *parent) :
QAbstractItemModel(parent),
@@ -197,7 +196,7 @@ bool ProjectViewModel::setData(const QModelIndex &index, const QVariant &value,
RenameItemCommand* ric = new RenameItemCommand(this, item, value.toString());
olive::undo_stack.push(ric);
Core::instance()->undo_stack()->push(ric);
return true;
}
@@ -338,7 +337,7 @@ bool ProjectViewModel::dropMimeData(const QMimeData *data, Qt::DropAction action
}
}
olive::undo_stack.pushIfHasChildren(move_command);
Core::instance()->undo_stack()->pushIfHasChildren(move_command);
return true;
@@ -368,7 +367,7 @@ bool ProjectViewModel::dropMimeData(const QMimeData *data, Qt::DropAction action
}
// Trigger an import
olive::core.ImportFiles(urls, this, static_cast<Folder*>(drop_item));
Core::instance()->ImportFiles(urls, this, static_cast<Folder*>(drop_item));
}
return false;