From b8ad311912e1188855ad03c8f1b1d80e298e2e83 Mon Sep 17 00:00:00 2001 From: Syping Date: Wed, 27 Jan 2021 14:40:50 +0100 Subject: [PATCH] Fix rare PictureDialog crash issue --- PictureDialog.cpp | 54 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/PictureDialog.cpp b/PictureDialog.cpp index e77ea73..958d825 100644 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -199,7 +199,7 @@ void PictureDialog::setupPictureDialog() } installEventFilter(this); - installEventFilter(ui->labPicture); + // installEventFilter(ui->labPicture); // DPI calculation ui->hlButtons->setSpacing(6 * screenRatio); @@ -214,32 +214,32 @@ void PictureDialog::setupPictureDialog() PictureDialog::~PictureDialog() { -#ifdef Q_OS_WIN -#if QT_VERSION >= 0x050200 - if (naviEnabled) - { - for (QObject *obj : layout()->menuBar()->children()) - { - delete obj; - } - delete layout()->menuBar(); - } -#endif -#else - if (naviEnabled) - { - for (QObject *obj : layout()->menuBar()->children()) - { - delete obj; - } - delete layout()->menuBar(); - } -#endif - for (QObject *obj : manageMenu->children()) - { - delete obj; - } - delete manageMenu; +//#ifdef Q_OS_WIN +//#if QT_VERSION >= 0x050200 +// if (naviEnabled) +// { +// for (QObject *obj : layout()->menuBar()->children()) +// { +// delete obj; +// } +// delete layout()->menuBar(); +// } +//#endif +//#else +// if (naviEnabled) +// { +// for (QObject *obj : layout()->menuBar()->children()) +// { +// delete obj; +// } +// delete layout()->menuBar(); +// } +//#endif +// for (QObject *obj : manageMenu->children()) +// { +// delete obj; +// } +// delete manageMenu; delete ui; }