@@ -1654,51 +1654,6 @@ void QgisApp::dropEvent( QDropEvent *event )
1654
1654
for ( i = urls.begin(); i != urls.end(); ++i )
1655
1655
{
1656
1656
QString fileName = i->toLocalFile();
1657
- #ifdef Q_OS_MAC
1658
- // Mac OS X 10.10, under Qt4.8 ,changes dropped URL format
1659
- // https://bugreports.qt.io/browse/QTBUG-40449
1660
- // [pzion 20150805] Work around
1661
- if ( fileName.startsWith( "/.file/id=" ) )
1662
- {
1663
- QgsDebugMsg( QStringLiteral( "Mac dropped URL with /.file/id= (converting)" ) );
1664
- CFStringRef relCFStringRef =
1665
- CFStringCreateWithCString(
1666
- kCFAllocatorDefault,
1667
- fileName.toUtf8().constData(),
1668
- kCFStringEncodingUTF8
1669
- );
1670
- CFURLRef relCFURL =
1671
- CFURLCreateWithFileSystemPath(
1672
- kCFAllocatorDefault,
1673
- relCFStringRef,
1674
- kCFURLPOSIXPathStyle,
1675
- false // isDirectory
1676
- );
1677
- CFErrorRef error = 0;
1678
- CFURLRef absCFURL =
1679
- CFURLCreateFilePathURL(
1680
- kCFAllocatorDefault,
1681
- relCFURL,
1682
- &error
1683
- );
1684
- if ( !error )
1685
- {
1686
- static const CFIndex maxAbsPathCStrBufLen = 4096;
1687
- char absPathCStr[maxAbsPathCStrBufLen];
1688
- if ( CFURLGetFileSystemRepresentation(
1689
- absCFURL,
1690
- true, // resolveAgainstBase
1691
- reinterpret_cast<UInt8 *>( &absPathCStr[0] ),
1692
- maxAbsPathCStrBufLen ) )
1693
- {
1694
- fileName = QString( absPathCStr );
1695
- }
1696
- }
1697
- CFRelease( absCFURL );
1698
- CFRelease( relCFURL );
1699
- CFRelease( relCFStringRef );
1700
- }
1701
- #endif
1702
1657
// seems that some drag and drop operations include an empty url
1703
1658
// so we test for length to make sure we have something
1704
1659
if ( !fileName.isEmpty() )
0 commit comments