Commit f306d7d4 authored by Laurent Montel's avatar Laurent Montel 😁

It's not necessary to create it as a qobject

parent fdd12da1
......@@ -150,7 +150,7 @@ void MainWindow::setupStatusBar()
void MainWindow::initStorageService()
{
StorageServiceManagerSettingsJob *settingsJob = new StorageServiceManagerSettingsJob(this);
StorageServiceManagerSettingsJob *settingsJob = new StorageServiceManagerSettingsJob;
PimCommon::StorageServiceJobConfig *configJob = PimCommon::StorageServiceJobConfig::self();
configJob->registerConfigIf(settingsJob);
......
......@@ -22,8 +22,7 @@
using namespace PimCommon;
StorageServiceManagerSettingsJob::StorageServiceManagerSettingsJob(QObject *parent)
: QObject(parent)
StorageServiceManagerSettingsJob::StorageServiceManagerSettingsJob()
{
}
......
......@@ -24,11 +24,10 @@
#include <QObject>
#include "pimcommon/storageservice/interface/storageserviceinterface.h"
class StorageServiceManagerSettingsJob : public QObject, public PimCommon::ISettingsJob
class StorageServiceManagerSettingsJob : public PimCommon::ISettingsJob
{
Q_OBJECT
public:
explicit StorageServiceManagerSettingsJob(QObject *parent=0);
StorageServiceManagerSettingsJob();
~StorageServiceManagerSettingsJob();
QString youSendItApiKey() const;
......
......@@ -242,7 +242,7 @@ KMKernel::KMKernel (QObject *parent) :
CommonKernel->registerFilterIf( this );
mFolderArchiveManager = new FolderArchiveManager(this);
mStorageManager = new PimCommon::StorageServiceManager(this);
StorageServiceSettingsJob *settingsJob = new StorageServiceSettingsJob(this);
StorageServiceSettingsJob *settingsJob = new StorageServiceSettingsJob;
PimCommon::StorageServiceJobConfig *configJob = PimCommon::StorageServiceJobConfig::self();
configJob->registerConfigIf(settingsJob);
}
......
......@@ -22,8 +22,7 @@
using namespace PimCommon;
StorageServiceSettingsJob::StorageServiceSettingsJob(QObject *parent)
: QObject(parent)
StorageServiceSettingsJob::StorageServiceSettingsJob()
{
}
......
......@@ -24,11 +24,10 @@
#include <QObject>
#include "pimcommon/storageservice/interface/storageserviceinterface.h"
class StorageServiceSettingsJob : public QObject, public PimCommon::ISettingsJob
class StorageServiceSettingsJob : public PimCommon::ISettingsJob
{
Q_OBJECT
public:
explicit StorageServiceSettingsJob(QObject *parent=0);
StorageServiceSettingsJob();
~StorageServiceSettingsJob();
QString youSendItApiKey() const;
......
......@@ -55,7 +55,7 @@ StorageServiceJobConfig::StorageServiceJobConfig(QObject *parent)
StorageServiceJobConfig::~StorageServiceJobConfig()
{
delete mSettingsJob;
}
StorageServiceJobConfig *StorageServiceJobConfig::self()
......
......@@ -38,7 +38,7 @@ ServiceTestWidget::ServiceTestWidget(QWidget *parent)
: QWidget(parent),
mStorageService(0)
{
PimCommon::TestSettingsJob *settingsJob = new PimCommon::TestSettingsJob(this);
PimCommon::TestSettingsJob *settingsJob = new PimCommon::TestSettingsJob;
PimCommon::StorageServiceJobConfig *configJob = PimCommon::StorageServiceJobConfig::self();
configJob->registerConfigIf(settingsJob);
......
......@@ -56,7 +56,7 @@ void StorageServiceSettingsDialog::setListService(const QMap<QString, PimCommon:
StorageServiceTestWidget::StorageServiceTestWidget(QWidget *parent)
: QWidget(parent)
{
PimCommon::TestSettingsJob *settingsJob = new PimCommon::TestSettingsJob(this);
PimCommon::TestSettingsJob *settingsJob = new PimCommon::TestSettingsJob;
PimCommon::StorageServiceJobConfig *configJob = PimCommon::StorageServiceJobConfig::self();
configJob->registerConfigIf(settingsJob);
......
......@@ -22,8 +22,7 @@
using namespace PimCommon;
TestSettingsJob::TestSettingsJob(QObject *parent)
: QObject(parent)
TestSettingsJob::TestSettingsJob()
{
}
......
......@@ -21,17 +21,15 @@
#ifndef TESTSETTINGSJOB_H
#define TESTSETTINGSJOB_H
#include <QObject>
#include "pimcommon_export.h"
#include "pimcommon/storageservice/interface/storageserviceinterface.h"
namespace PimCommon {
class PIMCOMMON_EXPORT TestSettingsJob : public QObject, public ISettingsJob
class PIMCOMMON_EXPORT TestSettingsJob : public ISettingsJob
{
Q_OBJECT
public:
explicit TestSettingsJob(QObject *parent=0);
TestSettingsJob();
~TestSettingsJob();
QString youSendItApiKey() const;
......
......@@ -55,7 +55,7 @@ StorageServiceManagerMainWindow::StorageServiceManagerMainWindow()
: KXmlGuiWindow(),
mNetworkIsDown(false)
{
StorageServiceManagerSettingsJob *settingsJob = new StorageServiceManagerSettingsJob(this);
StorageServiceManagerSettingsJob *settingsJob = new StorageServiceManagerSettingsJob;
PimCommon::StorageServiceJobConfig *configJob = PimCommon::StorageServiceJobConfig::self();
configJob->registerConfigIf(settingsJob);
......
......@@ -22,8 +22,7 @@
using namespace PimCommon;
StorageServiceManagerSettingsJob::StorageServiceManagerSettingsJob(QObject *parent)
: QObject(parent)
StorageServiceManagerSettingsJob::StorageServiceManagerSettingsJob()
{
}
......
......@@ -21,14 +21,12 @@
#ifndef STORAGESERVICEMANAGERSETTINGSJOB_H
#define STORAGESERVICEMANAGERSETTINGSJOB_H
#include <QObject>
#include "pimcommon/storageservice/interface/storageserviceinterface.h"
class StorageServiceManagerSettingsJob : public QObject, public PimCommon::ISettingsJob
class StorageServiceManagerSettingsJob : public PimCommon::ISettingsJob
{
Q_OBJECT
public:
explicit StorageServiceManagerSettingsJob(QObject *parent=0);
StorageServiceManagerSettingsJob();
~StorageServiceManagerSettingsJob();
QString youSendItApiKey() const;
......
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