Merge remote-tracking branch 'origin/3.3'

This commit is contained in:
Eike Ziller
2015-01-14 16:06:46 +01:00
11 changed files with 166 additions and 43 deletions

View File

@@ -57,6 +57,15 @@ QDebug operator<<(QDebug dbg, const Utils::FileName &c)
QT_END_NAMESPACE
#ifdef Q_OS_OSX
// for file drops from Finder, working around QTBUG-40449
namespace Utils {
namespace Internal {
extern QUrl filePathUrl(const QUrl &url);
} // Internal
} // Utils
#endif
namespace Utils {
/*! \class Utils::FileUtils
@@ -774,7 +783,12 @@ static bool isFileDrop(const QMimeData *d, QList<FileDropSupport::FileSpec> *fil
bool hasFiles = false;
const QList<QUrl>::const_iterator cend = urls.constEnd();
for (QList<QUrl>::const_iterator it = urls.constBegin(); it != cend; ++it) {
const QString fileName = it->toLocalFile();
QUrl url = *it;
#ifdef Q_OS_OSX
// for file drops from Finder, working around QTBUG-40449
url = Internal::filePathUrl(url);
#endif
const QString fileName = url.toLocalFile();
if (!fileName.isEmpty()) {
hasFiles = true;
if (files)