Commit ca3f98e5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix mem leak found by ASAN

parent a668927a
Pipeline #25296 passed with stage
in 6 minutes and 53 seconds
......@@ -40,12 +40,9 @@ using namespace KCalendarCore;
using namespace Akonadi;
ICalImporter::Private::Private(IncidenceChanger *changer, ICalImporter *qq)
: QObject()
: QObject(qq)
, q(qq)
, m_changer(changer)
, m_numIncidences(0)
, m_working(false)
, m_temporaryFile(nullptr)
{
if (!changer) {
m_changer = new IncidenceChanger(q);
......@@ -141,6 +138,10 @@ ICalImporter::ICalImporter(Akonadi::IncidenceChanger *changer, QObject *parent)
{
}
ICalImporter::~ICalImporter()
{
}
QString ICalImporter::errorMessage() const
{
return d->m_lastErrorMessage;
......
......@@ -50,6 +50,7 @@ public:
* @param parent Parent QObject.
*/
explicit ICalImporter(Akonadi::IncidenceChanger *changer = nullptr, QObject *parent = nullptr);
~ICalImporter();
/**
* Translated error message.
......
......@@ -50,7 +50,7 @@ public:
ICalImporter *const q;
Akonadi::IncidenceChanger *m_changer = nullptr;
int m_numIncidences;
int m_numIncidences = 0;
QList<int> m_pendingRequests;
QString m_lastErrorMessage;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment