diff --git a/cropeditor/cropeditor.cpp b/cropeditor/cropeditor.cpp index 0edfb2f..69b0466 100644 --- a/cropeditor/cropeditor.cpp +++ b/cropeditor/cropeditor.cpp @@ -25,8 +25,6 @@ CropEditor::CropEditor(QPixmap *image, QObject *parent) : QObject(parent) CropEditor::~CropEditor() { delete scene; - delete view; - delete pixmapItem; } void CropEditor::crop(QRect rect) diff --git a/cropeditor/cropscene.cpp b/cropeditor/cropscene.cpp index 0aef096..a6dc6a6 100644 --- a/cropeditor/cropscene.cpp +++ b/cropeditor/cropscene.cpp @@ -19,11 +19,6 @@ CropScene::CropScene(QObject *parent) : QGraphicsScene(parent), prevButtons(Qt:: }); } -CropScene::~CropScene() -{ - delete rect; -} - void CropScene::mouseMoveEvent(QGraphicsSceneMouseEvent *e) { auto buttons = e->buttons(); diff --git a/cropeditor/cropscene.hpp b/cropeditor/cropscene.hpp index 44cfefa..9be1305 100644 --- a/cropeditor/cropscene.hpp +++ b/cropeditor/cropscene.hpp @@ -11,7 +11,6 @@ class CropScene : public QGraphicsScene Q_OBJECT public: CropScene(QObject *parent); - virtual ~CropScene(); signals: void closedWithRect(QRect rect); diff --git a/screenshotter.cpp b/screenshotter.cpp index 04a2388..b21bb69 100644 --- a/screenshotter.cpp +++ b/screenshotter.cpp @@ -9,10 +9,7 @@ void screenshotter::area() { CropEditor *editor = new CropEditor(screenshotutil::fullscreen()); - QObject::connect(editor, &CropEditor::cropped, [&](QPixmap *pixmap) { - UploaderSingleton::inst().upload(pixmap); - delete editor; - }); + QObject::connect(editor, &CropEditor::cropped, [&](QPixmap *pixmap) { UploaderSingleton::inst().upload(pixmap); }); } void screenshotter::fullscreen()