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

Fix mem leak

parent 4e11ea93
......@@ -31,7 +31,7 @@ void ExportAddressbookJobInterfaceTest::exportAddressBook()
{
QFETCH(QByteArray, configpath);
QFETCH(Utils::StoredTypes, options);
auto file = new TestExportFile(this);
std::unique_ptr<TestExportFile> file{new TestExportFile(this)};
file->setPathConfig(configpath);
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
......
......@@ -32,7 +32,7 @@ void ExportAkregatorJobInterfaceTest::exportAkregator()
{
QFETCH(QByteArray, configpath);
QFETCH(Utils::StoredTypes, options);
auto file = new TestExportFile(this);
std::unique_ptr<TestExportFile> file{new TestExportFile(this)};
file->setPathConfig(configpath);
auto exportAkregator = new ExportAkregatorJobInterfaceTestImpl(
......
......@@ -32,7 +32,7 @@ void ExportAlarmJobInterfaceTest::exportAlarm()
{
QFETCH(QByteArray, configpath);
QFETCH(Utils::StoredTypes, options);
auto file = new TestExportFile(this);
std::unique_ptr<TestExportFile> file{new TestExportFile(this)};
file->setPathConfig(configpath);
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
......
......@@ -9,7 +9,7 @@
#include "archivestorage.h"
#include "testexportfile.h"
#include <QTest>
#include <memory>
QTEST_MAIN(ExportCalendarsJobInterfaceTest)
ExportCalendarsJobInterfaceTest::ExportCalendarsJobInterfaceTest(QObject *parent)
......@@ -32,7 +32,7 @@ void ExportCalendarsJobInterfaceTest::exportCalendar()
{
QFETCH(QByteArray, configpath);
QFETCH(Utils::StoredTypes, options);
auto file = new TestExportFile(this);
std::unique_ptr<TestExportFile> file{new TestExportFile(this)};
file->setPathConfig(configpath);
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
......
......@@ -43,7 +43,7 @@ void ExportMailJobInterfaceTest::exportMail()
{
QFETCH(QByteArray, configpath);
QFETCH(Utils::StoredTypes, options);
auto file = new TestExportFile(this);
std::unique_ptr<TestExportFile> file{new TestExportFile(this)};
file->setPathConfig(configpath);
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
......
......@@ -33,7 +33,7 @@ void ExportNotesJobInterfaceTest::exportNote()
{
QFETCH(QByteArray, configpath);
QFETCH(Utils::StoredTypes, options);
auto file = new TestExportFile(this);
std::unique_ptr<TestExportFile> file{new TestExportFile(this)};
file->setPathConfig(configpath);
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
......
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