[PC-BSD Commits] r7385 - in pcbsd/stable/build-files/ports-patches: . devel devel/qt4-corelib devel/qt4-corelib/files x11/kdelibs4/files
svn at pcbsd.org
svn at pcbsd.org
Mon Aug 16 09:17:44 PDT 2010
Author: kris
Date: 2010-08-16 09:17:44 -0700 (Mon, 16 Aug 2010)
New Revision: 7385
Added:
pcbsd/stable/build-files/ports-patches/devel/
pcbsd/stable/build-files/ports-patches/devel/qt4-corelib/
pcbsd/stable/build-files/ports-patches/devel/qt4-corelib/files/
pcbsd/stable/build-files/ports-patches/devel/qt4-corelib/files/patch-kqueue
Modified:
pcbsd/stable/build-files/ports-patches/x11/kdelibs4/files/patch-kio-kio-kdirwatch.cpp
Log:
Updated patches from Tijl which fixes a number of problems with QFileSystemWatcher, and it being used by KDE libs / kdirwatch
Modified: pcbsd/stable/build-files/ports-patches/x11/kdelibs4/files/patch-kio-kio-kdirwatch.cpp
===================================================================
--- pcbsd/stable/build-files/ports-patches/x11/kdelibs4/files/patch-kio-kio-kdirwatch.cpp 2010-08-15 20:37:34 UTC (rev 7384)
+++ pcbsd/stable/build-files/ports-patches/x11/kdelibs4/files/patch-kio-kio-kdirwatch.cpp 2010-08-16 16:17:44 UTC (rev 7385)
@@ -15,25 +15,59 @@
configure_file(kio/config-kdirwatch.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kio/config-kdirwatch.h )
configure_file(kio/config-strigi.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kio/config-strigi.h )
+--- kio/kio/kdirwatch_p.h.orig 2010-06-24 15:21:37.000000000 +0200
++++ kio/kio/kdirwatch_p.h 2010-06-24 15:21:58.000000000 +0200
+@@ -102,7 +102,7 @@
+ QHash<QString,QFileSystemWatcher*> m_paths;
+ };
+ #else
+-typedef KFileSystemWatcher QFileSystemWatcher;
++typedef QFileSystemWatcher KFileSystemWatcher;
+ #endif
+ #endif
+
--- kio/kio/kdirwatch.cpp.orig 2010-02-26 19:30:10.000000000 +0100
-+++ kio/kio/kdirwatch.cpp 2010-07-08 23:05:23.000000000 +0200
-@@ -91,12 +91,10 @@
- } else if (method == "QFSWatch") {
++++ kio/kio/kdirwatch.cpp 2010-08-08 20:39:38.000000000 +0200
+@@ -94,7 +94,7 @@ static KDirWatchPrivate::WatchMethod met
+ #ifdef Q_OS_WIN
return KDirWatchPrivate::QFSWatch;
- } else {
--#ifdef Q_OS_WIN
-- return KDirWatchPrivate::QFSWatch;
--#elif defined(Q_OS_FREEBSD)
+ #elif defined(Q_OS_FREEBSD)
- return KDirWatchPrivate::Stat;
--#else
-+#ifdef Q_OS_LINUX
++ return KDirWatchPrivate::QFSWatch;
+ #else
return KDirWatchPrivate::INotify;
+ #endif
+@@ -150,7 +150,11 @@ KDirWatchPrivate::KDirWatchPrivate()
+ m_preferredMethod = methodFromString(method);
+
+ // The nfs method defaults to the normal (local) method
++#if defined(Q_OS_FREEBSD)
++ m_nfsPreferredMethod = methodFromString(config.readEntry("nfsPreferredMethod", "Stat"));
+#else
-+ return KDirWatchPrivate::QFSWatch;
+ m_nfsPreferredMethod = methodFromString(config.readEntry("nfsPreferredMethod", method));
++#endif
+
+ QStringList availableMethods;
+
+@@ -961,7 +965,16 @@ void KDirWatchPrivate::removeEntry(KDirW
+
+ #ifdef HAVE_QFILESYSTEMWATCHER
+ if (e->m_mode == QFSWatchMode) {
+- fsWatcher->removePath(e->path);
++ if ( e->m_status == Normal ) {
++ fsWatcher->removePath(e->path);
++ kDebug(7001).nospace() << "Cancelled QFSWatch for " << e->path;
++ }
++ else {
++ if (e->isDir)
++ removeEntry(0, QDir::cleanPath(e->path+"/.."), e);
++ else
++ removeEntry(0, QFileInfo(e->path).absolutePath(), e);
++ }
+ }
#endif
- }
- }
-@@ -1595,8 +1593,7 @@
+ if (e->m_mode == StatMode) {
+@@ -1595,8 +1608,7 @@ void KDirWatchPrivate::fswEventReceived(
EntryMap::Iterator it;
it = m_mapEntries.find(path);
if(it != m_mapEntries.end()) {
@@ -43,14 +77,41 @@
e->dirty = true;
int ev = scanEntry(e);
if (ev != NoChange)
---- kio/kio/kdirwatch_p.h.orig 2010-06-24 15:21:37.000000000 +0200
-+++ kio/kio/kdirwatch_p.h 2010-06-24 15:21:58.000000000 +0200
-@@ -102,7 +102,7 @@
- QHash<QString,QFileSystemWatcher*> m_paths;
- };
- #else
--typedef KFileSystemWatcher QFileSystemWatcher;
-+typedef QFileSystemWatcher KFileSystemWatcher;
- #endif
- #endif
-
+@@ -1607,28 +1619,20 @@ void KDirWatchPrivate::fswEventReceived(
+ else
+ addEntry(0, QFileInfo(e->path).absolutePath(), e, true);
+ } else
++ if(ev == Created) {
++ if(!useQFSWatch(e))
++#ifdef HAVE_SYS_INOTIFY_H
++ if(!useINotify(e))
++#endif
++ useStat(e);
++ } else
+ if (ev == Changed && e->isDir && e->m_entries.count()) {
+ Entry* sub_entry = 0;
+ Q_FOREACH(sub_entry, e->m_entries) {
+- if(e->isDir) { // ####### !?!? Already checked above
+- if (QFileInfo(sub_entry->path).isDir()) // ##### !? no comparison between sub_entry->path and path?
+- break;
+- } else {
+- if (QFileInfo(sub_entry->path).isFile())
+- break;
+- }
++ if (QFileInfo(sub_entry->path).exists())
++ break;
+ }
+ if (sub_entry) {
+- removeEntry(0, e, sub_entry);
+- //KDE_struct_stat stat_buf;
+- //QByteArray tpath = QFile::encodeName(path);
+- //KDE_stat(tpath, &stat_buf);
+-
+- if(!useQFSWatch(sub_entry))
+-#ifdef HAVE_SYS_INOTIFY_H
+- if(!useINotify(sub_entry))
+-#endif
+- useStat(sub_entry);
+ fswEventReceived(sub_entry->path);
+ }
+ }
More information about the Commits
mailing list