diff --git a/src/libcalamares/partition/AutoMount.cpp b/src/libcalamares/partition/AutoMount.cpp index 984662960..0fc253067 100644 --- a/src/libcalamares/partition/AutoMount.cpp +++ b/src/libcalamares/partition/AutoMount.cpp @@ -67,10 +67,10 @@ querySolidAutoMount( QDBusConnection& dbus, AutoMountInfo& info ) } } -std::unique_ptr< AutoMountInfo > +std::shared_ptr< AutoMountInfo > automountDisable( bool disable ) { - auto u = std::make_unique< AutoMountInfo >(); + auto u = std::make_shared< AutoMountInfo >(); QDBusConnection dbus = QDBusConnection::sessionBus(); querySolidAutoMount( dbus, *u ); enableSolidAutoMount( dbus, !disable ); @@ -79,7 +79,7 @@ automountDisable( bool disable ) void -automountRestore( std::unique_ptr< AutoMountInfo >&& t ) +automountRestore( std::shared_ptr< AutoMountInfo >&& t ) { QDBusConnection dbus = QDBusConnection::sessionBus(); enableSolidAutoMount( dbus, t->wasSolidModuleAutoLoaded ); diff --git a/src/libcalamares/partition/AutoMount.h b/src/libcalamares/partition/AutoMount.h index b77bdbae6..a9a88e320 100644 --- a/src/libcalamares/partition/AutoMount.h +++ b/src/libcalamares/partition/AutoMount.h @@ -36,14 +36,14 @@ struct AutoMountInfo; * Returns an opaque structure which can be passed to automountRestore() * to return the system to the previously-configured automount settings. */ -DLLEXPORT std::unique_ptr< AutoMountInfo > automountDisable( bool disable = true ); +DLLEXPORT std::shared_ptr< AutoMountInfo > automountDisable( bool disable = true ); /** @brief Restore automount settings * * Pass the value returned from automountDisable() to restore the * previous settings. */ -DLLEXPORT void automountRestore( std::unique_ptr< AutoMountInfo >&& t ); +DLLEXPORT void automountRestore( std::shared_ptr< AutoMountInfo >&& t ); } // namespace Partition } // namespace CalamaresUtils