[libcalamares] Give GlobalStorage a parent

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

@ -36,8 +36,8 @@ using CalamaresUtils::operator""_MiB;
namespace Calamares namespace Calamares
{ {
GlobalStorage::GlobalStorage() GlobalStorage::GlobalStorage( QObject* parent )
: QObject( nullptr ) : QObject( parent )
{ {
} }

@ -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.

@ -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