possible ram leak fixed

This commit is contained in:
Rafael 2016-04-24 14:44:41 +02:00
parent ef788fa2bf
commit bc87306f82
2 changed files with 13 additions and 3 deletions

View file

@ -66,8 +66,8 @@ PictureDialog::PictureDialog(ProfileDatabase *profileDB, QWidget *parent) :
// Export menu
exportMenu = new QMenu(this);
exportMenu->addAction(tr("Export as &JPG picture..."), this, SLOT(exportSnapmaticPicture()));
exportMenu->addAction(tr("Export as &GTA Snapmatic..."), this, SLOT(copySnapmaticPicture()));
jpegExportAction = exportMenu->addAction(tr("Export as &JPG picture..."), this, SLOT(exportSnapmaticPicture()));
pgtaExportAction = exportMenu->addAction(tr("Export as &GTA Snapmatic..."), this, SLOT(copySnapmaticPicture()));
ui->cmdExport->setMenu(exportMenu);
// Global map
@ -80,6 +80,8 @@ PictureDialog::PictureDialog(ProfileDatabase *profileDB, QWidget *parent) :
PictureDialog::~PictureDialog()
{
delete jpegExportAction;
delete pgtaExportAction;
delete exportMenu;
delete ui;
}
@ -121,10 +123,15 @@ bool PictureDialog::eventFilter(QObject *obj, QEvent *ev)
return returnValue;
}
void PictureDialog::triggerFullscreenDoubeClick()
{
on_labPicture_mouseDoubleClicked(Qt::LeftButton);
}
void PictureDialog::exportCustomContextMenuRequestedPrivate(const QPoint &pos, bool fullscreen)
{
rqfullscreen = fullscreen;
exportMenu->exec(pos);
exportMenu->popup(pos);
}
void PictureDialog::exportCustomContextMenuRequested(const QPoint &pos)

View file

@ -55,6 +55,7 @@ public slots:
private slots:
void copySnapmaticPicture();
void exportSnapmaticPicture();
void triggerFullscreenDoubeClick();
void on_labPicture_mouseDoubleClicked(Qt::MouseButton button);
void on_labPicture_customContextMenuRequested(const QPoint &pos);
void exportCustomContextMenuRequestedPrivate(const QPoint &pos, bool fullscreen);
@ -74,6 +75,8 @@ private:
QMap<QString, QString> globalMap;
SnapmaticPicture *smpic;
QWidget *fullscreenWidget;
QAction *jpegExportAction;
QAction *pgtaExportAction;
QImage snapmaticPicture;
QString jsonDrawString;
QString windowTitleStr;