[vlc-devel] commit: [Qt] RecentMRLs: Simplification and adding some debug. ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Mon Oct 20 02:19:48 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Oct 20 02:19:19 2008 +0200| [28b5e4835e276fadfa6f69d24ddddca6bf367637] | committer: Jean-Baptiste Kempf
[Qt] RecentMRLs: Simplification and adding some debug.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=28b5e4835e276fadfa6f69d24ddddca6bf367637
---
modules/gui/qt4/recents.cpp | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp
index 1a265f8..9109989 100644
--- a/modules/gui/qt4/recents.cpp
+++ b/modules/gui/qt4/recents.cpp
@@ -50,7 +50,6 @@ RecentsMRL::RecentsMRL( intf_thread_t *_p_intf ) : p_intf( _p_intf )
RecentsMRL::~RecentsMRL()
{
delete stack;
- delete signalMapper;
}
void RecentsMRL::addRecent( const QString &mrl )
@@ -58,6 +57,7 @@ void RecentsMRL::addRecent( const QString &mrl )
if ( !isActive || filter->indexIn( mrl ) >= 0 )
return;
+ msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
if( stack->contains( mrl ) )
{
stack->removeOne( mrl );
@@ -89,11 +89,7 @@ QList<QString> RecentsMRL::recents()
void RecentsMRL::load()
{
- QStringList list;
-
- getSettings()->beginGroup( "RecentsMRL" );
- list = getSettings()->value( "list" ).toStringList();
- getSettings()->endGroup();
+ QStringList list = getSettings()->value( "RecentsMRL/list" ).toStringList();
for( int i = 0; i < list.size(); ++i )
{
@@ -109,7 +105,6 @@ void RecentsMRL::save()
for( int i = 0; i < stack->size(); ++i )
list << stack->at(i);
- getSettings()->beginGroup( "RecentsMRL" );
- getSettings()->setValue( "list", list );
- getSettings()->endGroup();
+ getSettings()->setValue( "RecentsMRL/list", list );
}
+
More information about the vlc-devel
mailing list