mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
Keep an immutable copy for every scanned Device* to avoid rescans.
This commit is contained in:
parent
464336d609
commit
c316d22b08
3 changed files with 20 additions and 15 deletions
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
DeviceModel* deviceModel() const;
|
||||
|
||||
PartitionModel* partitionModelForDevice( Device* device ) const;
|
||||
PartitionModel* partitionModelForDevice( const Device* device ) const;
|
||||
|
||||
//HACK: all devices change over time, and together make up the state of the CoreModule.
|
||||
// However this makes it hard to show the *original* state of a device.
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
// This should probably be redone some other way.
|
||||
// -- Teo 4/2015
|
||||
//FIXME: make this horrible method private. -- Teo 12/2015
|
||||
static Device* createImmutableDeviceCopy( Device* device );
|
||||
Device* immutableDeviceCopy( const Device* device );
|
||||
|
||||
QAbstractItemModel* bootLoaderModel() const;
|
||||
|
||||
|
@ -147,6 +147,7 @@ private:
|
|||
~DeviceInfo();
|
||||
QScopedPointer< Device > device;
|
||||
QScopedPointer< PartitionModel > partitionModel;
|
||||
const QScopedPointer< Device > immutableDevice;
|
||||
QList< Calamares::job_ptr > jobs;
|
||||
|
||||
void forgetChanges();
|
||||
|
@ -166,7 +167,7 @@ private:
|
|||
void updateIsDirty();
|
||||
void scanForEfiSystemPartitions();
|
||||
|
||||
DeviceInfo* infoForDevice( Device* ) const;
|
||||
DeviceInfo* infoForDevice( const Device* ) const;
|
||||
|
||||
OsproberEntryList m_osproberLines;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue