File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -510,21 +510,21 @@ void QgisApp::dropEvent( QDropEvent *event )
510
510
QList<QUrl>urls = event->mimeData ()->urls ();
511
511
for ( i = urls.begin (); i != urls.end (); i++ )
512
512
{
513
- QUrl mUrl = *i ;
513
+ QString fileName = i-> toLocalFile () ;
514
514
// seems that some drag and drop operations include an empty url
515
515
// so we test for length to make sure we have something
516
- if ( mUrl . path (). length () > 0 )
516
+ if ( !fileName. isEmpty () )
517
517
{
518
518
// check to see if we are opening a project file
519
- QFileInfo fi ( mUrl . path () );
519
+ QFileInfo fi ( fileName );
520
520
if ( fi.completeSuffix () == " qgs" )
521
521
{
522
- QgsDebugMsg ( " Opening project " + mUrl . path () );
522
+ QgsDebugMsg ( " Opening project " + fileName );
523
523
}
524
524
else
525
525
{
526
- QgsDebugMsg ( " Adding " + mUrl . path () + " to the map canvas" );
527
- openLayer ( mUrl . path () );
526
+ QgsDebugMsg ( " Adding " + fileName + " to the map canvas" );
527
+ openLayer ( fileName );
528
528
}
529
529
}
530
530
}
You can’t perform that action at this time.
0 commit comments