summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-25 09:00:32 +0200
committerMontel Laurent <[email protected]>2017-04-25 09:00:32 +0200
commit636f62a0d0ab9c59de87404cc73ac9522827992f (patch)
treed194f272f04bc5fa23315d6d0ed386dca3bdd081
parent5319de27f9921c6878019b27c35cd4fc973f9310 (diff)
Make sure that mImportWizard is defined
-rw-r--r--src/importwizarddisplayinfo.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/importwizarddisplayinfo.cpp b/src/importwizarddisplayinfo.cpp
index 93f3bb2..2519bce 100644
--- a/src/importwizarddisplayinfo.cpp
+++ b/src/importwizarddisplayinfo.cpp
@@ -32,6 +32,7 @@
ImportWizardDisplayInfo::ImportWizardDisplayInfo(ImportWizard *wizard)
: mImportWizard(wizard)
{
+ Q_ASSERT_X(mImportWizard, __FUNCTION__, "mImportWizard is null");
}
ImportWizardDisplayInfo::~ImportWizardDisplayInfo()
@@ -85,14 +86,12 @@ void ImportWizardDisplayInfo::filterImportInfo(const QString &log)
void ImportWizardDisplayInfo::initializeFilter(MailImporter::Filter &filter)
{
- if (mImportWizard) {
- MailImporter::FilterInfo *info = new MailImporter::FilterInfo();
- ImportFilterInfoGui *infoGui = new ImportFilterInfoGui(mImportWizard->importMailPage());
- info->setFilterInfoGui(infoGui);
- info->clear(); // Clear info from last time
- MailImporter::FilterImporterAkonadi *filterImporter = new MailImporter::FilterImporterAkonadi(info);
- filterImporter->setRootCollection(mImportWizard->importMailPage()->selectedCollection());
- filter.setFilterImporter(filterImporter);
- filter.setFilterInfo(info);
- }
+ MailImporter::FilterInfo *info = new MailImporter::FilterInfo();
+ ImportFilterInfoGui *infoGui = new ImportFilterInfoGui(mImportWizard->importMailPage());
+ info->setFilterInfoGui(infoGui);
+ info->clear(); // Clear info from last time
+ MailImporter::FilterImporterAkonadi *filterImporter = new MailImporter::FilterImporterAkonadi(info);
+ filterImporter->setRootCollection(mImportWizard->importMailPage()->selectedCollection());
+ filter.setFilterImporter(filterImporter);
+ filter.setFilterInfo(info);
}