segfault reeeeeeee

This commit is contained in:
ArsenArsen 2017-04-29 10:03:07 +02:00
parent 903875fb9a
commit bde179df55
4 changed files with 1 additions and 12 deletions

View File

@ -25,8 +25,6 @@ CropEditor::CropEditor(QPixmap *image, QObject *parent) : QObject(parent)
CropEditor::~CropEditor() CropEditor::~CropEditor()
{ {
delete scene; delete scene;
delete view;
delete pixmapItem;
} }
void CropEditor::crop(QRect rect) void CropEditor::crop(QRect rect)

View File

@ -19,11 +19,6 @@ CropScene::CropScene(QObject *parent) : QGraphicsScene(parent), prevButtons(Qt::
}); });
} }
CropScene::~CropScene()
{
delete rect;
}
void CropScene::mouseMoveEvent(QGraphicsSceneMouseEvent *e) void CropScene::mouseMoveEvent(QGraphicsSceneMouseEvent *e)
{ {
auto buttons = e->buttons(); auto buttons = e->buttons();

View File

@ -11,7 +11,6 @@ class CropScene : public QGraphicsScene
Q_OBJECT Q_OBJECT
public: public:
CropScene(QObject *parent); CropScene(QObject *parent);
virtual ~CropScene();
signals: signals:
void closedWithRect(QRect rect); void closedWithRect(QRect rect);

View File

@ -9,10 +9,7 @@
void screenshotter::area() void screenshotter::area()
{ {
CropEditor *editor = new CropEditor(screenshotutil::fullscreen()); CropEditor *editor = new CropEditor(screenshotutil::fullscreen());
QObject::connect(editor, &CropEditor::cropped, [&](QPixmap *pixmap) { QObject::connect(editor, &CropEditor::cropped, [&](QPixmap *pixmap) { UploaderSingleton::inst().upload(pixmap); });
UploaderSingleton::inst().upload(pixmap);
delete editor;
});
} }
void screenshotter::fullscreen() void screenshotter::fullscreen()