From c3efa65668fce65f944cb10e785ff26897d20158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Wed, 6 Aug 2014 16:15:34 +0200 Subject: [PATCH] Make sure all PM filesystem classes are initialized early enough If FileSystemFactory::init() is not called early enough, we won't get access to some information such as the number of used sectors. --- src/modules/partition/CreatePartitionDialog.cpp | 2 -- src/modules/partition/PartitionCoreModule.cpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/partition/CreatePartitionDialog.cpp b/src/modules/partition/CreatePartitionDialog.cpp index a717848f5..dc5fd8fee 100644 --- a/src/modules/partition/CreatePartitionDialog.cpp +++ b/src/modules/partition/CreatePartitionDialog.cpp @@ -47,8 +47,6 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par { m_ui->setupUi( this ); - FileSystemFactory::init(); - if ( device->partitionTable()->type() == PartitionTable::msdos ) initMbrPartitionTypeUi(); else diff --git a/src/modules/partition/PartitionCoreModule.cpp b/src/modules/partition/PartitionCoreModule.cpp index 2ad439950..017a8e6b6 100644 --- a/src/modules/partition/PartitionCoreModule.cpp +++ b/src/modules/partition/PartitionCoreModule.cpp @@ -39,6 +39,7 @@ #include #include #include +#include // Qt #include @@ -90,10 +91,9 @@ PartitionCoreModule::PartitionCoreModule( QObject* parent ) , m_deviceModel( new DeviceModel( this ) ) , m_bootLoaderModel( new BootLoaderModel( this ) ) { - // FIXME: Should be done at startup if ( !CalaPM::init() ) qFatal( "Failed to init CalaPM" ); - + FileSystemFactory::init(); init(); }