Commit 2381a96f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make sure to initialize value

parent 57b309b7
......@@ -47,10 +47,7 @@ AbstractImportExportJob::AbstractImportExportJob(QObject *parent, ArchiveStorage
, mTypeSelected(typeSelected)
, mArchiveStorage(archiveStorage)
, mIdentityManager(KIdentityManagement::IdentityManager::self())
, mTempDir(nullptr)
, mArchiveDirectory(nullptr)
, mNumberOfStep(numberOfStep)
, mCreateResource(nullptr)
, mIndex(-1)
, mImportExportProgressIndicator(new ImportExportProgressIndicatorBase(this))
{
......
......@@ -121,15 +121,15 @@ protected:
QString mTempDirName;
Utils::StoredTypes mTypeSelected;
ArchiveStorage *mArchiveStorage;
KIdentityManagement::IdentityManager *mIdentityManager;
QTemporaryDir *mTempDir;
const KArchiveDirectory *mArchiveDirectory;
int mNumberOfStep;
PimCommon::CreateResource *mCreateResource;
ArchiveStorage *mArchiveStorage = nullptr;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
QTemporaryDir *mTempDir = nullptr;
const KArchiveDirectory *mArchiveDirectory = nullptr;
int mNumberOfStep = -1;
PimCommon::CreateResource *mCreateResource = nullptr;
QStringList mAgentPaths;
QList<Utils::StoredType> mListStep;
int mIndex;
int mIndex = -1;
static int sArchiveVersion;
private:
......
......@@ -33,7 +33,6 @@
ExportAddressbookJob::ExportAddressbookJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
, mIndexIdentifier(0)
{
}
......
......@@ -40,7 +40,7 @@ private Q_SLOTS:
void slotAddressbookJobTerminated();
private:
void backupConfig();
int mIndexIdentifier;
int mIndexIdentifier = 0;
};
#endif // EXPORTADDRESSBOOKJOB_H
......@@ -34,7 +34,6 @@
ExportAlarmJob::ExportAlarmJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
, mIndexIdentifier(0)
{
}
......
......@@ -40,7 +40,7 @@ private Q_SLOTS:
void slotWriteNextArchiveResource();
private:
void backupConfig();
int mIndexIdentifier;
int mIndexIdentifier = 0;
};
#endif // EXPORTALARMJOB_H
......@@ -39,7 +39,7 @@ Q_SIGNALS:
void error(const QString &);
private:
KZip *mArchive;
KZip *mArchive = nullptr;
};
#endif // ARCHIVESTORAGE_H
......@@ -35,7 +35,6 @@
ExportCalendarJob::ExportCalendarJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
, mIndexIdentifier(0)
{
}
......
......@@ -40,7 +40,7 @@ private Q_SLOTS:
void slotWriteNextArchiveResource();
private:
void backupConfig();
int mIndexIdentifier;
int mIndexIdentifier = 0;
};
#endif // EXPORTCALENDARJOB_H
......@@ -29,8 +29,6 @@
ExportResourceArchiveJob::ExportResourceArchiveJob(QObject *parent)
: QObject(parent)
, mZip(nullptr)
, mThread(nullptr)
{
}
......
......@@ -57,8 +57,8 @@ private:
QString mUrl;
QString mArchivePath;
QString mIdentifier;
KZip *mZip;
PimSettingBackupThread *mThread;
KZip *mZip = nullptr;
PimSettingBackupThread *mThread = nullptr;
};
#endif // EXPORTRESOURCEARCHIVEJOB_H
......@@ -22,7 +22,6 @@
ImportExportProgressIndicatorBase::ImportExportProgressIndicatorBase(QObject *parent)
: QObject(parent)
, mNumberOfStep(0)
{
}
......
......@@ -46,7 +46,7 @@ Q_SIGNALS:
void canceled();
protected:
int mNumberOfStep;
int mNumberOfStep = 0;
};
#endif // IMPORTEXPORTPROGRESSINDICATORBASE_H
......@@ -47,8 +47,6 @@
ExportMailJob::ExportMailJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
, mArchiveTime(QDateTime::currentDateTime())
, mIndexIdentifier(0)
{
}
......
......@@ -52,8 +52,8 @@ private:
void backupResources();
void backupConfig();
void backupIdentity();
QDateTime mArchiveTime;
int mIndexIdentifier;
QDateTime mArchiveTime = QDateTime::currentDateTime();
int mIndexIdentifier = 0;
};
#endif // ExportMailJob_H
......@@ -33,7 +33,6 @@
ExportNotesJob::ExportNotesJob(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep)
: AbstractImportExportJob(parent, archiveStorage, typeSelected, numberOfStep)
, mIndexIdentifier(0)
{
}
......
......@@ -40,7 +40,7 @@ private Q_SLOTS:
private:
void backupConfig();
void backupTheme();
int mIndexIdentifier;
int mIndexIdentifier = 0;
};
#endif // EXPORTNOTESJOB_H
......@@ -41,7 +41,7 @@ private:
QString mUrl;
QString mArchivePath;
QString mArchiveName;
KZip *mZip;
KZip *mZip = nullptr;
};
#endif // PIMSETTINGBACKUPTHREAD_H
......@@ -55,10 +55,10 @@ public:
void expunge(Akonadi::Collection::Id col, bool sync) override;
private:
KIdentityManagement::IdentityManager *mIdentityManager;
MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor;
Akonadi::EntityTreeModel *mEntityTreeModel;
Akonadi::EntityMimeTypeFilterModel *mCollectionModel;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor = nullptr;
Akonadi::EntityTreeModel *mEntityTreeModel = nullptr;
Akonadi::EntityMimeTypeFilterModel *mCollectionModel = nullptr;
};
#endif
......@@ -35,7 +35,7 @@ public:
QString importDataInfoPath();
private:
QTemporaryDir *mTempDir;
QTemporaryDir *mTempDir = nullptr;
QString mFilename;
};
......
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