2014-06-27 17:25:39 +02:00
|
|
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
|
|
|
*
|
|
|
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
2015-01-29 20:24:09 +01:00
|
|
|
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
2014-06-27 17:25:39 +02:00
|
|
|
*
|
|
|
|
* Calamares is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Calamares is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-07-02 13:49:21 +02:00
|
|
|
#include "gui/PartitionViewStep.h"
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2015-07-02 13:49:21 +02:00
|
|
|
#include "core/DeviceModel.h"
|
|
|
|
#include "core/PartitionCoreModule.h"
|
|
|
|
#include "core/PartitionModel.h"
|
2015-09-18 15:41:07 +02:00
|
|
|
#include "core/KPMHelpers.h"
|
|
|
|
#include "core/OsproberEntry.h"
|
|
|
|
#include "core/PartUtils.h"
|
2015-07-02 13:49:21 +02:00
|
|
|
#include "gui/ChoicePage.h"
|
|
|
|
#include "gui/AlongsidePage.h"
|
|
|
|
#include "gui/PartitionPage.h"
|
|
|
|
#include "gui/ReplacePage.h"
|
|
|
|
#include "gui/PartitionPreview.h"
|
2014-07-30 14:15:29 +02:00
|
|
|
|
2014-09-03 18:09:37 +02:00
|
|
|
#include "CalamaresVersion.h"
|
|
|
|
#include "utils/CalamaresUtilsGui.h"
|
|
|
|
#include "utils/Logger.h"
|
2014-11-11 17:09:33 +01:00
|
|
|
#include "utils/Retranslator.h"
|
2014-09-03 18:09:37 +02:00
|
|
|
#include "widgets/WaitingWidget.h"
|
2014-09-23 17:42:11 +02:00
|
|
|
#include "GlobalStorage.h"
|
|
|
|
#include "JobQueue.h"
|
2015-04-09 15:05:04 +02:00
|
|
|
#include "Job.h"
|
2015-04-15 15:36:49 +02:00
|
|
|
#include "Branding.h"
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2015-07-02 13:49:21 +02:00
|
|
|
#include <kpmcore/core/device.h>
|
|
|
|
#include <kpmcore/core/partition.h>
|
|
|
|
|
2014-07-30 14:15:29 +02:00
|
|
|
// Qt
|
2014-09-03 18:09:37 +02:00
|
|
|
#include <QApplication>
|
2014-07-30 14:15:29 +02:00
|
|
|
#include <QFormLayout>
|
|
|
|
#include <QLabel>
|
2014-09-03 18:09:37 +02:00
|
|
|
#include <QProcess>
|
|
|
|
#include <QStackedWidget>
|
|
|
|
#include <QTimer>
|
2014-06-27 17:25:39 +02:00
|
|
|
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::PartitionViewStep( QObject* parent )
|
2014-06-27 18:14:39 +02:00
|
|
|
: Calamares::ViewStep( parent )
|
2014-09-03 18:09:37 +02:00
|
|
|
, m_widget( new QStackedWidget() )
|
2014-07-02 16:06:54 +02:00
|
|
|
, m_core( new PartitionCoreModule( this ) )
|
2015-10-06 18:40:31 +02:00
|
|
|
, m_choicePage( nullptr )
|
2014-09-19 16:27:39 +02:00
|
|
|
, m_alongsidePage( new AlongsidePage() )
|
2014-09-03 18:09:37 +02:00
|
|
|
, m_manualPartitionPage( new PartitionPage( m_core ) )
|
2014-12-16 17:04:09 +01:00
|
|
|
, m_replacePage( new ReplacePage( m_core ) )
|
2015-10-06 18:40:31 +02:00
|
|
|
, m_compactMode( true )
|
2014-09-03 18:09:37 +02:00
|
|
|
{
|
|
|
|
m_widget->setContentsMargins( 0, 0, 0, 0 );
|
|
|
|
|
2015-10-06 18:40:31 +02:00
|
|
|
m_waitingWidget = new WaitingWidget( QString() );
|
|
|
|
m_widget->addWidget( m_waitingWidget );
|
|
|
|
CALAMARES_RETRANSLATE( qobject_cast< WaitingWidget* >( m_waitingWidget )->setText( tr( "Gathering system information..." ) ); )
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2015-10-06 18:40:31 +02:00
|
|
|
// We're not done loading, but we need the configuration map first.
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
PartitionViewStep::continueLoading()
|
|
|
|
{
|
|
|
|
OsproberEntryList osproberEntries = PartUtils::runOsprober( m_core );
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2015-10-06 18:40:31 +02:00
|
|
|
Q_ASSERT( !m_choicePage );
|
|
|
|
m_choicePage = new ChoicePage( m_compactMode );
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2015-10-06 18:40:31 +02:00
|
|
|
m_choicePage->init( m_core, osproberEntries );
|
|
|
|
m_alongsidePage->init( m_core, osproberEntries );
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2015-10-06 18:40:31 +02:00
|
|
|
m_widget->addWidget( m_choicePage );
|
|
|
|
m_widget->addWidget( m_manualPartitionPage );
|
|
|
|
m_widget->addWidget( m_alongsidePage );
|
|
|
|
m_widget->addWidget( m_replacePage );
|
|
|
|
m_widget->removeWidget( m_waitingWidget );
|
|
|
|
m_waitingWidget->deleteLater();
|
|
|
|
m_waitingWidget = nullptr;
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2014-09-19 16:27:39 +02:00
|
|
|
connect( m_core, &PartitionCoreModule::hasRootMountPointChanged,
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
connect( m_choicePage, &ChoicePage::nextStatusChanged,
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
connect( m_alongsidePage, &AlongsidePage::nextStatusChanged,
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
2014-12-16 17:04:09 +01:00
|
|
|
connect( m_replacePage, &ReplacePage::nextStatusChanged,
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
2014-09-03 18:09:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PartitionViewStep::~PartitionViewStep()
|
2014-06-27 17:25:39 +02:00
|
|
|
{
|
2014-09-03 18:09:37 +02:00
|
|
|
if ( m_choicePage && m_choicePage->parent() == nullptr )
|
|
|
|
m_choicePage->deleteLater();
|
|
|
|
if ( m_manualPartitionPage && m_manualPartitionPage->parent() == nullptr )
|
|
|
|
m_manualPartitionPage->deleteLater();
|
2014-06-27 17:25:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QString
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::prettyName() const
|
2014-06-27 17:25:39 +02:00
|
|
|
{
|
2014-06-27 18:14:39 +02:00
|
|
|
return tr( "Partitions" );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QWidget*
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::widget()
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
2014-09-03 18:09:37 +02:00
|
|
|
return m_widget;
|
2014-06-27 18:14:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-07-30 14:15:29 +02:00
|
|
|
QWidget*
|
|
|
|
PartitionViewStep::createSummaryWidget() const
|
|
|
|
{
|
|
|
|
QWidget* widget = new QWidget;
|
2015-04-09 15:05:04 +02:00
|
|
|
QVBoxLayout* mainLayout = new QVBoxLayout;
|
|
|
|
widget->setLayout( mainLayout );
|
|
|
|
mainLayout->setMargin( 0 );
|
2015-04-15 15:36:49 +02:00
|
|
|
|
|
|
|
ChoicePage::Choice choice = m_choicePage->currentChoice();
|
|
|
|
|
2015-04-09 15:05:04 +02:00
|
|
|
QFormLayout* formLayout = new QFormLayout( widget );
|
2015-04-09 17:49:00 +02:00
|
|
|
const int MARGIN = CalamaresUtils::defaultFontHeight() / 2;
|
|
|
|
formLayout->setContentsMargins( MARGIN, 0, MARGIN, MARGIN );
|
2015-04-09 15:05:04 +02:00
|
|
|
mainLayout->addLayout( formLayout );
|
2014-07-30 14:15:29 +02:00
|
|
|
|
|
|
|
QList< PartitionCoreModule::SummaryInfo > list = m_core->createSummaryInfo();
|
2015-04-15 15:36:49 +02:00
|
|
|
if ( list.length() > 1 ) // There are changes on more than one disk
|
|
|
|
{
|
|
|
|
//NOTE: all of this should only happen when Manual partitioning is active.
|
|
|
|
// Any other choice should result in a list.length() == 1.
|
|
|
|
QLabel* modeLabel = new QLabel;
|
|
|
|
formLayout->addRow( modeLabel );
|
|
|
|
QString modeText;
|
|
|
|
switch ( choice )
|
|
|
|
{
|
|
|
|
case ChoicePage::Alongside:
|
|
|
|
modeText = tr( "Install %1 <strong>alongside</strong> another operating system." )
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
string( Calamares::Branding::ShortVersionedName ) );
|
|
|
|
break;
|
|
|
|
case ChoicePage::Erase:
|
|
|
|
modeText = tr( "<strong>Erase</strong> disk and install %1." )
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
string( Calamares::Branding::ShortVersionedName ) );
|
|
|
|
break;
|
|
|
|
case ChoicePage::Replace:
|
|
|
|
modeText = tr( "<strong>Replace</strong> a partition with %1." )
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
string( Calamares::Branding::ShortVersionedName ) );
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
modeText = tr( "<strong>Manual</strong> partitioning." );
|
|
|
|
}
|
|
|
|
modeLabel->setText( modeText );
|
|
|
|
}
|
2014-07-30 14:15:29 +02:00
|
|
|
for ( const auto& info : list )
|
|
|
|
{
|
2015-04-15 15:36:49 +02:00
|
|
|
QLabel* diskInfoLabel = new QLabel;
|
|
|
|
if ( list.length() == 1 ) // this is the only disk preview
|
|
|
|
{
|
|
|
|
QString modeText;
|
|
|
|
switch ( choice )
|
|
|
|
{
|
|
|
|
case ChoicePage::Alongside:
|
|
|
|
modeText = tr( "Install %1 <strong>alongside</strong> another operating system on disk <strong>%2</strong> (%3)." )
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
string( Calamares::Branding::ShortVersionedName ) )
|
|
|
|
.arg( info.deviceNode )
|
|
|
|
.arg( info.deviceName );
|
|
|
|
break;
|
|
|
|
case ChoicePage::Erase:
|
|
|
|
modeText = tr( "<strong>Erase</strong> disk <strong>%2</strong> (%3) and install %1." )
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
string( Calamares::Branding::ShortVersionedName ) )
|
|
|
|
.arg( info.deviceNode )
|
|
|
|
.arg( info.deviceName );
|
|
|
|
break;
|
|
|
|
case ChoicePage::Replace:
|
|
|
|
modeText = tr( "<strong>Replace</strong> a partition on disk <strong>%2</strong> (%3) with %1." )
|
|
|
|
.arg( Calamares::Branding::instance()->
|
|
|
|
string( Calamares::Branding::ShortVersionedName ) )
|
|
|
|
.arg( info.deviceNode )
|
|
|
|
.arg( info.deviceName );
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
modeText = tr( "<strong>Manual</strong> partitioning on disk <strong>%1</strong> (%2)." )
|
|
|
|
.arg( info.deviceNode )
|
|
|
|
.arg( info.deviceName );
|
|
|
|
}
|
|
|
|
diskInfoLabel->setText( modeText );
|
|
|
|
}
|
|
|
|
else // multiple disk previews!
|
|
|
|
{
|
|
|
|
diskInfoLabel->setText( tr( "Disk <strong>%1</strong> (%2)" )
|
|
|
|
.arg( info.deviceNode )
|
|
|
|
.arg( info.deviceName ) );
|
|
|
|
}
|
2015-04-09 17:49:00 +02:00
|
|
|
formLayout->addRow( diskInfoLabel );
|
2014-07-30 14:15:29 +02:00
|
|
|
|
2015-04-09 17:49:00 +02:00
|
|
|
PartitionPreview* preview;
|
2014-07-30 14:15:29 +02:00
|
|
|
|
|
|
|
preview = new PartitionPreview;
|
2015-04-22 11:17:22 +02:00
|
|
|
preview->setLabelsVisible( true );
|
2014-07-30 14:15:29 +02:00
|
|
|
preview->setModel( info.partitionModelBefore );
|
|
|
|
info.partitionModelBefore->setParent( widget );
|
2015-04-09 15:05:04 +02:00
|
|
|
formLayout->addRow( tr( "Before:" ), preview );
|
2014-07-30 14:15:29 +02:00
|
|
|
|
|
|
|
preview = new PartitionPreview;
|
2015-04-22 11:17:22 +02:00
|
|
|
preview->setLabelsVisible( true );
|
2014-07-30 14:15:29 +02:00
|
|
|
preview->setModel( info.partitionModelAfter );
|
|
|
|
info.partitionModelAfter->setParent( widget );
|
2015-04-09 15:05:04 +02:00
|
|
|
formLayout->addRow( tr( "After:" ), preview );
|
2014-07-30 14:15:29 +02:00
|
|
|
}
|
2015-04-09 15:05:04 +02:00
|
|
|
QStringList jobsLines;
|
|
|
|
foreach ( const Calamares::job_ptr& job, jobs() )
|
|
|
|
{
|
|
|
|
if ( !job->prettyDescription().isEmpty() )
|
|
|
|
jobsLines.append( job->prettyDescription() );
|
|
|
|
}
|
2015-04-10 12:55:08 +02:00
|
|
|
if ( !jobsLines.isEmpty() )
|
|
|
|
{
|
|
|
|
QLabel* jobsLabel = new QLabel( widget );
|
|
|
|
mainLayout->addWidget( jobsLabel );
|
|
|
|
jobsLabel->setText( jobsLines.join( "<br/>" ) );
|
|
|
|
int m = CalamaresUtils::defaultFontHeight() / 2;
|
|
|
|
jobsLabel->setMargin( CalamaresUtils::defaultFontHeight() / 2 );
|
|
|
|
QPalette pal;
|
|
|
|
pal.setColor( QPalette::Background, pal.background().color().lighter( 108 ) );
|
|
|
|
jobsLabel->setAutoFillBackground( true );
|
|
|
|
jobsLabel->setPalette( pal );
|
|
|
|
}
|
2014-07-30 14:15:29 +02:00
|
|
|
return widget;
|
|
|
|
}
|
|
|
|
|
2014-09-03 18:09:37 +02:00
|
|
|
|
2014-06-27 18:14:39 +02:00
|
|
|
void
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::next()
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
2014-09-03 18:09:37 +02:00
|
|
|
if ( m_choicePage == m_widget->currentWidget() )
|
|
|
|
{
|
2014-09-04 19:37:30 +02:00
|
|
|
if ( m_choicePage->currentChoice() == ChoicePage::Manual )
|
|
|
|
m_widget->setCurrentWidget( m_manualPartitionPage );
|
|
|
|
else if ( m_choicePage->currentChoice() == ChoicePage::Erase )
|
|
|
|
{
|
2015-10-29 17:34:29 +01:00
|
|
|
emit done();
|
|
|
|
return;
|
2014-09-04 19:37:30 +02:00
|
|
|
}
|
2014-09-19 16:27:39 +02:00
|
|
|
else if ( m_choicePage->currentChoice() == ChoicePage::Alongside )
|
|
|
|
{
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
m_core->revert();
|
|
|
|
m_widget->setCurrentWidget( m_alongsidePage );
|
|
|
|
}
|
2014-12-16 17:04:09 +01:00
|
|
|
else if ( m_choicePage->currentChoice() == ChoicePage::Replace )
|
|
|
|
{
|
|
|
|
if ( m_core->isDirty() )
|
|
|
|
m_core->revert();
|
|
|
|
m_widget->setCurrentWidget( m_replacePage );
|
|
|
|
}
|
2014-09-03 18:09:37 +02:00
|
|
|
cDebug() << "Choice applied: " << m_choicePage->currentChoice();
|
2014-10-06 18:30:23 +02:00
|
|
|
return;
|
2014-09-03 18:09:37 +02:00
|
|
|
}
|
2014-10-06 18:30:23 +02:00
|
|
|
emit done();
|
2014-06-27 18:14:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2014-06-30 13:24:59 +02:00
|
|
|
PartitionViewStep::back()
|
2014-09-03 18:09:37 +02:00
|
|
|
{
|
|
|
|
if ( m_widget->currentWidget() != m_choicePage )
|
|
|
|
m_widget->setCurrentWidget( m_choicePage );
|
|
|
|
}
|
2014-06-27 18:14:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
bool
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::isNextEnabled() const
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
2014-09-03 18:09:37 +02:00
|
|
|
if ( m_choicePage && m_choicePage == m_widget->currentWidget() )
|
|
|
|
return m_choicePage->isNextEnabled();
|
|
|
|
|
2014-10-06 18:30:23 +02:00
|
|
|
if ( m_alongsidePage && m_alongsidePage == m_widget->currentWidget() )
|
|
|
|
return m_alongsidePage->isNextEnabled();
|
|
|
|
|
2014-09-16 18:13:05 +02:00
|
|
|
if ( m_manualPartitionPage && m_manualPartitionPage == m_widget->currentWidget() )
|
|
|
|
return m_core->hasRootMountPoint();
|
2014-09-04 19:37:30 +02:00
|
|
|
|
2014-09-16 18:13:05 +02:00
|
|
|
return false;
|
2014-06-27 18:14:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-01-29 20:24:09 +01:00
|
|
|
bool
|
|
|
|
PartitionViewStep::isBackEnabled() const
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-06-27 18:14:39 +02:00
|
|
|
bool
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::isAtBeginning() const
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
2014-09-08 10:42:26 +02:00
|
|
|
if ( m_widget->currentWidget() == m_manualPartitionPage ||
|
2014-12-16 17:04:09 +01:00
|
|
|
m_widget->currentWidget() == m_alongsidePage ||
|
|
|
|
m_widget->currentWidget() == m_replacePage )
|
2014-09-03 18:09:37 +02:00
|
|
|
return false;
|
2014-06-27 18:14:39 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2014-07-01 11:49:09 +02:00
|
|
|
PartitionViewStep::isAtEnd() const
|
2014-06-27 18:14:39 +02:00
|
|
|
{
|
2014-09-03 18:09:37 +02:00
|
|
|
if ( m_choicePage == m_widget->currentWidget() )
|
|
|
|
return false;
|
2014-06-27 18:14:39 +02:00
|
|
|
return true;
|
2014-06-27 17:25:39 +02:00
|
|
|
}
|
2014-07-08 14:02:21 +02:00
|
|
|
|
|
|
|
|
2015-04-29 18:16:18 +02:00
|
|
|
void
|
|
|
|
PartitionViewStep::onActivate()
|
|
|
|
{
|
|
|
|
// if we're coming back to PVS from the next VS
|
|
|
|
if ( m_widget->currentWidget() == m_replacePage )
|
|
|
|
{
|
|
|
|
m_replacePage->reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-10-06 18:30:23 +02:00
|
|
|
void
|
|
|
|
PartitionViewStep::onLeave()
|
|
|
|
{
|
|
|
|
if ( m_widget->currentWidget() == m_alongsidePage )
|
|
|
|
{
|
|
|
|
m_alongsidePage->applyChanges();
|
|
|
|
}
|
2014-12-16 17:04:09 +01:00
|
|
|
else if ( m_widget->currentWidget() == m_replacePage )
|
|
|
|
{
|
|
|
|
m_replacePage->applyChanges();
|
|
|
|
}
|
2014-10-06 18:30:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-02-14 22:53:00 +01:00
|
|
|
void
|
|
|
|
PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|
|
|
{
|
|
|
|
// Copy the efiSystemPartition setting to the global storage. It is needed not only in
|
|
|
|
// the EraseDiskPage, but also in the bootloader configuration modules (grub, bootloader).
|
|
|
|
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
|
|
|
|
if ( configurationMap.contains( "efiSystemPartition" ) &&
|
|
|
|
configurationMap.value( "efiSystemPartition" ).type() == QVariant::String &&
|
|
|
|
!configurationMap.value( "efiSystemPartition" ).toString().isEmpty() )
|
|
|
|
{
|
|
|
|
gs->insert( "efiSystemPartition", configurationMap.value( "efiSystemPartition" ).toString() );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gs->insert( "efiSystemPartition", QStringLiteral( "/boot/efi" ) );
|
|
|
|
}
|
2015-06-26 15:48:12 +02:00
|
|
|
|
|
|
|
if ( configurationMap.contains( "ensureSuspendToDisk" ) &&
|
|
|
|
configurationMap.value( "ensureSuspendToDisk" ).type() == QVariant::Bool )
|
|
|
|
{
|
|
|
|
gs->insert( "ensureSuspendToDisk", configurationMap.value( "ensureSuspendToDisk" ).toBool() );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gs->insert( "ensureSuspendToDisk", true );
|
|
|
|
}
|
2015-10-06 18:40:31 +02:00
|
|
|
|
|
|
|
if ( configurationMap.contains( "compactMode" ) &&
|
|
|
|
configurationMap.value( "compactMode" ).type() == QVariant::Bool )
|
|
|
|
{
|
|
|
|
m_compactMode = configurationMap.value( "compactMode", true ).toBool();
|
|
|
|
}
|
|
|
|
|
|
|
|
QTimer::singleShot( 0, this, &PartitionViewStep::continueLoading );
|
2015-02-14 22:53:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-07-08 14:02:21 +02:00
|
|
|
QList< Calamares::job_ptr >
|
|
|
|
PartitionViewStep::jobs() const
|
|
|
|
{
|
2014-07-08 15:46:48 +02:00
|
|
|
return m_core->jobs();
|
2014-07-08 14:02:21 +02:00
|
|
|
}
|
2014-09-23 17:42:11 +02:00
|
|
|
|
|
|
|
|
2015-09-09 18:52:08 +02:00
|
|
|
CALAMARES_PLUGIN_FACTORY_DEFINITION( PartitionViewStepFactory, registerPlugin<PartitionViewStep>(); )
|