File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -734,7 +734,7 @@ int main( int argc, char *argv[] )
734
734
for ( int i = 0 ; i < args.size (); i++ )
735
735
{
736
736
QString arg = QDir::toNativeSeparators ( QFileInfo ( args[i] ).absoluteFilePath () );
737
- if ( arg.contains ( QLatin1String ( " .qgs" ) ) )
737
+ if ( arg.endsWith ( QLatin1String ( " .qgs" , Qt::CaseInsensitive ) ) )
738
738
{
739
739
sProjectFileName = arg;
740
740
break ;
@@ -1113,7 +1113,7 @@ int main( int argc, char *argv[] )
1113
1113
QgsDebugMsg ( QString ( " Trying to load file : %1" ).arg ( ( *myIterator ) ) );
1114
1114
QString myLayerName = *myIterator;
1115
1115
// don't load anything with a .qgs extension - these are project files
1116
- if ( !myLayerName.contains ( QLatin1String ( " .qgs" ) ) )
1116
+ if ( !myLayerName.endsWith ( QLatin1String ( " .qgs" , Qt::CaseInsensitive ) ) )
1117
1117
{
1118
1118
qgis->openLayer ( myLayerName );
1119
1119
}
Original file line number Diff line number Diff line change @@ -4962,7 +4962,7 @@ void QgisApp::fileOpenAfterLaunch()
4962
4962
return ;
4963
4963
}
4964
4964
4965
- if ( !projPath.endsWith ( QLatin1String ( " qgs" ), Qt::CaseInsensitive ) )
4965
+ if ( !projPath.endsWith ( QLatin1String ( " . qgs" ), Qt::CaseInsensitive ) )
4966
4966
{
4967
4967
messageBar ()->pushMessage ( autoOpenMsgTitle,
4968
4968
tr ( " Not valid project file: %1" ).arg ( projPath ),
Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ int main( int argc, char *argv[] )
475
475
for ( int i = 0 ; i < argc; i++ )
476
476
{
477
477
QString arg = QDir::toNativeSeparators ( QFileInfo ( QFile::decodeName ( argv[i] ) ).absoluteFilePath () );
478
- if ( arg.contains ( QLatin1String ( " .qgs" ) ) )
478
+ if ( arg.endsWith ( QLatin1String ( " .qgs" ), Qt::CaseInsensitive ) )
479
479
{
480
480
myProjectFileName = arg;
481
481
break ;
@@ -526,7 +526,7 @@ int main( int argc, char *argv[] )
526
526
QgsDebugMsg ( QString ( " Trying to load file : %1" ).arg ( ( *myIterator ) ) );
527
527
QString myLayerName = *myIterator;
528
528
// don't load anything with a .qgs extension - these are project files
529
- if ( !myLayerName.contains ( QLatin1String ( " .qgs" ) ) )
529
+ if ( !myLayerName.endsWith ( QLatin1String ( " .qgs" , Qt::CaseInsensitive ) ) )
530
530
{
531
531
fprintf ( stderr, " Data files not yet supported\n " );
532
532
return 1 ;
You can’t perform that action at this time.
0 commit comments