[libcalamares] Give GlobalStorage a parent

This commit is contained in:
Adriaan de Groot 2020-07-23 12:48:18 +02:00
parent 4b7403d115
commit 51e743a67f
3 changed files with 7 additions and 7 deletions

View File

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

View File

@ -1,5 +1,5 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
*
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
*
@ -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.

View File

@ -1,5 +1,5 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
*
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
*
@ -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;