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.
This commit is contained in:
Aurélien Gâteau 2014-08-06 16:15:34 +02:00
parent 493e368bf0
commit c3efa65668
2 changed files with 2 additions and 4 deletions

View File

@ -47,8 +47,6 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par
{
m_ui->setupUi( this );
FileSystemFactory::init();
if ( device->partitionTable()->type() == PartitionTable::msdos )
initMbrPartitionTypeUi();
else

View File

@ -39,6 +39,7 @@
#include <core/partition.h>
#include <backend/corebackend.h>
#include <backend/corebackendmanager.h>
#include <fs/filesystemfactory.h>
// Qt
#include <QStandardItemModel>
@ -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();
}