Detect memory leaks

This commit is contained in:
Jakub Melka
2022-01-30 18:23:25 +01:00
parent 22c40b227c
commit 284f0c4db8
89 changed files with 227 additions and 85 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Jakub Melka
// Copyright (C) 2019-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -16,6 +16,7 @@
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "pdfaboutdialog.h"
#include "pdfdbgheap.h"
#include "ui_pdfaboutdialog.h"
#include "pdfutils.h"

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2020-2021 Jakub Melka
// Copyright (C) 2020-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -16,6 +16,7 @@
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "pdfadvancedfindwidget.h"
#include "pdfdbgheap.h"
#include "ui_pdfadvancedfindwidget.h"
#include "pdfcompiler.h"

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Jakub Melka
// Copyright (C) 2019-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -24,6 +24,7 @@
#include "pdfutils.h"
#include "pdfexception.h"
#include "pdfexecutionpolicy.h"
#include "pdfdbgheap.h"
#include <QLocale>
#include <QPageSize>

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2021 Jakub Melka
// Copyright (C) 2021-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -21,6 +21,7 @@
#include "pdfutils.h"
#include "pdfwidgetutils.h"
#include "pdfsecurityhandler.h"
#include "pdfdbgheap.h"
#include <QMessageBox>

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2021 Jakub Melka
// Copyright (C) 2021-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -18,6 +18,7 @@
#include "pdfencryptionstrengthhintwidget.h"
#include "pdfwidgetutils.h"
#include "pdfutils.h"
#include "pdfdbgheap.h"
#include <QPainter>
#include <QFontMetrics>

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2021 Jakub Melka
// Copyright (C) 2021-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -20,6 +20,7 @@
#include "pdfwidgetutils.h"
#include "pdfdocumentwriter.h"
#include "pdfdbgheap.h"
#include <QCheckBox>
#include <QPushButton>

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2020-2021 Jakub Melka
// Copyright (C) 2020-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -25,6 +25,7 @@
#include "pdfwidgetutils.h"
#include "pdfconstants.h"
#include "pdfdocumentbuilder.h"
#include "pdfdbgheap.h"
#include "pdfviewersettings.h"
#include "pdfundoredomanager.h"

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2020-2021 Jakub Melka
// Copyright (C) 2020-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -16,6 +16,7 @@
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "pdfrecentfilemanager.h"
#include "pdfdbgheap.h"
namespace pdfviewer
{

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2020-2021 Jakub Melka
// Copyright (C) 2020-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -22,6 +22,7 @@
#include "pdfwidgetutils.h"
#include "pdfoptionalcontent.h"
#include "pdfdrawspacecontroller.h"
#include "pdfdbgheap.h"
#include <QFileDialog>
#include <QMessageBox>

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Jakub Melka
// Copyright (C) 2019-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -16,6 +16,7 @@
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "pdfsendmail.h"
#include "pdfdbgheap.h"
#include <QDir>
#include <QWidget>

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Jakub Melka
// Copyright (C) 2019-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -22,6 +22,7 @@
#include "pdfwidgetutils.h"
#include "pdftexttospeech.h"
#include "pdfdbgheap.h"
#include "pdfdocument.h"
#include "pdfitemmodels.h"

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2020-2021 Jakub Melka
// Copyright (C) 2020-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -20,6 +20,7 @@
#include "pdfdrawspacecontroller.h"
#include "pdfcompiler.h"
#include "pdfdrawwidget.h"
#include "pdfdbgheap.h"
#include <QLabel>
#include <QAction>
@@ -101,7 +102,7 @@ void PDFTextToSpeech::setSettings(const PDFViewerSettings* viewerSettings)
const PDFViewerSettings::Settings& settings = viewerSettings->getSettings();
if (!settings.m_speechEngine.isEmpty())
{
m_textToSpeech = new QTextToSpeech(settings.m_speechEngine);
m_textToSpeech = new QTextToSpeech(settings.m_speechEngine, this);
connect(m_textToSpeech, &QTextToSpeech::stateChanged, this, &PDFTextToSpeech::updatePlay);
m_state = m_document ? Ready : NoDocument;

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2020-2021 Jakub Melka
// Copyright (C) 2020-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -16,6 +16,7 @@
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "pdfundoredomanager.h"
#include "pdfdbgheap.h"
namespace pdfviewer
{

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Jakub Melka
// Copyright (C) 2019-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -25,6 +25,7 @@
#include "pdfdocumentpropertiesdialog.h"
#include "pdfrendertoimagesdialog.h"
#include "pdfoptimizedocumentdialog.h"
#include "pdfdbgheap.h"
#include "pdfdocumentreader.h"
#include "pdfvisitor.h"

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2020-2021 Jakub Melka
// Copyright (C) 2020-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -25,6 +25,7 @@
#include "pdfdocumentpropertiesdialog.h"
#include "pdfrendertoimagesdialog.h"
#include "pdfoptimizedocumentdialog.h"
#include "pdfdbgheap.h"
#include "pdfdocumentreader.h"
#include "pdfvisitor.h"

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Jakub Melka
// Copyright (C) 2019-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -17,6 +17,7 @@
#include "pdfviewersettings.h"
#include "pdfconstants.h"
#include "pdfdbgheap.h"
#include <QPixmapCache>

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Jakub Melka
// Copyright (C) 2019-2022 Jakub Melka
//
// This file is part of PDF4QT.
//
@@ -22,6 +22,7 @@
#include "pdfutils.h"
#include "pdfwidgetutils.h"
#include "pdfrecentfilemanager.h"
#include "pdfdbgheap.h"
#include <QAction>
#include <QLineEdit>