[calamares] No need for progresstreeview to be singleton
This commit is contained in:
parent
e9965d37e3
commit
290a708e56
@ -23,19 +23,9 @@
|
||||
#include "Branding.h"
|
||||
#include "ViewManager.h"
|
||||
|
||||
ProgressTreeView* ProgressTreeView::s_instance = nullptr;
|
||||
|
||||
ProgressTreeView*
|
||||
ProgressTreeView::instance()
|
||||
{
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
ProgressTreeView::ProgressTreeView( QWidget* parent )
|
||||
: QTreeView( parent )
|
||||
{
|
||||
s_instance = this; //FIXME: should assert when s_instance gets written and it wasn't nullptr
|
||||
|
||||
this->setObjectName( "sidebarMenuApp" );
|
||||
setFrameShape( QFrame::NoFrame );
|
||||
setContentsMargins( 0, 0, 0, 0 );
|
||||
|
@ -27,14 +27,11 @@ class ProgressTreeDelegate;
|
||||
/**
|
||||
* @brief The ProgressTreeView class is a modified QTreeView which displays the
|
||||
* available view steps and the user's progress through them.
|
||||
* @note singleton, only access through ProgressTreeView::instance().
|
||||
*/
|
||||
class ProgressTreeView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static ProgressTreeView* instance();
|
||||
|
||||
explicit ProgressTreeView( QWidget* parent = nullptr );
|
||||
virtual ~ProgressTreeView() override;
|
||||
|
||||
@ -44,7 +41,6 @@ public:
|
||||
void setModel( QAbstractItemModel* model ) override;
|
||||
|
||||
private:
|
||||
static ProgressTreeView* s_instance;
|
||||
ProgressTreeDelegate* m_delegate;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user