diff --git a/src/libcalamares/GlobalStorage.cpp b/src/libcalamares/GlobalStorage.cpp index d58a3b0c6..341fc3892 100644 --- a/src/libcalamares/GlobalStorage.cpp +++ b/src/libcalamares/GlobalStorage.cpp @@ -1,5 +1,5 @@ /* === This file is part of Calamares - === - * + * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * @@ -36,8 +36,8 @@ using CalamaresUtils::operator""_MiB; namespace Calamares { -GlobalStorage::GlobalStorage() - : QObject( nullptr ) +GlobalStorage::GlobalStorage( QObject* parent ) + : QObject( parent ) { } diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h index e9ba1da8a..a2848f888 100644 --- a/src/libcalamares/GlobalStorage.h +++ b/src/libcalamares/GlobalStorage.h @@ -1,5 +1,5 @@ /* === This file is part of Calamares - === - * + * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot * @@ -39,7 +39,7 @@ class GlobalStorage : public QObject { Q_OBJECT public: - explicit GlobalStorage(); + explicit GlobalStorage( QObject* parent = nullptr ); //NOTE: thread safety is guaranteed by JobQueue, which executes jobs one by one. // If at any time jobs become concurrent, this class must be made thread-safe. diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index adff9464b..64cc4794d 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -1,5 +1,5 @@ /* === This file is part of Calamares - === - * + * * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac * SPDX-FileCopyrightText: 2018 Adriaan de Groot * @@ -170,7 +170,7 @@ JobQueue::globalStorage() const JobQueue::JobQueue( QObject* parent ) : QObject( parent ) , m_thread( new JobThread( this ) ) - , m_storage( new GlobalStorage() ) + , m_storage( new GlobalStorage( this ) ) { Q_ASSERT( !s_instance ); s_instance = this;