[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok] src: Cleanup FileBrowser & related.
From:       Bart Cerneels <bart.cerneels () kde ! org>
Date:       2012-08-17 14:10:48
Message-ID: 20120817141048.906DCA60A6 () git ! kde ! org
[Download RAW message or body]

Git commit a8dfdd39105738e815767a84455c6c36e80e889c by Bart Cerneels.
Committed on 16/08/2012 at 17:26.
Pushed by shanachie into branch 'master'.

Cleanup FileBrowser & related.

M  +2    -1    src/browsers/filebrowser/DirPlaylistTrackFilterProxyModel.cpp
M  +7    -9    src/browsers/filebrowser/FileBrowser.cpp
M  +1    -1    src/core-impl/meta/file/File.cpp

http://commits.kde.org/amarok/a8dfdd39105738e815767a84455c6c36e80e889c

diff --git a/src/browsers/filebrowser/DirPlaylistTrackFilterProxyModel.cpp \
b/src/browsers/filebrowser/DirPlaylistTrackFilterProxyModel.cpp index \
                6d2926c..b3c4eec 100644
--- a/src/browsers/filebrowser/DirPlaylistTrackFilterProxyModel.cpp
+++ b/src/browsers/filebrowser/DirPlaylistTrackFilterProxyModel.cpp
@@ -28,7 +28,8 @@ DirPlaylistTrackFilterProxyModel::DirPlaylistTrackFilterProxyModel( \
QObject *par  }
 
 bool
-DirPlaylistTrackFilterProxyModel::filterAcceptsRow( int source_row, const \
QModelIndex& source_parent ) const \
+DirPlaylistTrackFilterProxyModel::filterAcceptsRow( int source_row, +                \
const QModelIndex& source_parent ) const  {
     QModelIndex index = sourceModel()->index( source_row, 0, source_parent );
 
diff --git a/src/browsers/filebrowser/FileBrowser.cpp \
b/src/browsers/filebrowser/FileBrowser.cpp index 7065e7e..2f9553c 100644
--- a/src/browsers/filebrowser/FileBrowser.cpp
+++ b/src/browsers/filebrowser/FileBrowser.cpp
@@ -193,15 +193,13 @@ FileBrowser::initView()
 {
     d->kdirModel = new DirBrowserModel( this );
 
-    EngineController *engineController = Amarok::Components::engineController();
-    Q_ASSERT( engineController );
     d->mimeFilterProxyModel = new DirPlaylistTrackFilterProxyModel( this );
     d->mimeFilterProxyModel->setSourceModel( d->kdirModel );
     d->mimeFilterProxyModel->setSortCaseSensitivity( Qt::CaseInsensitive );
     d->mimeFilterProxyModel->setFilterCaseSensitivity( Qt::CaseInsensitive );
     d->mimeFilterProxyModel->setDynamicSortFilter( true );
-    connect( d->searchWidget, SIGNAL( filterChanged( const QString & ) ),
-             d->mimeFilterProxyModel, SLOT( setFilterFixedString( const QString & ) \
) ); +    connect( d->searchWidget, SIGNAL(filterChanged( const QString & )),
+             d->mimeFilterProxyModel, SLOT(setFilterFixedString( const QString & )) \
);  
     d->fileView->setModel( d->mimeFilterProxyModel );
     d->fileView->header()->setContextMenuPolicy( Qt::ActionsContextMenu );
@@ -225,7 +223,7 @@ FileBrowser::initView()
         action->setCheckable( true );
         if( !d->fileView->isColumnHidden( i ) )
             action->setChecked( true );
-        connect( action, SIGNAL( toggled(bool) ), this, SLOT(toggleColumn(bool) ) );
+        connect( action, SIGNAL(toggled(bool)), this, SLOT(toggleColumn(bool) ) );
     }
 
     connect( d->fileView->header(), SIGNAL(geometriesChanged()), this, \
SLOT(slotSaveHeaderState()) ); @@ -238,7 +236,7 @@ FileBrowser::initView()
                );
     }
 
-    connect( d->placesAction, SIGNAL( triggered( bool) ), this, SLOT( showPlaces() ) \
); +    connect( d->placesAction, SIGNAL(triggered( bool)), this, SLOT(showPlaces()) \
);  }
 
 FileBrowser::~FileBrowser()
@@ -281,7 +279,7 @@ FileBrowser::itemActivated( const QModelIndex &index )
 {
     if( d->showingPlaces )
     {
-        QString placesUrl = index.data( KFilePlacesModel::UrlRole  \
).value<QString>(); +        QString placesUrl = index.data( \
KFilePlacesModel::UrlRole ).value<QString>();  
         if( !placesUrl.isEmpty() )
         {
@@ -292,8 +290,8 @@ FileBrowser::itemActivated( const QModelIndex &index )
             d->restoreHeaderState();
             d->showingPlaces = false;
 
-            //needed to make the home folder url look nice. We cannot jsut strip all \
                protocol headers
-            //as that will break remote, trash, ...
+            //needed to make the home folder url look nice. We cannot just strip all
+            //protocol headers as that will break remote, trash, ...
             if( placesUrl.startsWith( "file://" ) )
                 placesUrl = placesUrl.replace( "file://", QString() );
 
diff --git a/src/core-impl/meta/file/File.cpp b/src/core-impl/meta/file/File.cpp
index 2a0f3ce..46f672b 100644
--- a/src/core-impl/meta/file/File.cpp
+++ b/src/core-impl/meta/file/File.cpp
@@ -602,7 +602,7 @@ Track::isTrack( const KUrl &url )
     if( !url.isLocalFile() )
         return true;
 
-    QFileInfo  fileInfo( url.toLocalFile() );
+    QFileInfo fileInfo( url.toLocalFile() );
     if( fileInfo.size() <= 0 )
         return false;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic