Skip to content

Commit 8312dfe

Browse files
committed
Use faster static QFileInfo::exists instead of constructing QFileInfo
Thanks to Clazy
1 parent 2b14c46 commit 8312dfe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/dwg/qgsdwgimportdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void QgsDwgImportDialog::on_leLayerGroup_textChanged( const QString &text )
151151

152152
void QgsDwgImportDialog::on_pbLoadDatabase_clicked()
153153
{
154-
if ( !QFileInfo( leDatabase->text() ).exists() )
154+
if ( !QFileInfo::exists( leDatabase->text() ) )
155155
return;
156156

157157
CursorOverride waitCursor;

src/app/dwg/qgsdwgimporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
195195
return false;
196196
}
197197

198-
if ( QFileInfo( mDatabase ).exists() )
198+
if ( QFileInfo::exists( mDatabase ) )
199199
{
200200
mDs = OGROpen( mDatabase.toUtf8().constData(), true, nullptr );
201201
if ( !mDs )

0 commit comments

Comments
 (0)