comparison layer/ImageLayer.cpp @ 1414:fa986b91d77f

Merge from branch fix-static-analysis
author Chris Cannam
date Wed, 09 Jan 2019 15:24:51 +0000
parents c8a6fd3f9dff
children 62e908518c71
comparison
equal deleted inserted replaced
1413:0930a27ebea2 1414:fa986b91d77f
42 QMutex 42 QMutex
43 ImageLayer::m_imageMapMutex; 43 ImageLayer::m_imageMapMutex;
44 44
45 ImageLayer::ImageLayer() : 45 ImageLayer::ImageLayer() :
46 Layer(), 46 Layer(),
47 m_model(0), 47 m_model(nullptr),
48 m_editing(false), 48 m_editing(false),
49 m_originalPoint(0, "", ""), 49 m_originalPoint(0, "", ""),
50 m_editingPoint(0, "", ""), 50 m_editingPoint(0, "", ""),
51 m_editingCommand(0) 51 m_editingCommand(nullptr)
52 { 52 {
53 } 53 }
54 54
55 ImageLayer::~ImageLayer() 55 ImageLayer::~ImageLayer()
56 { 56 {
612 } else { 612 } else {
613 m_editingCommand->deletePoint(m_editingPoint); 613 m_editingCommand->deletePoint(m_editingPoint);
614 } 614 }
615 615
616 finish(m_editingCommand); 616 finish(m_editingCommand);
617 m_editingCommand = 0; 617 m_editingCommand = nullptr;
618 m_editing = false; 618 m_editing = false;
619 } 619 }
620 620
621 bool 621 bool
622 ImageLayer::addImage(sv_frame_t frame, QString url) 622 ImageLayer::addImage(sv_frame_t frame, QString url)
651 m_editingPoint = *points.begin(); 651 m_editingPoint = *points.begin();
652 m_originalPoint = m_editingPoint; 652 m_originalPoint = m_editingPoint;
653 653
654 if (m_editingCommand) { 654 if (m_editingCommand) {
655 finish(m_editingCommand); 655 finish(m_editingCommand);
656 m_editingCommand = 0; 656 m_editingCommand = nullptr;
657 } 657 }
658 658
659 m_editing = true; 659 m_editing = true;
660 } 660 }
661 661
687 687
688 if (m_editingCommand) { 688 if (m_editingCommand) {
689 finish(m_editingCommand); 689 finish(m_editingCommand);
690 } 690 }
691 691
692 m_editingCommand = 0; 692 m_editingCommand = nullptr;
693 m_editing = false; 693 m_editing = false;
694 } 694 }
695 695
696 bool 696 bool
697 ImageLayer::editOpen(LayerGeometryProvider *v, QMouseEvent *e) 697 ImageLayer::editOpen(LayerGeometryProvider *v, QMouseEvent *e)