Skip to content

Commit

Permalink
also accept uppercase extensions (fixes #19766)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9d36c4c)
  • Loading branch information
jef-n authored and nyalldawson committed Sep 6, 2018
1 parent 8a5bcf9 commit 1c3d1e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6168,20 +6168,20 @@ void QgisApp::openFile( const QString &fileName, const QString &fileTypeHint )
{
// check to see if we are opening a project file
QFileInfo fi( fileName );
if ( fileTypeHint == QStringLiteral( "project" ) || fi.suffix() == QLatin1String( "qgs" ) || fi.suffix() == QLatin1String( "qgz" ) )
if ( fileTypeHint == QStringLiteral( "project" ) || fi.suffix().toLower() == QLatin1String( "qgs" ) || fi.suffix().toLower() == QLatin1String( "qgz" ) )
{
QgsDebugMsg( "Opening project " + fileName );
openProject( fileName );
}
else if ( fi.suffix() == QLatin1String( "qlr" ) )
else if ( fi.suffix().toLower() == QLatin1String( "qlr" ) )
{
openLayerDefinition( fileName );
}
else if ( fi.suffix() == QLatin1String( "qpt" ) )
else if ( fi.suffix().toLower() == QLatin1String( "qpt" ) )
{
openTemplate( fileName );
}
else if ( fi.suffix() == QLatin1String( "py" ) )
else if ( fi.suffix().toLower() == QLatin1String( "py" ) )
{
runScript( fileName );
}
Expand Down

0 comments on commit 1c3d1e7

Please sign in to comment.