[libcalamares] Give GlobalStorage a parent

main
Adriaan de Groot 5 years ago
parent 4b7403d115
commit 51e743a67f

@ -1,5 +1,5 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
* *
@ -36,8 +36,8 @@ using CalamaresUtils::operator""_MiB;
namespace Calamares namespace Calamares
{ {
GlobalStorage::GlobalStorage() GlobalStorage::GlobalStorage( QObject* parent )
: QObject( nullptr ) : QObject( parent )
{ {
} }

@ -1,5 +1,5 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
* *
@ -39,7 +39,7 @@ class GlobalStorage : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit GlobalStorage(); explicit GlobalStorage( QObject* parent = nullptr );
//NOTE: thread safety is guaranteed by JobQueue, which executes jobs one by one. //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. // If at any time jobs become concurrent, this class must be made thread-safe.

@ -1,5 +1,5 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* *
@ -170,7 +170,7 @@ JobQueue::globalStorage() const
JobQueue::JobQueue( QObject* parent ) JobQueue::JobQueue( QObject* parent )
: QObject( parent ) : QObject( parent )
, m_thread( new JobThread( this ) ) , m_thread( new JobThread( this ) )
, m_storage( new GlobalStorage() ) , m_storage( new GlobalStorage( this ) )
{ {
Q_ASSERT( !s_instance ); Q_ASSERT( !s_instance );
s_instance = this; s_instance = this;

Loading…
Cancel
Save