Skip to content

Commit

Permalink
Use faster static QFileInfo::exists instead of constructing QFileInfo
Browse files Browse the repository at this point in the history
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.
2 changes: 1 addition & 1 deletion src/app/dwg/qgsdwgimportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/app/dwg/qgsdwgimporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 8312dfe

Please sign in to comment.