Pass mount point to CreatePartitionJob

main
Aurélien Gâteau 11 years ago
parent ab4e81504e
commit 1247077ccc

@ -107,10 +107,12 @@ CreatePartitionDialog::createJob()
fs, first, last,
QString() /* path */,
PartitionTable::FlagNone /* availableFlags */,
m_ui->mountPointComboBox->currentText(),
QString() /* mountPoint */,
false /* mounted */,
PartitionTable::FlagNone /* activeFlags */,
Partition::StateNew
);
return new CreatePartitionJob( m_device, partition );
return new CreatePartitionJob( m_device, partition,
m_ui->mountPointComboBox->currentText()
);
}

@ -24,9 +24,10 @@
#include <core/partitiontable.h>
#include <fs/filesystem.h>
CreatePartitionJob::CreatePartitionJob( Device* device, Partition* partition )
CreatePartitionJob::CreatePartitionJob( Device* device, Partition* partition, const QString& mountPoint )
: m_device( device )
, m_partition( partition )
, m_mountPoint( mountPoint )
{
}

@ -29,7 +29,7 @@ class CreatePartitionJob : public Calamares::Job
{
Q_OBJECT
public:
CreatePartitionJob( Device* device, Partition* partition );
CreatePartitionJob( Device* device, Partition* partition, const QString& mountPoint );
QString prettyName() override;
void exec() override;
@ -44,10 +44,15 @@ public:
return m_partition;
}
QString mountPoint() const
{
return m_mountPoint;
}
private:
Device* m_device;
Partition* m_partition;
FileSystem* m_fs;
QString m_mountPoint;
};
#endif /* CREATEPARTITIONJOB_H */

Loading…
Cancel
Save