Version: 2.3-GIT (using 4.4.3 (KDE 4.4.3), Gentoo) Compiler: x86_64-pc-linux-gnu-gcc OS: Linux (x86_64) release 2.6.32 1. open file browser (Files, "Browse local hard drive for content") 2. click "Places" 3. you can see that the column name is "1"
Created attachment 43804 [details] screenshot
commit 66a94ccb12606f12a1822f63dbd18bf34600c6bc Author: Nikolaj Hald Nielsen <nhn@kde.org> Date: Sat May 29 22:43:53 2010 +0200 Fix strange column name shown in file browser when showing "places" by hiding th header. This also fixes another case where using the menu to enable/disable columns while in the "places" view makes the view go blank. BUG: 238518 diff --git a/src/browsers/filebrowser/FileBrowser.cpp b/src/browsers/filebrowser/FileBrowser.cpp index a6cc83e..ab7d786 100644 --- a/src/browsers/filebrowser/FileBrowser.cpp +++ b/src/browsers/filebrowser/FileBrowser.cpp @@ -81,7 +81,8 @@ FileBrowser::FileBrowser( const char * name, QWidget *parent ) m_fileView = new FileView( this ); m_fileView->setModel( m_mimeFilterProxyModel ); m_fileView->setSortingEnabled( true ); - + m_fileView->header()->setVisible( true ); + m_fileView->hideColumn( 3 ); m_fileView->hideColumn( 4 ); m_fileView->hideColumn( 5 ); @@ -162,6 +163,7 @@ FileBrowser::itemActivated( const QModelIndex &index ) if( !placesUrl.isEmpty() ) { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); //needed to make the home folder url look nice. We cannot jsut strip all protocol headers //as that will break remote, trash, ... @@ -183,6 +185,7 @@ FileBrowser::itemActivated( const QModelIndex &index ) else { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); } } @@ -389,6 +392,7 @@ FileBrowser::setDir( const QString &dir ) if( m_showingPlaces ) { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); m_showingPlaces = false; } @@ -440,8 +444,8 @@ FileBrowser::showPlaces() QStringList siblings; addAdditionalItem( new BrowserBreadcrumbItem( i18n( "Places" ), siblings, QDir::homePath(), this ) ); - m_fileView->setModel( m_placesModel ); + m_fileView->header()->setVisible( false ); m_showingPlaces = true; } @@ -456,6 +460,7 @@ FileBrowser::setupDone( const QModelIndex & index, bool success ) if( !placesUrl.isEmpty() ) { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); //needed to make folder urls look nice. We cannot just strip all protocol headers //as that will break remote, trash, ... diff --git a/src/browsers/filebrowser/FileBrowser.h b/src/browsers/filebrowser/FileBrowser.h index 86b57c3..9553219 100644 --- a/src/browsers/filebrowser/FileBrowser.h +++ b/src/browsers/filebrowser/FileBrowser.h @@ -78,7 +78,7 @@ protected slots: void home(); /** - * Navigates to home directory + * Navigates to "places" */ void showPlaces();
commit a37423d2a44e4929dea767ecb7c043a4becdf756 Author: Nikolaj Hald Nielsen <nhn@kde.org> Date: Sat May 29 22:43:53 2010 +0200 Fix strange column name shown in file browser when showing "places" by hiding th header. This also fixes another case where using the menu to enable/disable columns while in the "places" view makes the view go blank. BUG: 238518 diff --git a/src/browsers/filebrowser/FileBrowser.cpp b/src/browsers/filebrowser/FileBrowser.cpp index a6cc83e..ab7d786 100644 --- a/src/browsers/filebrowser/FileBrowser.cpp +++ b/src/browsers/filebrowser/FileBrowser.cpp @@ -81,7 +81,8 @@ FileBrowser::FileBrowser( const char * name, QWidget *parent ) m_fileView = new FileView( this ); m_fileView->setModel( m_mimeFilterProxyModel ); m_fileView->setSortingEnabled( true ); - + m_fileView->header()->setVisible( true ); + m_fileView->hideColumn( 3 ); m_fileView->hideColumn( 4 ); m_fileView->hideColumn( 5 ); @@ -162,6 +163,7 @@ FileBrowser::itemActivated( const QModelIndex &index ) if( !placesUrl.isEmpty() ) { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); //needed to make the home folder url look nice. We cannot jsut strip all protocol headers //as that will break remote, trash, ... @@ -183,6 +185,7 @@ FileBrowser::itemActivated( const QModelIndex &index ) else { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); } } @@ -389,6 +392,7 @@ FileBrowser::setDir( const QString &dir ) if( m_showingPlaces ) { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); m_showingPlaces = false; } @@ -440,8 +444,8 @@ FileBrowser::showPlaces() QStringList siblings; addAdditionalItem( new BrowserBreadcrumbItem( i18n( "Places" ), siblings, QDir::homePath(), this ) ); - m_fileView->setModel( m_placesModel ); + m_fileView->header()->setVisible( false ); m_showingPlaces = true; } @@ -456,6 +460,7 @@ FileBrowser::setupDone( const QModelIndex & index, bool success ) if( !placesUrl.isEmpty() ) { m_fileView->setModel( m_mimeFilterProxyModel ); + m_fileView->header()->setVisible( true ); //needed to make folder urls look nice. We cannot just strip all protocol headers //as that will break remote, trash, ... diff --git a/src/browsers/filebrowser/FileBrowser.h b/src/browsers/filebrowser/FileBrowser.h index 86b57c3..9553219 100644 --- a/src/browsers/filebrowser/FileBrowser.h +++ b/src/browsers/filebrowser/FileBrowser.h @@ -78,7 +78,7 @@ protected slots: void home(); /** - * Navigates to home directory + * Navigates to "places" */ void showPlaces();