Skip to content
Permalink
Browse files
Use faster static QFileInfo::exists instead of constructing QFileInfo
Thanks to Clazy
  • Loading branch information
nyalldawson committed Aug 29, 2017
1 parent 2b14c46 commit 8312dfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -151,7 +151,7 @@ void QgsDwgImportDialog::on_leLayerGroup_textChanged( const QString &text )

void QgsDwgImportDialog::on_pbLoadDatabase_clicked()
{
if ( !QFileInfo( leDatabase->text() ).exists() )
if ( !QFileInfo::exists( leDatabase->text() ) )
return;

CursorOverride waitCursor;
@@ -195,7 +195,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
return false;
}

if ( QFileInfo( mDatabase ).exists() )
if ( QFileInfo::exists( mDatabase ) )
{
mDs = OGROpen( mDatabase.toUtf8().constData(), true, nullptr );
if ( !mDs )

0 comments on commit 8312dfe

Please sign in to comment.