diff --git a/src/gui/ogr/qgsvectorlayersaveasdialog.cpp b/src/gui/ogr/qgsvectorlayersaveasdialog.cpp index 601768ff8a91..eb9393b89228 100644 --- a/src/gui/ogr/qgsvectorlayersaveasdialog.cpp +++ b/src/gui/ogr/qgsvectorlayersaveasdialog.cpp @@ -189,7 +189,7 @@ void QgsVectorLayerSaveAsDialog::setup() if ( !filePath.isEmpty() && leLayername->isEnabled() ) { QFileInfo fileInfo( filePath ); - leLayername->setText( fileInfo.baseName() ); + leLayername->setText( fileInfo.completeBaseName() ); } mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( !filePath.isEmpty() ); } ); diff --git a/src/gui/qgsfilewidget.cpp b/src/gui/qgsfilewidget.cpp index 4e1baa986d30..437133a68030 100644 --- a/src/gui/qgsfilewidget.cpp +++ b/src/gui/qgsfilewidget.cpp @@ -500,7 +500,7 @@ QString QgsFileDropEdit::acceptableFilePath( QDropEvent *event ) const } QgsMimeDataUtils::UriList lst = QgsMimeDataUtils::decodeUriList( event->mimeData() ); - for ( const QgsMimeDataUtils::Uri &u : lst ) + for ( const QgsMimeDataUtils::Uri &u : qgis::as_const( lst ) ) { if ( !rawPaths.contains( u.uri ) ) rawPaths.append( u.uri );