Remove unnecessary removeContextObject calls

They are removed on deletion now.

Change-Id: I08461ea4938e24ab450df013a0f8f820032381da
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2020-05-26 14:48:38 +02:00
parent 7b5481f75c
commit e5bb7d1ffe
24 changed files with 46 additions and 126 deletions

View File

@@ -299,10 +299,10 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
m_crumbContainer(new QWidget(this)),
m_crumbLabel(new DelayedFileCrumbLabel(this))
{
m_context = new Core::IContext(this);
m_context->setContext(Core::Context(C_FOLDERNAVIGATIONWIDGET));
m_context->setWidget(this);
Core::ICore::addContextObject(m_context);
auto context = new Core::IContext(this);
context->setContext(Core::Context(C_FOLDERNAVIGATIONWIDGET));
context->setWidget(this);
Core::ICore::addContextObject(context);
setBackgroundRole(QPalette::Base);
setAutoFillBackground(true);
@@ -435,11 +435,6 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
setRootAutoSynchronization(true);
}
FolderNavigationWidget::~FolderNavigationWidget()
{
Core::ICore::removeContextObject(m_context);
}
void FolderNavigationWidget::toggleAutoSynchronization()
{
setAutoSynchronization(!m_autoSync);