2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2014-07-18 14:29:27 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2014-07-18 14:29:27 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2014-07-18 14:29:27 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-06-14 22:59:40 +02:00
|
|
|
#include "PartitionJob.h"
|
2014-07-18 14:29:27 +02:00
|
|
|
|
|
|
|
PartitionJob::PartitionJob( Partition* partition )
|
|
|
|
: m_partition( partition )
|
2020-04-07 11:36:40 +02:00
|
|
|
{
|
|
|
|
}
|
2017-12-14 22:09:54 +01:00
|
|
|
|
2020-04-07 11:36:40 +02:00
|
|
|
void
|
|
|
|
PartitionJob::iprogress( int percent )
|
2017-12-14 22:09:54 +01:00
|
|
|
{
|
|
|
|
if ( percent < 0 )
|
2020-04-07 11:36:40 +02:00
|
|
|
{
|
2017-12-14 22:09:54 +01:00
|
|
|
percent = 0;
|
2020-04-07 11:36:40 +02:00
|
|
|
}
|
2017-12-14 22:09:54 +01:00
|
|
|
if ( percent > 100 )
|
2020-04-07 11:36:40 +02:00
|
|
|
{
|
2017-12-14 22:09:54 +01:00
|
|
|
percent = 100;
|
2020-04-07 11:36:40 +02:00
|
|
|
}
|
2017-12-14 22:09:54 +01:00
|
|
|
emit progress( qreal( percent / 100.0 ) );
|
|
|
|
}
|