From 1247077ccc8033628aeeceb0fc4761c93421a631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Fri, 4 Jul 2014 16:34:30 +0200 Subject: [PATCH] Pass mount point to CreatePartitionJob --- src/modules/partition/CreatePartitionDialog.cpp | 6 ++++-- src/modules/partition/CreatePartitionJob.cpp | 3 ++- src/modules/partition/CreatePartitionJob.h | 9 +++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/modules/partition/CreatePartitionDialog.cpp b/src/modules/partition/CreatePartitionDialog.cpp index 4990faea0..90e49b09a 100644 --- a/src/modules/partition/CreatePartitionDialog.cpp +++ b/src/modules/partition/CreatePartitionDialog.cpp @@ -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() + ); } diff --git a/src/modules/partition/CreatePartitionJob.cpp b/src/modules/partition/CreatePartitionJob.cpp index b65cb654b..e79f64cbe 100644 --- a/src/modules/partition/CreatePartitionJob.cpp +++ b/src/modules/partition/CreatePartitionJob.cpp @@ -24,9 +24,10 @@ #include #include -CreatePartitionJob::CreatePartitionJob( Device* device, Partition* partition ) +CreatePartitionJob::CreatePartitionJob( Device* device, Partition* partition, const QString& mountPoint ) : m_device( device ) , m_partition( partition ) + , m_mountPoint( mountPoint ) { } diff --git a/src/modules/partition/CreatePartitionJob.h b/src/modules/partition/CreatePartitionJob.h index 5ba20dbdb..9e56b4d53 100644 --- a/src/modules/partition/CreatePartitionJob.h +++ b/src/modules/partition/CreatePartitionJob.h @@ -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 */