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 8312dfe5d818c66666ff0a39f16c696cc3b2cc41
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/app/dwg/qgsdwgimportdialog.cpp
  2. +1 −1 src/app/dwg/qgsdwgimporter.cpp
@@ -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.
You can’t perform that action at this time.