diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:36:55 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:36:55 +0200 |
commit | 98d3e40fb7c88b670a93e73dace2d0f05a5f903c (patch) | |
tree | b1292124a86c219fb434db4ec28e8f805ff52287 /src/corelib/io | |
parent | a74e4b85be83e2da47f4a1d8fcf0e78079335b80 (diff) | |
parent | bab494e4d046f5617d19f5fec35eeff94377c51f (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
mkspecs/qnx-armv7le-qcc/qplatformdefs.h
src/printsupport/kernel/qcups.cpp
src/widgets/styles/qstyle.h
tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfilesystemengine_unix.cpp | 7 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemengine_win.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_fsevents.mm | 2 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 3 | ||||
-rw-r--r-- | src/corelib/io/qloggingregistry.cpp | 13 |
5 files changed, 17 insertions, 12 deletions
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 6c0f31fb55..eabedaa80a 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -113,9 +113,10 @@ static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &e &application); if (application) { - CFStringRef path = CFURLGetString(application); - QString applicationPath = QCFString::toQString(path); - if (applicationPath != QLatin1String("file://localhost/System/Library/CoreServices/Finder.app/")) + QCFType<CFBundleRef> bundle = CFBundleCreate(kCFAllocatorDefault, application); + CFStringRef identifier = CFBundleGetIdentifier(bundle); + QString applicationId = QCFString::toQString(identifier); + if (applicationId != QLatin1String("com.apple.finder")) return true; } } diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index 7741eb4c1e..8e3bacd6b7 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -606,7 +606,7 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry) // FILE_INFO_BY_HANDLE_CLASS has been extended by FileIdInfo = 18 as of VS2012. typedef enum { Q_FileIdInfo = 18 } Q_FILE_INFO_BY_HANDLE_CLASS; -# if defined(Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700) +# if defined(Q_CC_MINGW) || (defined(Q_CC_MSVC) && (_MSC_VER < 1700 || WINVER <= 0x0601)) // MinGW-64 defines FILE_ID_128 as of gcc-4.8.1 along with FILE_SUPPORTS_INTEGRITY_STREAMS # if !(defined(Q_CC_MINGW) && defined(FILE_SUPPORTS_INTEGRITY_STREAMS)) @@ -619,7 +619,7 @@ typedef struct _FILE_ID_INFO { ULONGLONG VolumeSerialNumber; FILE_ID_128 FileId; } FILE_ID_INFO, *PFILE_ID_INFO; -# endif // if defined (Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700)) +# endif // if defined (Q_CC_MINGW) || (defined(Q_CC_MSVC) && (_MSC_VER < 1700 || WINVER <= 0x0601)) // File ID for Windows up to version 7. static inline QByteArray fileId(HANDLE handle) diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm index bfcae2a3a2..981d663694 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents.mm +++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm @@ -478,7 +478,7 @@ bool QFseventsFileSystemWatcherEngine::startStream() NSMutableArray *pathsToWatch = [NSMutableArray arrayWithCapacity:watchedPaths.size()]; for (PathRefCounts::const_iterator i = watchedPaths.begin(), ei = watchedPaths.end(); i != ei; ++i) - [pathsToWatch addObject:reinterpret_cast<const NSString *>(QCFString::toCFStringRef(i.key()))]; + [pathsToWatch addObject:i.key().toNSString()]; struct FSEventStreamContext callBackInfo = { 0, diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index c974daab06..fb4107b95d 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1034,7 +1034,8 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, LPVOID mapAddress = ::MapViewOfFile(mapHandle, access, offsetHi, offsetLo, size + extra); #else - LPVOID mapAddress = ::MapViewOfFileFromApp(mapHandle, access, offset, size); + LPVOID mapAddress = ::MapViewOfFileFromApp(mapHandle, access, + (ULONG64(offsetHi) << 32) + offsetLo, size); #endif if (mapAddress) { uchar *address = extra + static_cast<uchar*>(mapAddress); diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index 7e6883fd14..575150f148 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -218,11 +218,14 @@ void QLoggingSettingsParser::setContent(QTextStream &stream) if ((equalPos != -1) && (line.lastIndexOf(QLatin1Char('=')) == equalPos)) { const QStringRef pattern = line.leftRef(equalPos); - const QStringRef value = line.midRef(equalPos + 1); - bool enabled = (value.compare(QLatin1String("true"), - Qt::CaseInsensitive) == 0); - QLoggingRule rule(pattern, enabled); - if (rule.flags != 0) + const QStringRef valueStr = line.midRef(equalPos + 1); + int value = -1; + if (valueStr == QLatin1String("true")) + value = 1; + else if (valueStr == QLatin1String("false")) + value = 0; + QLoggingRule rule(pattern, (value == 1)); + if (rule.flags != 0 && (value != -1)) _rules.append(rule); else warnMsg("Ignoring malformed logging rule: '%s'", line.toUtf8().constData()); |