Commit 56e356df authored by Albert Astals Cid's avatar Albert Astals Cid

Fix crash on close

parent 80d7cf0b
......@@ -410,14 +410,14 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
bottomBarLayout->setSpacing( 0 );
bottomBarLayout->addWidget( m_pageSizeLabel->antiWidget() );
bottomBarLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
MiniBarLogic * miniBarLogic = new MiniBarLogic( this, m_document );
m_miniBar = new MiniBar( m_bottomBar, miniBarLogic );
m_miniBarLogic = new MiniBarLogic( this, m_document );
m_miniBar = new MiniBar( m_bottomBar, m_miniBarLogic );
bottomBarLayout->addWidget( m_miniBar );
bottomBarLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
bottomBarLayout->addWidget( m_pageSizeLabel );
rightLayout->addWidget( m_bottomBar );
m_pageNumberTool = new MiniBar( 0, miniBarLogic );
m_pageNumberTool = new MiniBar( 0, m_miniBarLogic );
connect( m_findBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*)));
connect( m_miniBar, SIGNAL(forwardKeyPressEvent(QKeyEvent*)), m_pageView, SLOT(externalKeyPressEvent(QKeyEvent*)));
......@@ -432,7 +432,7 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
m_document->addObserver( m_pageView );
m_document->registerView( m_pageView );
m_document->addObserver( m_toc );
m_document->addObserver( miniBarLogic );
m_document->addObserver( m_miniBarLogic );
#ifdef OKULAR_ENABLE_MINIBAR
m_document->addObserver( m_progressWidget );
#endif
......@@ -787,6 +787,7 @@ Part::~Part()
delete m_thumbnailList;
delete m_miniBar;
delete m_pageNumberTool;
delete m_miniBarLogic;
delete m_bottomBar;
#ifdef OKULAR_ENABLE_MINIBAR
delete m_progressWidget;
......
......@@ -56,6 +56,7 @@ class SearchWidget;
class Sidebar;
class TOC;
class MiniBar;
class MiniBarLogic;
class FileKeeper;
class Reviews;
class BookmarkList;
......@@ -238,6 +239,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
QPointer<ThumbnailList> m_thumbnailList;
QPointer<PageView> m_pageView;
QPointer<TOC> m_toc;
QPointer<MiniBarLogic> m_miniBarLogic;
QPointer<MiniBar> m_miniBar;
QPointer<MiniBar> m_pageNumberTool;
QPointer<QWidget> m_bottomBar;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment