Skip to content
Snippets Groups Projects
Commit cb9a984b authored by Teo Mrnjavac's avatar Teo Mrnjavac
Browse files

setPartitionFlags in PartitionCoreModule.

parent c233fb3b
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@
#include "jobs/FillGlobalStorageJob.h"
#include "jobs/FormatPartitionJob.h"
#include "jobs/ResizePartitionJob.h"
#include "jobs/SetPartitionFlagsJob.h"
#include "Typedefs.h"
#include "utils/Logger.h"
......@@ -296,7 +297,10 @@ PartitionCoreModule::formatPartition( Device* device, Partition* partition )
}
void
PartitionCoreModule::resizePartition( Device* device, Partition* partition, qint64 first, qint64 last )
PartitionCoreModule::resizePartition( Device* device,
Partition* partition,
qint64 first,
qint64 last )
{
auto deviceInfo = infoForDevice( device );
Q_ASSERT( deviceInfo );
......@@ -309,6 +313,22 @@ PartitionCoreModule::resizePartition( Device* device, Partition* partition, qint
refresh();
}
void
PartitionCoreModule::setPartitionFlags( Device* device,
Partition* partition,
PartitionTable::Flags flags )
{
auto deviceInfo = infoForDevice( device );
Q_ASSERT( deviceInfo );
PartitionModel::ResetHelper( partitionModelForDevice( device ) );
SetPartFlagsJob* job = new SetPartFlagsJob( device, partition, flags );
deviceInfo->jobs << Calamares::job_ptr( job );
refresh();
}
QList< Calamares::job_ptr >
PartitionCoreModule::jobs() const
{
......
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -89,6 +89,8 @@ public:
void resizePartition( Device* device, Partition* partition, qint64 first, qint64 last );
void setPartitionFlags( Device* device, Partition* partition, PartitionTable::Flags flags );
void setBootLoaderInstallPath( const QString& path );
QList< Calamares::job_ptr > jobs() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment