diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-12-02 12:43:45 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-12-02 12:43:45 (GMT) |
commit | 55be2d1d684d4505db3bbf76da0cf8326cee9468 (patch) | |
tree | 27dc797a2b4c8885d5522ad8495c95d5da18876b /src | |
parent | d8548a8e4696512c5e7796b866ed98a7bd52f673 (diff) | |
parent | 271936b063fb261293e3f77f7a2273e3a4dbb5d6 (diff) | |
download | Qt-55be2d1d684d4505db3bbf76da0cf8326cee9468.zip Qt-55be2d1d684d4505db3bbf76da0cf8326cee9468.tar.gz Qt-55be2d1d684d4505db3bbf76da0cf8326cee9468.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_dnotify.cpp | 14 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 7 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 2 |
3 files changed, 9 insertions, 14 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_dnotify.cpp b/src/corelib/io/qfilesystemwatcher_dnotify.cpp index 03172e5..c70232c 100644 --- a/src/corelib/io/qfilesystemwatcher_dnotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_dnotify.cpp @@ -269,8 +269,11 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, } } - fd = ::dirfd(d); - int parentFd = parent?::dirfd(parent):0; + fd = qt_safe_dup(::dirfd(d)); + int parentFd = parent ? qt_safe_dup(::dirfd(parent)) : 0; + + ::closedir(d); + if(parent) ::closedir(parent); Q_ASSERT(fd); if(::fcntl(fd, F_SETSIG, SIGIO) || @@ -279,10 +282,6 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, (parent && ::fcntl(parentFd, F_SETSIG, SIGIO)) || (parent && ::fcntl(parentFd, F_NOTIFY, DN_DELETE | DN_RENAME | DN_MULTISHOT))) { - - ::closedir(d); - if(parent) ::closedir(parent); - continue; // Could not set appropriate flags } @@ -295,9 +294,6 @@ QStringList QDnotifyFileSystemWatcherEngine::addPaths(const QStringList &paths, pathToFD.insert(path, fd); if(parentFd) parentToFD.insert(parentFd, fd); - - ::closedir(d); - if(parent) ::closedir(parent); } Directory &directory = fdToDirectory[fd]; diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index b8f6e2c..37b0ea1 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -138,12 +138,13 @@ QString QFSFileEnginePrivate::canonicalized(const QString &path) if (path.isEmpty()) return path; -#if defined(Q_OS_UNIX) || defined(Q_OS_SYMBIAN) // FIXME let's see if this stuff works, then we might be able to remove some of the other code. - // baaad Mac: 10.5 and 10.6 crash if trying to free a value returned by - // realpath() if the input path is just the root component. +#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN) if (path.size() == 1 && path.at(0) == QLatin1Char('/')) return path; +#endif + // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here. +#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) || defined(Q_OS_SYMBIAN) char *ret = realpath(path.toLocal8Bit().constData(), (char*)0); if (ret) { QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret)); diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 0d9f9ee..1907cca 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2617,8 +2617,6 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) releaseMouse(); if(mac_keyboard_grabber == this) releaseKeyboard(); - if(acceptDrops()) - setAcceptDrops(false); if(testAttribute(Qt::WA_ShowModal)) // just be sure we leave modal QApplicationPrivate::leaveModal(this); |