]> git.sesse.net Git - vlc/commitdiff
Qt: cosmetics and comments.
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 18 Jun 2009 22:25:00 +0000 (00:25 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 19 Jun 2009 14:53:26 +0000 (16:53 +0200)
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/qt4.cpp
modules/gui/qt4/recents.cpp

index 8f789e50ffa42dcd6e5d6486733f646eb0125f6b..4fac872ac1d593e27e119683b36a52de2217c6c7 100644 (file)
@@ -165,7 +165,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 );
@@ -244,7 +244,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();
 }
 
index 1767f3bfc4b8a55ebef10b0ca4e6638ba447db2c..3c67343adb1dac6eb51a26ee5fc284740c8591bb 100644 (file)
@@ -449,7 +449,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 );
     }
 
@@ -491,7 +491,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
index bb6768e69bca90992b31ad943e7ea8fc70490311..83317afd9532bbc4f86e293bce4454fe6deed013 100644 (file)
@@ -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()