diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 20:10:08 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-07 20:10:08 +0000 |
commit | f7279a489b22c536c0cf5916abbe66390072d8b2 (patch) | |
tree | 59682a9f6772edb36e999f50a6b20a6a6d685033 /kio | |
parent | c8554ed8c29bbd676e1b48eb23c0ead827d8313f (diff) | |
download | tdelibs-f7279a489b22c536c0cf5916abbe66390072d8b2.tar.gz tdelibs-f7279a489b22c536c0cf5916abbe66390072d8b2.zip |
* Imported all kdelibs bugfix patches from Chakra project
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1172682 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio')
-rw-r--r-- | kio/kio/configure.in.in | 3 | ||||
-rw-r--r-- | kio/kio/kdirlister.cpp | 12 | ||||
-rw-r--r-- | kio/kio/kdirwatch.cpp | 18 |
3 files changed, 25 insertions, 8 deletions
diff --git a/kio/kio/configure.in.in b/kio/kio/configure.in.in index 4d07ef964..8683dfec1 100644 --- a/kio/kio/configure.in.in +++ b/kio/kio/configure.in.in @@ -130,9 +130,6 @@ if test "x$kde_enable_inotify" = "xyes"; then #ifndef IN_ALL_EVENTS #error no inotify notification #endif -#ifndef __NR_inotify_init -#error no __NR_inotify_init -#endif ],kde_cv_have_inotify=yes,kde_cv_have_inotify=no) diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp index 7be6da985..901f382b8 100644 --- a/kio/kio/kdirlister.cpp +++ b/kio/kio/kdirlister.cpp @@ -447,8 +447,11 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not url.adjustPath( -1 ); TQString urlStr = url.url(); TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr]; - Q_ASSERT( holders ); - holders->removeRef( lister ); + //Q_ASSERT( holders ); + if ( holders ) + { + holders->removeRef( lister ); + } // remove the dir from lister->d->lstDirs so that it doesn't contain things // that itemsInUse doesn't. When emitting the canceled signals lstDirs must @@ -457,9 +460,8 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not lister->d->lstDirs.remove( lister->d->lstDirs.find( url ) ); DirItem *item = itemsInUse[urlStr]; - Q_ASSERT( item ); - if ( holders->isEmpty() ) + if ( holders && holders->isEmpty() ) { urlsCurrentlyHeld.remove( urlStr ); // this deletes the (empty) holders list if ( !urlsCurrentlyListed[urlStr] ) @@ -486,7 +488,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not if ( notify ) emit lister->clear( url ); - if ( item->complete ) + if ( item && item->complete ) { kdDebug(7004) << k_funcinfo << lister << " item moved into cache: " << url << endl; itemsCached.insert( urlStr, item ); // TODO: may return false!! diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp index 38cd8f866..bbea148fa 100644 --- a/kio/kio/kdirwatch.cpp +++ b/kio/kio/kdirwatch.cpp @@ -73,6 +73,24 @@ #define _S390_BITOPS_H #include <sys/inotify.h> +#ifndef __NR_inotify_init +#if defined(__i386__) +#define __NR_inotify_init 291 +#define __NR_inotify_add_watch 292 +#define __NR_inotify_rm_watch 293 +#endif +#if defined(__PPC__) +#define __NR_inotify_init 275 +#define __NR_inotify_add_watch 276 +#define __NR_inotify_rm_watch 277 +#endif +#if defined(__x86_64__) +#define __NR_inotify_init 253 +#define __NR_inotify_add_watch 254 +#define __NR_inotify_rm_watch 255 +#endif +#endif + #ifndef IN_ONLYDIR #define IN_ONLYDIR 0x01000000 #endif |