Skip to content

Commit 26d3845

Browse files
committed
Replace toLower() with compare( ..., Qt::CaseInsensitive )
1 parent 23d83dd commit 26d3845

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/app/qgisapp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5451,14 +5451,14 @@ bool QgisApp::fileSave()
54515451
// make sure we have the .qgs extension in the file name
54525452
if ( filter == zipExt )
54535453
{
5454-
if ( "qgz" != fullPath.suffix().toLower() )
5454+
if ( fullPath.suffix().compare( QLatin1String( "qgz" ), Qt::CaseInsensitive ) != 0 )
54555455
fullPath.setFile( fullPath.filePath() + ".qgz" );
54565456

54575457
QgsProject::instance()->setZipFileName( fullPath.filePath() );
54585458
}
54595459
else
54605460
{
5461-
if ( "qgs" != fullPath.suffix().toLower() )
5461+
if ( fullPath.suffix().compare( QLatin1String( "qgs" ), Qt::CaseInsensitive ) != 0 )
54625462
fullPath.setFile( fullPath.filePath() + ".qgs" );
54635463

54645464
QgsProject::instance()->setFileName( fullPath.filePath() );
@@ -5557,14 +5557,14 @@ void QgisApp::fileSaveAs()
55575557
bool writeOk = false;
55585558
if ( filter == zipExt )
55595559
{
5560-
if ( "qgz" != fullPath.suffix().toLower() )
5560+
if ( fullPath.suffix().compare( QLatin1String( "qgz" ), Qt::CaseInsensitive ) != 0 )
55615561
fullPath.setFile( fullPath.filePath() + ".qgz" );
55625562

55635563
writeOk = QgsProject::instance()->zip( fullPath.filePath() );
55645564
}
55655565
else // .qgs
55665566
{
5567-
if ( "qgs" != fullPath.suffix().toLower() )
5567+
if ( fullPath.suffix().compare( QLatin1String( "qgs" ), Qt::CaseInsensitive ) != 0 )
55685568
fullPath.setFile( fullPath.filePath() + ".qgs" );
55695569

55705570
QgsProject::instance()->setFileName( fullPath.filePath() );

src/core/qgsarchive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ QString QgsArchive::projectFile() const
135135
Q_FOREACH ( const QString &file, mFiles )
136136
{
137137
QFileInfo fileInfo( file );
138-
if ( "qgs" == fileInfo.suffix().toLower() )
138+
if ( fileInfo.suffix().compare( QLatin1String( "qgs" ), Qt::CaseInsensitive ) == 0 )
139139
return file;
140140
}
141141

0 commit comments

Comments
 (0)