diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-04-17 17:04:33 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-04-17 17:04:33 -0300 |
commit | 418daee6d5c5c907738cef64044ae32f25138981 (patch) | |
tree | b15797eb85d8dbbcae5e9a68cae0b69daf7a201e /extra/kdelibs | |
parent | 6fed2edc6f9533e7894bbbacdbd1dbbb50076b01 (diff) | |
parent | 049af7a95b01eba14d33586ad5852dddaf107e53 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community-testing/cdfs/PKGBUILD
community-testing/open-vm-tools-modules/PKGBUILD
community-testing/open-vm-tools/PKGBUILD
community-testing/virtualbox/PKGBUILD
extra/gnome-device-manager/PKGBUILD
extra/iptraf/PKGBUILD
extra/lirc-utils/PKGBUILD
extra/squeeze/PKGBUILD
extra/texi2html/PKGBUILD
extra/thunar-vfs/PKGBUILD
gnome-unstable/accountsservice/PKGBUILD
gnome-unstable/anjuta/PKGBUILD
gnome-unstable/at-spi/PKGBUILD
gnome-unstable/at-spi2-atk/PKGBUILD
gnome-unstable/at-spi2-core/PKGBUILD
gnome-unstable/atk/PKGBUILD
gnome-unstable/atkmm/PKGBUILD
gnome-unstable/avahi/PKGBUILD
gnome-unstable/brasero/PKGBUILD
gnome-unstable/cairomm/PKGBUILD
gnome-unstable/cheese/PKGBUILD
gnome-unstable/clutter-gst/PKGBUILD
gnome-unstable/clutter-gtk/PKGBUILD
gnome-unstable/clutter-gtk2/PKGBUILD
gnome-unstable/clutter/PKGBUILD
gnome-unstable/dconf/PKGBUILD
gnome-unstable/devhelp/PKGBUILD
gnome-unstable/ekiga/PKGBUILD
gnome-unstable/empathy/PKGBUILD
gnome-unstable/eog-plugins/PKGBUILD
gnome-unstable/eog/PKGBUILD
gnome-unstable/epiphany-extensions/PKGBUILD
gnome-unstable/epiphany/PKGBUILD
gnome-unstable/evince/PKGBUILD
gnome-unstable/evolution-data-server/PKGBUILD
gnome-unstable/evolution-exchange/PKGBUILD
gnome-unstable/evolution/PKGBUILD
gnome-unstable/farsight2/PKGBUILD
gnome-unstable/file-roller/PKGBUILD
gnome-unstable/folks/PKGBUILD
gnome-unstable/gcalctool/PKGBUILD
gnome-unstable/gconf-editor/PKGBUILD
gnome-unstable/gconf/PKGBUILD
gnome-unstable/gdk-pixbuf2/PKGBUILD
gnome-unstable/gdl/PKGBUILD
gnome-unstable/gdm/PKGBUILD
gnome-unstable/gedit/PKGBUILD
gnome-unstable/gjs/PKGBUILD
gnome-unstable/glade/PKGBUILD
gnome-unstable/glib-networking/PKGBUILD
gnome-unstable/glib2/PKGBUILD
gnome-unstable/glibmm/PKGBUILD
gnome-unstable/gnome-applets/PKGBUILD
gnome-unstable/gnome-bluetooth/PKGBUILD
gnome-unstable/gnome-color-manager/PKGBUILD
gnome-unstable/gnome-control-center/PKGBUILD
gnome-unstable/gnome-desktop/PKGBUILD
gnome-unstable/gnome-disk-utility/PKGBUILD
gnome-unstable/gnome-games/PKGBUILD
gnome-unstable/gnome-keyring/PKGBUILD
gnome-unstable/gnome-media/PKGBUILD
gnome-unstable/gnome-menus/PKGBUILD
gnome-unstable/gnome-nettool/PKGBUILD
gnome-unstable/gnome-panel/PKGBUILD
gnome-unstable/gnome-pilot/PKGBUILD
gnome-unstable/gnome-power-manager/PKGBUILD
gnome-unstable/gnome-screensaver/PKGBUILD
gnome-unstable/gnome-session/PKGBUILD
gnome-unstable/gnome-settings-daemon/PKGBUILD
gnome-unstable/gnome-shell/PKGBUILD
gnome-unstable/gnome-system-monitor/PKGBUILD
gnome-unstable/gnome-terminal/PKGBUILD
gnome-unstable/gnome-themes-standard/PKGBUILD
gnome-unstable/gnome-user-share/PKGBUILD
gnome-unstable/gnome-utils/PKGBUILD
gnome-unstable/gobject-introspection/PKGBUILD
gnome-unstable/gthumb/PKGBUILD
gnome-unstable/gtk-vnc/PKGBUILD
gnome-unstable/gtk2/PKGBUILD
gnome-unstable/gtk3/PKGBUILD
gnome-unstable/gtkhtml4/PKGBUILD
gnome-unstable/gtkmm/PKGBUILD
gnome-unstable/gtkmm3/PKGBUILD
gnome-unstable/gtksourceview3/PKGBUILD
gnome-unstable/gucharmap/PKGBUILD
gnome-unstable/gvfs/PKGBUILD
gnome-unstable/lcms2/PKGBUILD
gnome-unstable/libcanberra/PKGBUILD
gnome-unstable/libchamplain/PKGBUILD
gnome-unstable/libdmapsharing/PKGBUILD
gnome-unstable/libgda/PKGBUILD
gnome-unstable/libgdata/PKGBUILD
gnome-unstable/libgnome-keyring/PKGBUILD
gnome-unstable/libgnome-media-profiles/PKGBUILD
gnome-unstable/libgnomekbd/PKGBUILD
gnome-unstable/libgpod/PKGBUILD
gnome-unstable/libgweather/PKGBUILD
gnome-unstable/libimobiledevice/PKGBUILD
gnome-unstable/libnice/PKGBUILD
gnome-unstable/libnotify/PKGBUILD
gnome-unstable/libpeas/PKGBUILD
gnome-unstable/librsvg/PKGBUILD
gnome-unstable/libsocialweb/PKGBUILD
gnome-unstable/libsoup/PKGBUILD
gnome-unstable/libunique/PKGBUILD
gnome-unstable/libunique3/PKGBUILD
gnome-unstable/libwebkit/PKGBUILD
gnome-unstable/libwnck/PKGBUILD
gnome-unstable/libwnck3/PKGBUILD
gnome-unstable/libxklavier/PKGBUILD
gnome-unstable/metacity/PKGBUILD
gnome-unstable/mousetweaks/PKGBUILD
gnome-unstable/mutter/PKGBUILD
gnome-unstable/mx/PKGBUILD
gnome-unstable/nautilus-open-terminal/PKGBUILD
gnome-unstable/nautilus-sendto/PKGBUILD
gnome-unstable/nautilus/PKGBUILD
gnome-unstable/network-manager-applet/PKGBUILD
gnome-unstable/networkmanager-openvpn/PKGBUILD
gnome-unstable/networkmanager-pptp/PKGBUILD
gnome-unstable/networkmanager-vpnc/PKGBUILD
gnome-unstable/networkmanager/PKGBUILD
gnome-unstable/notification-daemon/PKGBUILD
gnome-unstable/opal/PKGBUILD
gnome-unstable/pangomm/PKGBUILD
gnome-unstable/pidgin/PKGBUILD
gnome-unstable/polkit-gnome/PKGBUILD
gnome-unstable/polkit/PKGBUILD
gnome-unstable/ptlib/PKGBUILD
gnome-unstable/pygobject/PKGBUILD
gnome-unstable/pygtk/PKGBUILD
gnome-unstable/rest/PKGBUILD
gnome-unstable/rhythmbox/PKGBUILD
gnome-unstable/seahorse/PKGBUILD
gnome-unstable/sound-juicer/PKGBUILD
gnome-unstable/telepathy-gabble/PKGBUILD
gnome-unstable/telepathy-glib/PKGBUILD
gnome-unstable/telepathy-logger/PKGBUILD
gnome-unstable/telepathy-mission-control/PKGBUILD
gnome-unstable/tomboy/PKGBUILD
gnome-unstable/totem-plparser/PKGBUILD
gnome-unstable/totem/PKGBUILD
gnome-unstable/upower/PKGBUILD
gnome-unstable/vinagre/PKGBUILD
gnome-unstable/vino/PKGBUILD
gnome-unstable/vte/PKGBUILD
gnome-unstable/yelp/PKGBUILD
gnome-unstable/zenity/PKGBUILD
libre-testing/kernel26-libre/PKGBUILD
multilib-testing/lib32-libdrm/PKGBUILD
staging/kdeaccessibility/PKGBUILD
staging/kdeadmin/PKGBUILD
staging/kdeartwork/PKGBUILD
staging/kdebase-runtime/PKGBUILD
staging/kdebase-workspace/PKGBUILD
staging/kdebase/PKGBUILD
staging/kdebindings/PKGBUILD
staging/kdeedu/PKGBUILD
staging/kdegames/PKGBUILD
staging/kdegraphics/PKGBUILD
staging/kdelibs/PKGBUILD
staging/kdemultimedia/PKGBUILD
staging/kdenetwork/PKGBUILD
staging/kdepimlibs/PKGBUILD
staging/kdeplasma-addons/PKGBUILD
staging/kdeplasma-applets-networkmanagement/PKGBUILD
staging/kdesdk/PKGBUILD
staging/kdetoys/PKGBUILD
staging/kdeutils/PKGBUILD
staging/kdewebdev/PKGBUILD
staging/strigi/PKGBUILD
testing/aufs2-util/PKGBUILD
testing/crda/PKGBUILD
testing/dhcpcd/PKGBUILD
testing/dmraid/PKGBUILD
testing/eventlog/PKGBUILD
testing/fakeroot/PKGBUILD
testing/gnutls/PKGBUILD
testing/libdrm/PKGBUILD
testing/libgcrypt/PKGBUILD
testing/libgpg-error/PKGBUILD
testing/libpipeline/PKGBUILD
testing/libx11/PKGBUILD
testing/lilo/PKGBUILD
testing/lirc/PKGBUILD
testing/madwifi/PKGBUILD
testing/man-db/PKGBUILD
testing/mlocate/PKGBUILD
testing/ncurses/PKGBUILD
testing/python2/PKGBUILD
testing/rsync/PKGBUILD
testing/sqlite3/PKGBUILD
testing/sudo/PKGBUILD
testing/syslog-ng/PKGBUILD
testing/tzdata/PKGBUILD
testing/xf86-input-acecad/PKGBUILD
testing/xf86-input-aiptek/PKGBUILD
testing/xf86-input-evdev/PKGBUILD
testing/xf86-input-joystick/PKGBUILD
testing/xf86-input-keyboard/PKGBUILD
testing/xf86-input-mouse/PKGBUILD
testing/xf86-input-synaptics/PKGBUILD
testing/xf86-input-void/PKGBUILD
testing/xf86-input-wacom/PKGBUILD
testing/xf86-video-apm/PKGBUILD
testing/xf86-video-ark/PKGBUILD
testing/xf86-video-ast/PKGBUILD
testing/xf86-video-ati/PKGBUILD
testing/xf86-video-chips/PKGBUILD
testing/xf86-video-cirrus/PKGBUILD
testing/xf86-video-dummy/PKGBUILD
testing/xf86-video-fbdev/PKGBUILD
testing/xf86-video-glint/PKGBUILD
testing/xf86-video-i128/PKGBUILD
testing/xf86-video-i740/PKGBUILD
testing/xf86-video-intel/PKGBUILD
testing/xf86-video-mach64/PKGBUILD
testing/xf86-video-mga/PKGBUILD
testing/xf86-video-neomagic/PKGBUILD
testing/xf86-video-nouveau/PKGBUILD
testing/xf86-video-nv/PKGBUILD
testing/xf86-video-openchrome/PKGBUILD
testing/xf86-video-r128/PKGBUILD
testing/xf86-video-rendition/PKGBUILD
testing/xf86-video-s3/PKGBUILD
testing/xf86-video-s3virge/PKGBUILD
testing/xf86-video-savage/PKGBUILD
testing/xf86-video-siliconmotion/PKGBUILD
testing/xf86-video-sis/PKGBUILD
testing/xf86-video-sisusb/PKGBUILD
testing/xf86-video-tdfx/PKGBUILD
testing/xf86-video-trident/PKGBUILD
testing/xf86-video-tseng/PKGBUILD
testing/xf86-video-unichrome/PKGBUILD
testing/xf86-video-v4l/PKGBUILD
testing/xf86-video-vesa/PKGBUILD
testing/xf86-video-voodoo/PKGBUILD
testing/xf86-video-xgi/PKGBUILD
testing/xf86-video-xgixp/PKGBUILD
testing/xorg-server/PKGBUILD
testing/xz/PKGBUILD
Diffstat (limited to 'extra/kdelibs')
-rw-r--r-- | extra/kdelibs/CVE-2011-1168.patch | 14 | ||||
-rw-r--r-- | extra/kdelibs/fix-empty-dolphin-home.patch | 389 |
2 files changed, 0 insertions, 403 deletions
diff --git a/extra/kdelibs/CVE-2011-1168.patch b/extra/kdelibs/CVE-2011-1168.patch deleted file mode 100644 index 007eef910..000000000 --- a/extra/kdelibs/CVE-2011-1168.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/khtml/khtml_part.cpp -+++ b/khtml/khtml_part.cpp -@@ -1804,7 +1804,10 @@ void KHTMLPart::htmlError( int errorCode - stream >> errorName >> techName >> description >> causes >> solutions; - - QString url, protocol, datetime; -- url = Qt::escape( reqUrl.prettyUrl() ); -+ -+ // This is somewhat confusing, but we have to escape the externally- -+ // controlled URL twice: once for i18n, and once for HTML. -+ url = Qt::escape( Qt::escape( reqUrl.prettyUrl() ) ); - protocol = reqUrl.protocol(); - datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), - KLocale::LongDate ); diff --git a/extra/kdelibs/fix-empty-dolphin-home.patch b/extra/kdelibs/fix-empty-dolphin-home.patch deleted file mode 100644 index 064a87e04..000000000 --- a/extra/kdelibs/fix-empty-dolphin-home.patch +++ /dev/null @@ -1,389 +0,0 @@ -commit 51707e7154082b549216b8a8ecde73505302fadc -Author: David Faure <faure@kde.org> -Date: Tue Mar 8 11:23:47 2011 +0100 - - Fix stop() killing the list job even if another dirlister needs it. - - Regression introduced by me in bef0bd3e3ff. - Symptom: "dolphin $HOME" showed up empty. - - In the case of concurrent listings, I made the use of the cached items job - conditional (only created if there's anything to emit) so that we can join - the current listjob without killing it (updateDirectory) if it hasn't emitted - anything yet. - The unittest also uncovered inconsistencies in the emission of the cancelled - signal, now cacheditemsjob behaves like the listjob in this respect. - - FIXED-IN: 4.6.2 - BUG: 267709 - -diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp -index 75360e08f..df81dc8 100644 ---- a/kio/kio/kdirlister.cpp -+++ b/kio/kio/kdirlister.cpp -@@ -194,7 +194,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KUrl& _u, - - // List items from the cache in a delayed manner, just like things would happen - // if we were not using the cache. -- new KDirLister::Private::CachedItemsJob(lister, itemU->lstItems, itemU->rootItem, _url, _reload); -+ new KDirLister::Private::CachedItemsJob(lister, _url, _reload); - - } else { - // dir not in cache or _reload is true -@@ -260,8 +260,13 @@ bool KDirListerCache::listDir( KDirLister *lister, const KUrl& _u, - - // List existing items in a delayed manner, just like things would happen - // if we were not using the cache. -- //kDebug() << "Listing" << itemU->lstItems.count() << "cached items soon"; -- new KDirLister::Private::CachedItemsJob(lister, itemU->lstItems, itemU->rootItem, _url, _reload); -+ if (!itemU->lstItems.isEmpty()) { -+ kDebug() << "Listing" << itemU->lstItems.count() << "cached items soon"; -+ new KDirLister::Private::CachedItemsJob(lister, _url, _reload); -+ } else { -+ // The other lister hasn't emitted anything yet. Good, we'll just listen to it. -+ // One problem could be if we have _reload=true and the existing job doesn't, though. -+ } - - #ifdef DEBUG_CACHE - printDebug(); -@@ -280,11 +285,9 @@ KDirLister::Private::CachedItemsJob* KDirLister::Private::cachedItemsJobForUrl(c - return 0; - } - --KDirLister::Private::CachedItemsJob::CachedItemsJob(KDirLister* lister, const KFileItemList& items, -- const KFileItem& rootItem, const KUrl& url, bool reload) -+KDirLister::Private::CachedItemsJob::CachedItemsJob(KDirLister* lister, const KUrl& url, bool reload) - : KJob(lister), - m_lister(lister), m_url(url), -- m_items(items), m_rootItem(rootItem), - m_reload(reload), m_emitCompleted(true) - { - //kDebug() << "Creating CachedItemsJob" << this << "for lister" << lister << url; -@@ -301,40 +304,70 @@ void KDirLister::Private::CachedItemsJob::done() - { - if (!m_lister) // job was already killed, but waiting deletion due to deleteLater - return; -- kDirListerCache->emitItemsFromCache(this, m_lister, m_items, m_rootItem, m_url, m_reload, m_emitCompleted); -+ kDirListerCache->emitItemsFromCache(this, m_lister, m_url, m_reload, m_emitCompleted); - emitResult(); - } - - bool KDirLister::Private::CachedItemsJob::doKill() - { -- //kDebug() << this; -- kDirListerCache->emitItemsFromCache(this, m_lister, KFileItemList(), KFileItem(), m_url, false, false); -+ //kDebug(7004) << this; -+ kDirListerCache->forgetCachedItemsJob(this, m_lister, m_url); -+ if (!property("_kdlc_silent").toBool()) { -+ emit m_lister->canceled(m_url); -+ emit m_lister->canceled(); -+ } - m_lister = 0; - return true; - } - --void KDirListerCache::emitItemsFromCache(KDirLister::Private::CachedItemsJob* cachedItemsJob, KDirLister* lister, const KFileItemList& items, const KFileItem& rootItem, const KUrl& _url, bool _reload, bool _emitCompleted) -+void KDirListerCache::emitItemsFromCache(KDirLister::Private::CachedItemsJob* cachedItemsJob, KDirLister* lister, const KUrl& _url, bool _reload, bool _emitCompleted) - { - const QString urlStr = _url.url(); -- DirItem *itemU = kDirListerCache->itemsInUse.value(urlStr); -- Q_ASSERT(itemU); // hey we're listing that dir, so this can't be 0, right? -- - KDirLister::Private* kdl = lister->d; -- - kdl->complete = false; - -- if (kdl->rootFileItem.isNull() && !rootItem.isNull() && kdl->url == _url) { -- kdl->rootFileItem = rootItem; -+ DirItem *itemU = kDirListerCache->itemsInUse.value(urlStr); -+ if (!itemU) { -+ kWarning(7004) << "Can't find item for directory" << urlStr << "anymore"; -+ } else { -+ const KFileItemList items = itemU->lstItems; -+ const KFileItem rootItem = itemU->rootItem; -+ _reload = _reload || !itemU->complete; -+ -+ if (kdl->rootFileItem.isNull() && !rootItem.isNull() && kdl->url == _url) { -+ kdl->rootFileItem = rootItem; -+ } -+ if (!items.isEmpty()) { -+ //kDebug(7004) << "emitting" << items.count() << "for lister" << lister; -+ kdl->addNewItems(_url, items); -+ kdl->emitItems(); -+ } - } -- if (!items.isEmpty()) { -- //kDebug(7004) << "emitting" << items.count() << "for lister" << lister; -- kdl->addNewItems(_url, items); -- kdl->emitItems(); -+ -+ forgetCachedItemsJob(cachedItemsJob, lister, _url); -+ -+ // Emit completed, unless we were told not to, -+ // or if listDir() was called while another directory listing for this dir was happening, -+ // so we "joined" it. We detect that using jobForUrl to ensure it's a real ListJob, -+ // not just a lister-specific CachedItemsJob (which wouldn't emit completed for us). -+ if (_emitCompleted) { -+ -+ kdl->complete = true; -+ emit lister->completed( _url ); -+ emit lister->completed(); -+ -+ if ( _reload ) { -+ updateDirectory( _url ); -+ } - } -+} - -+void KDirListerCache::forgetCachedItemsJob(KDirLister::Private::CachedItemsJob* cachedItemsJob, KDirLister* lister, const KUrl& _url) -+{ - // Modifications to data structures only below this point; - // so that addNewItems is called with a consistent state - -+ const QString urlStr = _url.url(); - lister->d->m_cachedItemsJobs.removeAll(cachedItemsJob); - - KDirListerCacheDirectoryData& dirData = directoryData[urlStr]; -@@ -343,27 +376,12 @@ void KDirListerCache::emitItemsFromCache(KDirLister::Private::CachedItemsJob* ca - KIO::ListJob *listJob = jobForUrl(urlStr); - if (!listJob) { - Q_ASSERT(!dirData.listersCurrentlyHolding.contains(lister)); -- kDebug(7004) << "Moving from listing to holding, because no more job" << lister << urlStr; -+ //kDebug(7004) << "Moving from listing to holding, because no more job" << lister << urlStr; - dirData.listersCurrentlyHolding.append( lister ); - dirData.listersCurrentlyListing.removeAll( lister ); - } else { - //kDebug(7004) << "Still having a listjob" << listJob << ", so not moving to currently-holding."; - } -- -- // Emit completed, unless we were told not to, -- // or if listDir() was called while another directory listing for this dir was happening, -- // so we "joined" it. We detect that using jobForUrl to ensure it's a real ListJob, -- // not just a lister-specific CachedItemsJob (which wouldn't emit completed for us). -- if (_emitCompleted) { -- -- kdl->complete = true; -- emit lister->completed( _url ); -- emit lister->completed(); -- -- if ( _reload || !itemU->complete ) { -- updateDirectory( _url ); -- } -- } - } - - bool KDirListerCache::validUrl( const KDirLister *lister, const KUrl& url ) const -@@ -396,19 +414,13 @@ void KDirListerCache::stop( KDirLister *lister, bool silent ) - #ifdef DEBUG_CACHE - //printDebug(); - #endif -- //kDebug(7004) << "lister: " << lister; -+ //kDebug(7004) << "lister:" << lister << "silent=" << silent; - - const KUrl::List urls = lister->d->lstDirs; - Q_FOREACH(const KUrl& url, urls) { -- //kDebug() << "Stopping any listjob for" << url.url(); -- stopListJob(url.url(), silent); -+ stopListingUrl(lister, url, silent); - } -- -- Q_FOREACH(KDirLister::Private::CachedItemsJob* job, lister->d->m_cachedItemsJobs) { -- //kDebug() << "Killing cached items job"; -- job->kill(); // removes job from list, too -- } -- -+ - #if 0 // test code - QHash<QString,KDirListerCacheDirectoryData>::iterator dirit = directoryData.begin(); - const QHash<QString,KDirListerCacheDirectoryData>::iterator dirend = directoryData.end(); -@@ -416,6 +428,7 @@ void KDirListerCache::stop( KDirLister *lister, bool silent ) - KDirListerCacheDirectoryData& dirData = dirit.value(); - if (dirData.listersCurrentlyListing.contains(lister)) { - kDebug(7004) << "ERROR: found lister" << lister << "in list - for" << dirit.key(); -+ Q_ASSERT(false); - } - } - #endif -@@ -429,6 +442,9 @@ void KDirListerCache::stopListingUrl(KDirLister *lister, const KUrl& _u, bool si - - KDirLister::Private::CachedItemsJob* cachedItemsJob = lister->d->cachedItemsJobForUrl(url); - if (cachedItemsJob) { -+ if (silent) { -+ cachedItemsJob->setProperty("_kdlc_silent", true); -+ } - cachedItemsJob->kill(); // removes job from list, too - } - -@@ -440,9 +456,18 @@ void KDirListerCache::stopListingUrl(KDirLister *lister, const KUrl& _u, bool si - return; - KDirListerCacheDirectoryData& dirData = dirit.value(); - if (dirData.listersCurrentlyListing.contains(lister)) { -- - //kDebug(7004) << " found lister" << lister << "in list - for" << urlStr; -- stopListJob(urlStr, silent); -+ if (dirData.listersCurrentlyListing.count() == 1) { -+ // This was the only dirlister interested in the list job -> kill the job -+ stopListJob(urlStr, silent); -+ } else { -+ // Leave the job running for the other dirlisters, just unsubscribe us. -+ dirData.listersCurrentlyListing.removeAll(lister); -+ if (!silent) { -+ emit lister->canceled(); -+ emit lister->canceled(url); -+ } -+ } - } - } - -@@ -460,9 +485,10 @@ void KDirListerCache::stopListJob(const QString& url, bool silent) - - KIO::ListJob *job = jobForUrl(url); - if (job) { -- //kDebug() << "Killing list job" << job; -- if (silent) -+ //kDebug() << "Killing list job" << job << "for" << url; -+ if (silent) { - job->setProperty("_kdlc_silent", true); -+ } - job->kill(KJob::EmitResult); - } - } -diff --git a/kio/kio/kdirlister_p.h b/kio/kio/kdirlister_p.h -index 4464c16..dd4c00f 100644 ---- a/kio/kio/kdirlister_p.h -+++ b/kio/kio/kdirlister_p.h -@@ -209,10 +209,12 @@ public: - KFileItem *findByUrl(const KDirLister *lister, const KUrl &url) const; - - // Called by CachedItemsJob: -- // Emits those items, for this lister and this url -+ // Emits the cached items, for this lister and this url - void emitItemsFromCache(KDirLister::Private::CachedItemsJob* job, KDirLister* lister, -- const KFileItemList& lst, const KFileItem& rootItem, - const KUrl& _url, bool _reload, bool _emitCompleted); -+ // Called by CachedItemsJob: -+ void forgetCachedItemsJob(KDirLister::Private::CachedItemsJob* job, KDirLister* lister, -+ const KUrl& url); - - public Q_SLOTS: - /** -@@ -464,8 +466,7 @@ struct KDirListerCacheDirectoryData - class KDirLister::Private::CachedItemsJob : public KJob { - Q_OBJECT - public: -- CachedItemsJob(KDirLister* lister, const KFileItemList& items, const KFileItem& rootItem, -- const KUrl& url, bool reload); -+ CachedItemsJob(KDirLister* lister, const KUrl& url, bool reload); - - /*reimp*/ void start() { QMetaObject::invokeMethod(this, "done", Qt::QueuedConnection); } - -@@ -483,8 +484,6 @@ public Q_SLOTS: - private: - KDirLister* m_lister; - KUrl m_url; -- KFileItemList m_items; -- KFileItem m_rootItem; - bool m_reload; - bool m_emitCompleted; - }; -diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp -index e543c1f..3047fdd 100644 ---- a/kio/tests/kdirlistertest.cpp -+++ b/kio/tests/kdirlistertest.cpp -@@ -678,12 +678,83 @@ void KDirListerTest::testConcurrentHoldingListing() - QCOMPARE(m_dirLister.spyClear.count(), 1); - QCOMPARE(m_dirLister.spyClearKUrl.count(), 0); - QVERIFY(dirLister2.isFinished()); -- disconnect(&dirLister2, 0, this, 0); - QVERIFY(m_dirLister.isFinished()); - disconnect(&m_dirLister, 0, this, 0); - QCOMPARE(m_items.count(), origItemCount); - } - -+void KDirListerTest::testConcurrentListingAndStop() -+{ -+ m_items.clear(); -+ m_items2.clear(); -+ -+ MyDirLister dirLister2; -+ -+ // Use a new tempdir for this test, so that we don't use the cache at all. -+ KTempDir tempDir; -+ const QString path = tempDir.name(); -+ createTestFile(path+"file_1"); -+ createTestFile(path+"file_2"); -+ createTestFile(path+"file_3"); -+ -+ connect(&m_dirLister, SIGNAL(newItems(KFileItemList)), this, SLOT(slotNewItems(KFileItemList))); -+ connect(&dirLister2, SIGNAL(newItems(KFileItemList)), this, SLOT(slotNewItems2(KFileItemList))); -+ -+ // Before m_dirLister has time to emit the items, let's make dirLister2 call stop(). -+ // This should not stop the list job for m_dirLister (#267709). -+ dirLister2.openUrl(KUrl(path), KDirLister::Reload); -+ m_dirLister.openUrl(KUrl(path)/*, KDirLister::Reload*/); -+ -+ QCOMPARE(m_dirLister.spyStarted.count(), 1); -+ QCOMPARE(m_dirLister.spyCompleted.count(), 0); -+ QCOMPARE(m_dirLister.spyCompletedKUrl.count(), 0); -+ QCOMPARE(m_dirLister.spyCanceled.count(), 0); -+ QCOMPARE(m_dirLister.spyCanceledKUrl.count(), 0); -+ QCOMPARE(m_dirLister.spyClear.count(), 1); -+ QCOMPARE(m_dirLister.spyClearKUrl.count(), 0); -+ QCOMPARE(m_items.count(), 0); -+ -+ QCOMPARE(dirLister2.spyStarted.count(), 1); -+ QCOMPARE(dirLister2.spyCompleted.count(), 0); -+ QCOMPARE(dirLister2.spyCompletedKUrl.count(), 0); -+ QCOMPARE(dirLister2.spyCanceled.count(), 0); -+ QCOMPARE(dirLister2.spyCanceledKUrl.count(), 0); -+ QCOMPARE(dirLister2.spyClear.count(), 1); -+ QCOMPARE(dirLister2.spyClearKUrl.count(), 0); -+ QCOMPARE(m_items2.count(), 0); -+ QVERIFY(!m_dirLister.isFinished()); -+ QVERIFY(!dirLister2.isFinished()); -+ -+ dirLister2.stop(); -+ -+ QCOMPARE(dirLister2.spyStarted.count(), 1); -+ QCOMPARE(dirLister2.spyCompleted.count(), 0); -+ QCOMPARE(dirLister2.spyCompletedKUrl.count(), 0); -+ QCOMPARE(dirLister2.spyCanceled.count(), 1); -+ QCOMPARE(dirLister2.spyCanceledKUrl.count(), 1); -+ QCOMPARE(dirLister2.spyClear.count(), 1); -+ QCOMPARE(dirLister2.spyClearKUrl.count(), 0); -+ QCOMPARE(m_items2.count(), 0); -+ -+ // then wait for completed -+ qDebug("waiting for completed"); -+ connect(&m_dirLister, SIGNAL(completed()), this, SLOT(exitLoop())); -+ enterLoop(); -+ -+ QCOMPARE(m_items.count(), 3); -+ QCOMPARE(m_items2.count(), 0); -+ -+ //QCOMPARE(m_dirLister.spyStarted.count(), 1); // 2 when in cache -+ QCOMPARE(m_dirLister.spyCompleted.count(), 1); -+ QCOMPARE(m_dirLister.spyCompletedKUrl.count(), 1); -+ QCOMPARE(m_dirLister.spyCanceled.count(), 0); -+ QCOMPARE(m_dirLister.spyCanceledKUrl.count(), 0); -+ QCOMPARE(m_dirLister.spyClear.count(), 1); -+ QCOMPARE(m_dirLister.spyClearKUrl.count(), 0); -+ -+ disconnect(&m_dirLister, 0, this, 0); -+} -+ - void KDirListerTest::testDeleteListerEarly() - { - // Do the same again, it should behave the same, even with the items in the cache -diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h -index 531abd5..a781aca 100644 ---- a/kio/tests/kdirlistertest.h -+++ b/kio/tests/kdirlistertest.h -@@ -101,6 +101,7 @@ private Q_SLOTS: - void testRenameAndOverwrite(); - void testConcurrentListing(); - void testConcurrentHoldingListing(); -+ void testConcurrentListingAndStop(); - void testDeleteListerEarly(); - void testOpenUrlTwice(); - void testOpenUrlTwiceWithKeep(); |