changed NULLs to nullptr
This commit is contained in:
+35
-35
@@ -116,7 +116,7 @@ DeleteClipAction::DeleteClipAction(Sequence* s, int clip) :
|
||||
{}
|
||||
|
||||
DeleteClipAction::~DeleteClipAction() {
|
||||
if (ref != NULL) delete ref;
|
||||
if (ref != nullptr) delete ref;
|
||||
}
|
||||
|
||||
void DeleteClipAction::undo() {
|
||||
@@ -141,7 +141,7 @@ void DeleteClipAction::undo() {
|
||||
seq->clips.at(linkClipIndex.at(i))->linked.insert(linkLinkIndex.at(i), index);
|
||||
}
|
||||
|
||||
ref = NULL;
|
||||
ref = nullptr;
|
||||
|
||||
mainWindow->setWindowModified(old_project_changed);
|
||||
}
|
||||
@@ -152,18 +152,18 @@ void DeleteClipAction::redo() {
|
||||
if (ref->open) {
|
||||
close_clip(ref, true);
|
||||
}
|
||||
seq->clips[index] = NULL;
|
||||
seq->clips[index] = nullptr;
|
||||
|
||||
// save shared transitions
|
||||
if (ref->opening_transition > -1 && ref->get_opening_transition()->secondary_clip != NULL) {
|
||||
if (ref->opening_transition > -1 && ref->get_opening_transition()->secondary_clip != nullptr) {
|
||||
opening_transition = ref->opening_transition;
|
||||
ref->get_opening_transition()->parent_clip = ref->get_opening_transition()->secondary_clip;
|
||||
ref->get_opening_transition()->secondary_clip = NULL;
|
||||
ref->get_opening_transition()->secondary_clip = nullptr;
|
||||
ref->opening_transition = -1;
|
||||
}
|
||||
if (ref->closing_transition > -1 && ref->get_closing_transition()->secondary_clip != NULL) {
|
||||
if (ref->closing_transition > -1 && ref->get_closing_transition()->secondary_clip != nullptr) {
|
||||
closing_transition = ref->closing_transition;
|
||||
ref->get_closing_transition()->secondary_clip = NULL;
|
||||
ref->get_closing_transition()->secondary_clip = nullptr;
|
||||
ref->closing_transition = -1;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ void DeleteClipAction::redo() {
|
||||
linkLinkIndex.clear();
|
||||
for (int i=0;i<seq->clips.size();i++) {
|
||||
Clip* c = seq->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
for (int j=0;j<c->linked.size();j++) {
|
||||
if (c->linked.at(j) == index) {
|
||||
linkClipIndex.append(i);
|
||||
@@ -256,7 +256,7 @@ AddEffectCommand::AddEffectCommand(Clip* c, Effect* e, const EffectMeta *m, int
|
||||
{}
|
||||
|
||||
AddEffectCommand::~AddEffectCommand() {
|
||||
if (!done && ref != NULL) delete ref;
|
||||
if (!done && ref != nullptr) delete ref;
|
||||
}
|
||||
|
||||
void AddEffectCommand::undo() {
|
||||
@@ -271,7 +271,7 @@ void AddEffectCommand::undo() {
|
||||
}
|
||||
|
||||
void AddEffectCommand::redo() {
|
||||
if (ref == NULL) {
|
||||
if (ref == nullptr) {
|
||||
ref = create_effect(clip, meta);
|
||||
}
|
||||
if (pos < 0) {
|
||||
@@ -295,14 +295,14 @@ AddTransitionCommand::AddTransitionCommand(Clip* c, Clip *s, Transition* copy, c
|
||||
|
||||
void AddTransitionCommand::undo() {
|
||||
clip->sequence->hard_delete_transition(clip, type);
|
||||
if (secondary != NULL) secondary->sequence->hard_delete_transition(secondary, (type == TA_OPENING_TRANSITION) ? TA_CLOSING_TRANSITION : TA_OPENING_TRANSITION);
|
||||
if (secondary != nullptr) secondary->sequence->hard_delete_transition(secondary, (type == TA_OPENING_TRANSITION) ? TA_CLOSING_TRANSITION : TA_OPENING_TRANSITION);
|
||||
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
clip->opening_transition = old_ptransition;
|
||||
if (secondary != NULL) secondary->closing_transition = old_stransition;
|
||||
if (secondary != nullptr) secondary->closing_transition = old_stransition;
|
||||
} else {
|
||||
clip->closing_transition = old_ptransition;
|
||||
if (secondary != NULL) secondary->opening_transition = old_stransition;
|
||||
if (secondary != nullptr) secondary->opening_transition = old_stransition;
|
||||
}
|
||||
|
||||
mainWindow->setWindowModified(old_project_changed);
|
||||
@@ -311,8 +311,8 @@ void AddTransitionCommand::undo() {
|
||||
void AddTransitionCommand::redo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
old_ptransition = clip->opening_transition;
|
||||
clip->opening_transition = (transition_to_copy == NULL) ? create_transition(clip, secondary, transition) : transition_to_copy->copy(clip, NULL);
|
||||
if (secondary != NULL) {
|
||||
clip->opening_transition = (transition_to_copy == nullptr) ? create_transition(clip, secondary, transition) : transition_to_copy->copy(clip, nullptr);
|
||||
if (secondary != nullptr) {
|
||||
old_stransition = secondary->closing_transition;
|
||||
secondary->closing_transition = clip->opening_transition;
|
||||
}
|
||||
@@ -321,8 +321,8 @@ void AddTransitionCommand::redo() {
|
||||
}
|
||||
} else {
|
||||
old_ptransition = clip->closing_transition;
|
||||
clip->closing_transition = (transition_to_copy == NULL) ? create_transition(clip, secondary, transition) : transition_to_copy->copy(clip, NULL);
|
||||
if (secondary != NULL) {
|
||||
clip->closing_transition = (transition_to_copy == nullptr) ? create_transition(clip, secondary, transition) : transition_to_copy->copy(clip, nullptr);
|
||||
if (secondary != nullptr) {
|
||||
old_stransition = secondary->opening_transition;
|
||||
secondary->opening_transition = clip->closing_transition;
|
||||
}
|
||||
@@ -356,30 +356,30 @@ void ModifyTransitionCommand::redo() {
|
||||
DeleteTransitionCommand::DeleteTransitionCommand(Sequence* s, int transition_index) :
|
||||
seq(s),
|
||||
index(transition_index),
|
||||
transition(NULL),
|
||||
otc(NULL),
|
||||
ctc(NULL),
|
||||
transition(nullptr),
|
||||
otc(nullptr),
|
||||
ctc(nullptr),
|
||||
old_project_changed(mainWindow->isWindowModified())
|
||||
{}
|
||||
|
||||
DeleteTransitionCommand::~DeleteTransitionCommand() {
|
||||
if (transition != NULL) delete transition;
|
||||
if (transition != nullptr) delete transition;
|
||||
}
|
||||
|
||||
void DeleteTransitionCommand::undo() {
|
||||
seq->transitions[index] = transition;
|
||||
|
||||
if (otc != NULL) otc->opening_transition = index;
|
||||
if (ctc != NULL) ctc->closing_transition = index;
|
||||
if (otc != nullptr) otc->opening_transition = index;
|
||||
if (ctc != nullptr) ctc->closing_transition = index;
|
||||
|
||||
transition = NULL;
|
||||
transition = nullptr;
|
||||
mainWindow->setWindowModified(old_project_changed);
|
||||
}
|
||||
|
||||
void DeleteTransitionCommand::redo() {
|
||||
for (int i=0;i<seq->clips.size();i++) {
|
||||
Clip* c = seq->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
if (c->opening_transition == index) {
|
||||
otc = c;
|
||||
c->opening_transition = -1;
|
||||
@@ -392,7 +392,7 @@ void DeleteTransitionCommand::redo() {
|
||||
}
|
||||
|
||||
transition = seq->transitions.at(index);
|
||||
seq->transitions[index] = NULL;
|
||||
seq->transitions[index] = nullptr;
|
||||
|
||||
mainWindow->setWindowModified(true);
|
||||
}
|
||||
@@ -403,7 +403,7 @@ NewSequenceCommand::NewSequenceCommand(Media *s, Media* iparent) :
|
||||
done(false),
|
||||
old_project_changed(mainWindow->isWindowModified())
|
||||
{
|
||||
if (parent == NULL) parent = project_model.get_root();
|
||||
if (parent == nullptr) parent = project_model.get_root();
|
||||
}
|
||||
|
||||
NewSequenceCommand::~NewSequenceCommand() {
|
||||
@@ -518,8 +518,8 @@ void AddClipCommand::redo() {
|
||||
for (int j=0;j<original->linked.size();j++) {
|
||||
copy->linked[j] = original->linked.at(j) + linkOffset;
|
||||
}
|
||||
if (original->opening_transition > -1) copy->opening_transition = original->get_opening_transition()->copy(copy, NULL);
|
||||
if (original->closing_transition > -1) copy->closing_transition = original->get_closing_transition()->copy(copy, NULL);
|
||||
if (original->opening_transition > -1) copy->opening_transition = original->get_opening_transition()->copy(copy, nullptr);
|
||||
if (original->closing_transition > -1) copy->closing_transition = original->get_closing_transition()->copy(copy, nullptr);
|
||||
seq->clips.append(copy);
|
||||
}
|
||||
}
|
||||
@@ -591,7 +591,7 @@ void ReplaceMediaCommand::replace(QString& filename) {
|
||||
Sequence* s = all_sequences.at(i)->to_sequence();
|
||||
for (int j=0;j<s->clips.size();j++) {
|
||||
Clip* c = s->clips.at(j);
|
||||
if (c != NULL && c->media == item && c->open) {
|
||||
if (c != nullptr && c->media == item && c->open) {
|
||||
close_clip(c, true);
|
||||
c->replaced = true;
|
||||
}
|
||||
@@ -602,7 +602,7 @@ void ReplaceMediaCommand::replace(QString& filename) {
|
||||
QStringList files;
|
||||
files.append(filename);
|
||||
item->to_footage()->ready_lock.lock();
|
||||
panel_project->process_file_list(files, false, item, NULL);
|
||||
panel_project->process_file_list(files, false, item, nullptr);
|
||||
}
|
||||
|
||||
void ReplaceMediaCommand::undo() {
|
||||
@@ -713,7 +713,7 @@ void MediaMove::undo() {
|
||||
}
|
||||
|
||||
void MediaMove::redo() {
|
||||
if (to == NULL) to = project_model.get_root();
|
||||
if (to == nullptr) to = project_model.get_root();
|
||||
froms.resize(items.size());
|
||||
for (int i=0;i<items.size();i++) {
|
||||
Media* parent = items.at(i)->parentItem();
|
||||
@@ -998,7 +998,7 @@ void EditSequenceCommand::update() {
|
||||
item->set_sequence(seq);
|
||||
|
||||
for (int i=0;i<seq->clips.size();i++) {
|
||||
if (seq->clips.at(i) != NULL) seq->clips.at(i)->refresh();
|
||||
if (seq->clips.at(i) != nullptr) seq->clips.at(i)->refresh();
|
||||
}
|
||||
|
||||
if (sequence == seq) {
|
||||
@@ -1157,7 +1157,7 @@ void RippleAction::redo() {
|
||||
for (int i=0;i<s->clips.size();i++) {
|
||||
if (!ignore.contains(i)) {
|
||||
Clip* c = s->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
if (c->timeline_in >= point) {
|
||||
move_clip(ca, c, length, length, 0, 0, true, true);
|
||||
}
|
||||
@@ -1265,7 +1265,7 @@ void RefreshClips::redo() {
|
||||
Sequence* s = all_sequences.at(i)->to_sequence();
|
||||
for (int j=0;j<s->clips.size();j++) {
|
||||
Clip* c = s->clips.at(j);
|
||||
if (c != NULL && c->media == media) {
|
||||
if (c != nullptr && c->media == media) {
|
||||
c->replaced = true;
|
||||
c->refresh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user