Skip to content
Permalink
Browse files

Hide file extensions for qpt, python and qgs files in the browser

These have distinct icons identifying them, and the full file name
with extension shown in the tooltip
  • Loading branch information
nyalldawson committed Dec 16, 2017
1 parent a33946b commit 40dbc06b7622a068601ea59bb472cedf72d4c83a
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/app/qgsappbrowserproviders.cpp
  2. +1 −1 src/core/qgsdataitem.cpp
@@ -100,7 +100,7 @@ QgsDataItem *QgsQptDataItemProvider::createDataItem( const QString &path, QgsDat

if ( fileInfo.suffix().compare( QStringLiteral( "qpt" ), Qt::CaseInsensitive ) == 0 )
{
return new QgsQptDataItem( parentItem, fileInfo.fileName(), path );
return new QgsQptDataItem( parentItem, fileInfo.baseName(), path );
}
return nullptr;
}
@@ -242,7 +242,7 @@ QgsDataItem *QgsPyDataItemProvider::createDataItem( const QString &path, QgsData

if ( fileInfo.suffix().compare( QStringLiteral( "py" ), Qt::CaseInsensitive ) == 0 )
{
return new QgsPyDataItem( parentItem, fileInfo.fileName(), path );
return new QgsPyDataItem( parentItem, fileInfo.baseName(), path );
}
return nullptr;
}
@@ -797,7 +797,7 @@ QVector<QgsDataItem *> QgsDirectoryItem::createChildren()

if ( fileInfo.suffix() == QLatin1String( "qgs" ) )
{
QgsDataItem *item = new QgsProjectItem( this, name, path );
QgsDataItem *item = new QgsProjectItem( this, fileInfo.baseName(), path );
children.append( item );
continue;
}

0 comments on commit 40dbc06

Please sign in to comment.
You can’t perform that action at this time.