Skip to content
Permalink
Browse files

also accept uppercase extensions (fixes #19766)

(cherry picked from commit 9d36c4c)
  • Loading branch information
jef-n authored and nyalldawson committed Sep 6, 2018
1 parent 8a5bcf9 commit 1c3d1e71123a236b085d9e912eb8f0c3edb67395
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/app/qgisapp.cpp
@@ -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 );
}

0 comments on commit 1c3d1e7

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