[vlc-devel] commit: Qt: cosmetics and comments. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Fri Jun 19 17:12:05 CEST 2009
vlc | branch: 1.0-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jun 19 00:25:00 2009 +0200| [35f7e73c0a1bd1643d21a134e42d005e124c2111] | committer: Jean-Baptiste Kempf
Qt: cosmetics and comments.
(cherry picked from commit 4c4aae84c4b516592ab42c8c08242c400a107e90)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35f7e73c0a1bd1643d21a134e42d005e124c2111
---
modules/gui/qt4/components/open_panels.cpp | 5 +++--
modules/gui/qt4/qt4.cpp | 4 ++--
modules/gui/qt4/recents.cpp | 7 +++++--
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 06056e5..c3d42f0 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -164,7 +164,7 @@ FileOpenPanel::~FileOpenPanel()
void FileOpenPanel::browseFile()
{
QStringList files = QFileDialog::getOpenFileNames( this );
- foreach( const QString &file, files)
+ foreach( const QString &file, files )
{
QListWidgetItem *item =
new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg );
@@ -241,7 +241,8 @@ void FileOpenPanel::updateMRL()
/* Function called by Open Dialog when clicke on Play/Enqueue */
void FileOpenPanel::accept()
{
- p_intf->p_sys->filepath = dialogBox->directory().absolutePath();
+ if( dialogBox )
+ p_intf->p_sys->filepath = dialogBox->directory().absolutePath();
ui.fileListWidg->clear();
}
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 3c8da13..9ece336 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -460,7 +460,7 @@ static void *Thread( void *obj )
{
char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
p_intf->p_sys->filepath =
- EMPTY_STR(psz_path) ? config_GetHomeDir() : qfu(psz_path);
+ EMPTY_STR( psz_path ) ? config_GetHomeDir() : qfu( psz_path );
free( psz_path );
}
@@ -502,7 +502,7 @@ static void *Thread( void *obj )
/* Save the path */
config_PutPsz( p_intf, "qt-filedialog-path",
- qtu(p_intf->p_sys->filepath) );
+ qtu( p_intf->p_sys->filepath ) );
/* Delete the application automatically */
#ifdef Q_WS_X11
diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp
index bb6768e..83317af 100644
--- a/modules/gui/qt4/recents.cpp
+++ b/modules/gui/qt4/recents.cpp
@@ -70,10 +70,14 @@ void RecentsMRL::addRecent( const QString &mrl )
{
if ( !isActive || ( filter && filter->indexIn( mrl ) >= 0 ) )
return;
+
+ msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
+
#ifdef WIN32
+ /* Add to the Windows 7 default list in taskbar */
SHAddToRecentDocs( 0x00000002 , qtu( mrl ) );
#endif
- msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
+
int i_index = stack->indexOf( mrl );
if( 0 <= i_index )
{
@@ -88,7 +92,6 @@ void RecentsMRL::addRecent( const QString &mrl )
}
QVLCMenu::updateRecents( p_intf );
save();
-
}
void RecentsMRL::clear()
More information about the vlc-devel
mailing list