[vlmc-devel] commit: MediaListView: Fixing crash when restoring a view. ( Hugo Beauzee-Luyssen )
git at videolan.org
git at videolan.org
Fri Mar 19 11:59:25 CET 2010
vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Fri Mar 19 11:58:37 2010 +0100| [97d3071da74ec94fb35b8d234a1ec3af52158d64] | committer: Hugo Beauzee-Luyssen
MediaListView: Fixing crash when restoring a view.
Fixes #23
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=97d3071da74ec94fb35b8d234a1ec3af52158d64
---
src/Gui/library/ListViewController.cpp | 1 -
src/Gui/library/StackViewController.cpp | 12 ++++++------
src/Gui/library/StackViewController.h | 4 ----
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/Gui/library/ListViewController.cpp b/src/Gui/library/ListViewController.cpp
index 33c26c5..5411f0e 100644
--- a/src/Gui/library/ListViewController.cpp
+++ b/src/Gui/library/ListViewController.cpp
@@ -48,7 +48,6 @@ ListViewController::ListViewController( StackViewController* nav ) : m_nav( nav
ListViewController::~ListViewController()
{
delete m_container;
- delete m_layout;
delete m_scrollArea;
}
diff --git a/src/Gui/library/StackViewController.cpp b/src/Gui/library/StackViewController.cpp
index 7fcc28d..717d58a 100644
--- a/src/Gui/library/StackViewController.cpp
+++ b/src/Gui/library/StackViewController.cpp
@@ -87,16 +87,16 @@ StackViewController::restorePrevious()
void
StackViewController::viewDestroyed()
{
- //This should'nt happen.
- if ( m_controllerStack->isEmpty() )
- return ;
+ Q_ASSERT( m_controllerStack->isEmpty() == false );
+
if ( QObject::sender() == m_current )
{
restorePrevious();
}
}
-void StackViewController::popViewController( bool animated )
+void
+StackViewController::popViewController( bool animated )
{
animated = false;
@@ -108,9 +108,9 @@ void StackViewController::popViewController( bool animated )
delete m_current;
}
-void StackViewController::previous()
+void
+StackViewController::previous()
{
popViewController();
- emit previousButtonPushed();
}
diff --git a/src/Gui/library/StackViewController.h b/src/Gui/library/StackViewController.h
index e30cf53..c48743a 100644
--- a/src/Gui/library/StackViewController.h
+++ b/src/Gui/library/StackViewController.h
@@ -58,10 +58,6 @@ private:
public slots:
void previous();
void viewDestroyed();
-
-signals:
- void previousButtonPushed();
-
};
#endif // STACKVIEWCONTROLLER_H
More information about the Vlmc-devel
mailing list