• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.8 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • kio
kdirlister_p.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2002-2006 Michael Brade <brade@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef kdirlister_p_h
21 #define kdirlister_p_h
22 
23 #include "kfileitem.h"
24 
25 #include <QtCore/QMap>
26 #include <QtCore/QHash>
27 #include <QtCore/QCache>
28 #include <QtCore/QSet>
29 #include <QtCore/QTimer>
30 #include <QtGui/QWidget>
31 
32 #include <kurl.h>
33 #include <kdebug.h>
34 #include <kio/global.h>
35 #include <kdirwatch.h>
36 
37 class KDirLister;
38 namespace KIO { class Job; class ListJob; }
39 class OrgKdeKDirNotifyInterface;
40 struct KDirListerCacheDirectoryData;
41 
42 class KDirLister::Private
43 {
44 public:
45  Private(KDirLister *parent)
46  : m_parent(parent)
47  {
48  complete = false;
49 
50  autoUpdate = false;
51 
52  autoErrorHandling = false;
53  errorParent = 0;
54 
55  delayedMimeTypes = false;
56 
57  rootFileItem = KFileItem();
58 
59  lstNewItems = 0;
60  lstRefreshItems = 0;
61  lstMimeFilteredItems = 0;
62  lstRemoveItems = 0;
63 
64  hasPendingChanges = false;
65 
66  window = 0;
67  }
68 
69  void _k_emitCachedItems(const KUrl&, bool, bool);
70  void _k_slotInfoMessage( KJob*, const QString& );
71  void _k_slotPercent( KJob*, unsigned long );
72  void _k_slotTotalSize( KJob*, qulonglong );
73  void _k_slotProcessedSize( KJob*, qulonglong );
74  void _k_slotSpeed( KJob*, unsigned long );
75 
76  bool doMimeExcludeFilter( const QString& mimeExclude, const QStringList& filters ) const;
77  void jobStarted( KIO::ListJob * );
78  void connectJob( KIO::ListJob * );
79  void jobDone( KIO::ListJob * );
80  uint numJobs();
81  void addNewItem(const KUrl& directoryUrl, const KFileItem& item);
82  void addNewItems(const KUrl& directoryUrl, const KFileItemList& items);
83  void addRefreshItem(const KUrl& directoryUrl, const KFileItem& oldItem, const KFileItem& item);
84  void emitItems();
85  void emitItemsDeleted(const KFileItemList &items);
86 
92  void redirect(const KUrl& oldUrl, const KUrl& newUrl, bool keepItems);
93 
97  bool isItemVisible(const KFileItem& item) const;
98 
99  void prepareForSettingsChange() {
100  if (!hasPendingChanges) {
101  hasPendingChanges = true;
102  oldSettings = settings;
103  }
104  }
105 
106  void emitChanges();
107 
108  class CachedItemsJob;
109  CachedItemsJob* cachedItemsJobForUrl(const KUrl& url) const;
110 
111 
112  KDirLister *m_parent;
113 
118  KUrl::List lstDirs;
119 
120  // toplevel URL
121  KUrl url;
122 
123  bool complete:1;
124 
125  bool autoUpdate:1;
126 
127  bool delayedMimeTypes:1;
128 
129  bool hasPendingChanges:1; // i.e. settings != oldSettings
130 
131  bool autoErrorHandling:2;
132  QWidget *errorParent;
133 
134  struct JobData {
135  long unsigned int percent, speed;
136  KIO::filesize_t processedSize, totalSize;
137  };
138 
139  QMap<KIO::ListJob *, JobData> jobData;
140 
141  // file item for the root itself (".")
142  KFileItem rootFileItem;
143 
144  typedef QHash<KUrl, KFileItemList> NewItemsHash;
145  NewItemsHash *lstNewItems;
146  QList<QPair<KFileItem,KFileItem> > *lstRefreshItems;
147  KFileItemList *lstMimeFilteredItems, *lstRemoveItems;
148 
149  QWidget *window; // Main window this lister is associated with
150  QList<CachedItemsJob*> m_cachedItemsJobs;
151 
152  QString nameFilter; // parsed into lstFilters
153 
154  struct FilterSettings {
155  FilterSettings() : isShowingDotFiles(false), dirOnlyMode(false) {}
156  bool isShowingDotFiles;
157  bool dirOnlyMode;
158  QList<QRegExp> lstFilters;
159  QStringList mimeFilter;
160  QStringList mimeExcludeFilter;
161  };
162  FilterSettings settings;
163  FilterSettings oldSettings;
164 
165  friend class KDirListerCache;
166 };
167 
181 class KDirListerCache : public QObject
182 {
183  Q_OBJECT
184 public:
185  KDirListerCache(); // only called by K_GLOBAL_STATIC
186  ~KDirListerCache();
187 
188  void updateDirectory( const KUrl& dir );
189 
190  KFileItem itemForUrl( const KUrl& url ) const;
191  KFileItemList *itemsForDir(const KUrl& dir) const;
192 
193  bool listDir( KDirLister *lister, const KUrl& _url, bool _keep, bool _reload );
194 
195  // stop all running jobs for lister
196  void stop( KDirLister *lister, bool silent = false );
197  // stop just the job listing url for lister
198  void stopListingUrl( KDirLister *lister, const KUrl &_url, bool silent = false );
199 
200  void setAutoUpdate( KDirLister *lister, bool enable );
201 
202  void forgetDirs( KDirLister *lister );
203  void forgetDirs( KDirLister *lister, const KUrl &_url, bool notify );
204 
205  KFileItem findByName( const KDirLister *lister, const QString &_name ) const;
206  // findByUrl returns a pointer so that it's possible to modify the item.
207  // See itemForUrl for the version that returns a readonly kfileitem.
208  // @param lister can be 0. If set, it is checked that the url is held by the lister
209  KFileItem *findByUrl(const KDirLister *lister, const KUrl &url) const;
210 
211  // Called by CachedItemsJob:
212  // Emits the cached items, for this lister and this url
213  void emitItemsFromCache(KDirLister::Private::CachedItemsJob* job, KDirLister* lister,
214  const KUrl& _url, bool _reload, bool _emitCompleted);
215  // Called by CachedItemsJob:
216  void forgetCachedItemsJob(KDirLister::Private::CachedItemsJob* job, KDirLister* lister,
217  const KUrl& url);
218 
219 public Q_SLOTS:
226  void slotFilesAdded( const QString& urlDirectory );
227 
235  void slotFilesRemoved( const QStringList& fileList );
236 
243  void slotFilesChanged( const QStringList& fileList );
244  void slotFileRenamed( const QString& srcUrl, const QString& dstUrl );
245 
246 private Q_SLOTS:
247  void slotFileDirty( const QString &_file );
248  void slotFileCreated( const QString &_file );
249  void slotFileDeleted( const QString &_file );
250 
251  void slotEntries( KIO::Job *job, const KIO::UDSEntryList &entries );
252  void slotResult( KJob *j );
253  void slotRedirection( KIO::Job *job, const KUrl &url );
254 
255  void slotUpdateEntries( KIO::Job *job, const KIO::UDSEntryList &entries );
256  void slotUpdateResult( KJob *job );
257  void processPendingUpdates();
258 
259 private:
260  class DirItem;
261  DirItem* dirItemForUrl(const KUrl& dir) const;
262 
263  bool validUrl( const KDirLister *lister, const KUrl& _url ) const;
264 
265  void stopListJob(const QString& url, bool silent);
266 
267  KIO::ListJob *jobForUrl( const QString& url, KIO::ListJob *not_job = 0 );
268  const KUrl& joburl( KIO::ListJob *job );
269 
270  void killJob( KIO::ListJob *job );
271 
272  // Called when something tells us that the directory @p url has changed.
273  // Returns true if @p url is held by some lister (meaning: do the update now)
274  // otherwise mark the cached item as not-up-to-date for later and return false
275  bool checkUpdate( const QString& url );
276 
277  // Helper method for slotFileDirty
278  void handleFileDirty(const KUrl& url);
279  void handleDirDirty(const KUrl& url);
280 
281  // when there were items deleted from the filesystem all the listers holding
282  // the parent directory need to be notified, the unmarked items have to be deleted
283  // and removed from the cache including all the children.
284  void deleteUnmarkedItems( const QList<KDirLister *>&, KFileItemList & );
285  // Helper method called when we know that a list of items was deleted
286  void itemsDeleted(const QList<KDirLister *>& listers, const KFileItemList& deletedItems);
287  void slotFilesRemoved(const KUrl::List& urls);
288  // common for slotRedirection and slotFileRenamed
289  void renameDir( const KUrl &oldUrl, const KUrl &url );
290  // common for deleteUnmarkedItems and slotFilesRemoved
291  void deleteDir( const KUrl& dirUrl );
292  // remove directory from cache (itemsCached), including all child dirs
293  void removeDirFromCache( const KUrl& dir );
294  // helper for renameDir
295  void emitRedirections( const KUrl &oldUrl, const KUrl &url );
296 
302  QSet<KDirLister *> emitRefreshItem(const KFileItem& oldItem, const KFileItem& fileitem);
303 
308  QStringList directoriesForCanonicalPath(const QString& dir) const;
309 
310 #ifndef NDEBUG
311  void printDebug();
312 #endif
313 
314  class DirItem
315  {
316  public:
317  DirItem(const KUrl &dir, const QString& canonicalPath)
318  : url(dir), m_canonicalPath(canonicalPath)
319  {
320  autoUpdates = 0;
321  complete = false;
322  watchedWhileInCache = false;
323  }
324 
325  ~DirItem()
326  {
327  if ( autoUpdates )
328  {
329  if ( KDirWatch::exists() && url.isLocalFile() )
330  KDirWatch::self()->removeDir(m_canonicalPath);
331  sendSignal( false, url );
332  }
333  lstItems.clear();
334  }
335 
336  void sendSignal( bool entering, const KUrl& url )
337  {
338  // Note that "entering" means "start watching", and "leaving" means "stop watching"
339  // (i.e. it's not when the user leaves the directory, it's when the directory is removed from the cache)
340  if (entering)
341  org::kde::KDirNotify::emitEnteredDirectory( url.url() );
342  else
343  org::kde::KDirNotify::emitLeftDirectory( url.url() );
344  }
345 
346  void redirect( const KUrl& newUrl )
347  {
348  if ( autoUpdates )
349  {
350  if ( url.isLocalFile() )
351  KDirWatch::self()->removeDir(m_canonicalPath);
352  sendSignal( false, url );
353 
354  if (newUrl.isLocalFile()) {
355  m_canonicalPath = QFileInfo(newUrl.toLocalFile()).canonicalFilePath();
356  KDirWatch::self()->addDir(m_canonicalPath);
357  }
358  sendSignal( true, newUrl );
359  }
360 
361  url = newUrl;
362 
363  if ( !rootItem.isNull() )
364  rootItem.setUrl( newUrl );
365  }
366 
367  void incAutoUpdate()
368  {
369  if ( autoUpdates++ == 0 )
370  {
371  if ( url.isLocalFile() )
372  KDirWatch::self()->addDir(m_canonicalPath);
373  sendSignal( true, url );
374  }
375  }
376 
377  void decAutoUpdate()
378  {
379  if ( --autoUpdates == 0 )
380  {
381  if ( url.isLocalFile() )
382  KDirWatch::self()->removeDir(m_canonicalPath);
383  sendSignal( false, url );
384  }
385 
386  else if ( autoUpdates < 0 )
387  autoUpdates = 0;
388  }
389 
390  // number of KDirListers using autoUpdate for this dir
391  short autoUpdates;
392 
393  // this directory is up-to-date
394  bool complete;
395 
396  // the directory is watched while being in the cache (useful for proper incAutoUpdate/decAutoUpdate count)
397  bool watchedWhileInCache;
398 
399  // the complete url of this directory
400  KUrl url;
401 
402  // the local path, with symlinks resolved, so that KDirWatch works
403  QString m_canonicalPath;
404 
405  // KFileItem representing the root of this directory.
406  // Remember that this is optional. FTP sites don't return '.' in
407  // the list, so they give no root item
408  KFileItem rootItem;
409  KFileItemList lstItems;
410  };
411 
412  //static const unsigned short MAX_JOBS_PER_LISTER;
413 
414  QMap<KIO::ListJob *, KIO::UDSEntryList> runningListJobs;
415 
416  // an item is a complete directory
417  QHash<QString /*url*/, DirItem*> itemsInUse;
418  QCache<QString /*url*/, DirItem> itemsCached;
419 
420  typedef QHash<QString /*url*/, KDirListerCacheDirectoryData> DirectoryDataHash;
421  DirectoryDataHash directoryData;
422 
423  // Symlink-to-directories are registered here so that we can
424  // find the url that changed, when kdirwatch tells us about
425  // changes in the canonical url. (#213799)
426  QHash<QString /*canonical path*/, QStringList /*dirlister urls*/> canonicalUrls;
427 
428  // Set of local files that we have changed recently (according to KDirWatch)
429  // We temporize the notifications by keeping them 500ms in this list.
430  QSet<QString /*path*/> pendingUpdates;
431  // The timer for doing the delayed updates
432  QTimer pendingUpdateTimer;
433 
434  // Set of remote files that have changed recently -- but we can't emit those
435  // changes yet, we need to wait for the "update" directory listing.
436  // The cmp() call can't differ mimetypes since they are determined on demand,
437  // this is why we need to remember those files here.
438  QSet<KFileItem*> pendingRemoteUpdates;
439 
440  // the KDirNotify signals
441  OrgKdeKDirNotifyInterface *kdirnotify;
442 
443  struct ItemInUseChange;
444 };
445 
446 // Data associated with a directory url
447 // This could be in DirItem but only in the itemsInUse dict...
448 struct KDirListerCacheDirectoryData
449 {
450  // A lister can be EITHER in listersCurrentlyListing OR listersCurrentlyHolding
451  // but NOT in both at the same time.
452  // But both lists can have different listers at the same time; this
453  // happens if more listers are requesting url at the same time and
454  // one lister was stopped during the listing of files.
455 
456  // Listers that are currently listing this url
457  QList<KDirLister *> listersCurrentlyListing;
458  // Listers that are currently holding this url
459  QList<KDirLister *> listersCurrentlyHolding;
460 
461  void moveListersWithoutCachedItemsJob(const KUrl& url);
462 };
463 
464 //const unsigned short KDirListerCache::MAX_JOBS_PER_LISTER = 5;
465 
466 // This job tells KDirListerCache to emit cached items asynchronously from listDir()
467 // to give the KDirLister user enough time for connecting to its signals, and so
468 // that KDirListerCache behaves just like when a real KIO::Job is used: nothing
469 // is emitted during the openUrl call itself.
470 class KDirLister::Private::CachedItemsJob : public KJob {
471  Q_OBJECT
472 public:
473  CachedItemsJob(KDirLister* lister, const KUrl& url, bool reload);
474 
475  /*reimp*/ void start() { QMetaObject::invokeMethod(this, "done", Qt::QueuedConnection); }
476 
477  // For updateDirectory() to cancel m_emitCompleted;
478  void setEmitCompleted(bool b) { m_emitCompleted = b; }
479 
480  KUrl url() const { return m_url; }
481 
482 protected:
483  virtual bool doKill();
484 
485 public Q_SLOTS:
486  void done();
487 
488 private:
489  KDirLister* m_lister;
490  KUrl m_url;
491  bool m_reload;
492  bool m_emitCompleted;
493 };
494 
495 #endif
KDirLister::Private::CachedItemsJob::doKill
virtual bool doKill()
Definition: kdirlister.cpp:311
KDirListerCache::slotFilesRemoved
void slotFilesRemoved(const QStringList &fileList)
Notify that files have been deleted.
Definition: kdirlister.cpp:870
KDirLister::Private::JobData::speed
long unsigned int speed
Definition: kdirlister_p.h:135
KDirLister::Private::rootFileItem
KFileItem rootFileItem
Definition: kdirlister_p.h:142
KDirListerCacheDirectoryData
Definition: kdirlister_p.h:448
KIO::filesize_t
qulonglong filesize_t
64-bit file size
Definition: global.h:57
KDirWatch::self
static KDirWatch * self()
KDirLister::Private::autoErrorHandling
bool autoErrorHandling
Definition: kdirlister_p.h:131
kdebug.h
KDirLister::Private::lstNewItems
NewItemsHash * lstNewItems
Definition: kdirlister_p.h:145
KDirLister::Private::_k_slotInfoMessage
void _k_slotInfoMessage(KJob *, const QString &)
Definition: kdirlister.cpp:2561
KDirLister::Private::m_parent
KDirLister * m_parent
Definition: kdirlister_p.h:112
kurl.h
KDirListerCache::KDirListerCache
KDirListerCache()
Definition: kdirlister.cpp:49
KDirLister::Private::oldSettings
FilterSettings oldSettings
Definition: kdirlister_p.h:163
kdirwatch.h
KIO::ListJob
A ListJob is allows you to get the get the content of a directory.
Definition: jobclasses.h:936
KDirLister::Private::emitChanges
void emitChanges()
Definition: kdirlister.cpp:2175
QWidget
KDirLister::Private::CachedItemsJob::done
void done()
Definition: kdirlister.cpp:303
KUrl::toLocalFile
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
KDirLister::Private::nameFilter
QString nameFilter
Definition: kdirlister_p.h:152
KDirListerCacheDirectoryData::listersCurrentlyListing
QList< KDirLister * > listersCurrentlyListing
Definition: kdirlister_p.h:457
KDirLister::Private::FilterSettings::mimeExcludeFilter
QStringList mimeExcludeFilter
Definition: kdirlister_p.h:160
KDirListerCache::forgetCachedItemsJob
void forgetCachedItemsJob(KDirLister::Private::CachedItemsJob *job, KDirLister *lister, const KUrl &url)
Definition: kdirlister.cpp:365
QString
QHash
QObject
KDirListerCache::stopListingUrl
void stopListingUrl(KDirLister *lister, const KUrl &_url, bool silent=false)
Definition: kdirlister.cpp:437
KDirLister::Private::NewItemsHash
QHash< KUrl, KFileItemList > NewItemsHash
Definition: kdirlister_p.h:144
KDirLister::Private::addNewItem
void addNewItem(const KUrl &directoryUrl, const KFileItem &item)
Definition: kdirlister.cpp:2413
global.h
KDirLister::Private::_k_slotPercent
void _k_slotPercent(KJob *, unsigned long)
Definition: kdirlister.cpp:2566
KDirLister::Private::connectJob
void connectJob(KIO::ListJob *)
Definition: kdirlister.cpp:2667
KDirListerCache::slotFileRenamed
void slotFileRenamed(const QString &srcUrl, const QString &dstUrl)
Definition: kdirlister.cpp:964
KDirLister::Private::lstRefreshItems
QList< QPair< KFileItem, KFileItem > > * lstRefreshItems
Definition: kdirlister_p.h:146
KDirLister::Private::_k_emitCachedItems
void _k_emitCachedItems(const KUrl &, bool, bool)
KUrl
KDirLister::Private::complete
bool complete
Definition: kdirlister_p.h:123
KDirListerCache::itemForUrl
KFileItem itemForUrl(const KUrl &url) const
Definition: kdirlister.cpp:780
KDirLister::Private::autoUpdate
bool autoUpdate
Definition: kdirlister_p.h:125
KDirLister::Private::FilterSettings::dirOnlyMode
bool dirOnlyMode
Definition: kdirlister_p.h:157
OrgKdeKDirNotifyInterface::emitEnteredDirectory
static void emitEnteredDirectory(const QString &url)
Definition: kdirnotify.cpp:62
KDirListerCache::stop
void stop(KDirLister *lister, bool silent=false)
Definition: kdirlister.cpp:412
KDirListerCacheDirectoryData::listersCurrentlyHolding
QList< KDirLister * > listersCurrentlyHolding
Definition: kdirlister_p.h:459
KDirLister::Private::isItemVisible
bool isItemVisible(const KFileItem &item) const
Should this item be visible according to the current filter settings?
Definition: kdirlister.cpp:2533
KDirLister::Private::FilterSettings::isShowingDotFiles
bool isShowingDotFiles
Definition: kdirlister_p.h:156
KDirListerCache::updateDirectory
void updateDirectory(const KUrl &dir)
Definition: kdirlister.cpp:650
KDirLister::Private::_k_slotProcessedSize
void _k_slotProcessedSize(KJob *, qulonglong)
Definition: kdirlister.cpp:2604
KDirLister::Private::JobData::percent
long unsigned int percent
Definition: kdirlister_p.h:135
KDirLister::Private::prepareForSettingsChange
void prepareForSettingsChange()
Definition: kdirlister_p.h:99
KDirLister::Private::hasPendingChanges
bool hasPendingChanges
Definition: kdirlister_p.h:129
KDirLister::Private::FilterSettings
Definition: kdirlister_p.h:154
KDirLister::Private::CachedItemsJob::start
void start()
Definition: kdirlister_p.h:475
KDirLister::Private::window
QWidget * window
Definition: kdirlister_p.h:149
KDirLister::Private::emitItemsDeleted
void emitItemsDeleted(const KFileItemList &items)
Definition: kdirlister.cpp:2542
KDirLister::Private::CachedItemsJob::CachedItemsJob
CachedItemsJob(KDirLister *lister, const KUrl &url, bool reload)
Definition: kdirlister.cpp:288
KDirLister::items
KFileItemList items(WhichItems which=FilteredItems) const
Returns the items listed for the current url().
Definition: kdirlister.cpp:2691
KDirLister::Private::errorParent
QWidget * errorParent
Definition: kdirlister_p.h:132
QStringList
KFileItemList
List of KFileItems, which adds a few helper methods to QList&lt;KFileItem&gt;.
Definition: kfileitem.h:674
KDirLister::Private::jobData
QMap< KIO::ListJob *, JobData > jobData
Definition: kdirlister_p.h:139
KDirListerCache::slotFilesChanged
void slotFilesChanged(const QStringList &fileList)
Notify that files have been changed.
Definition: kdirlister.cpp:930
KDirLister::Private::FilterSettings::lstFilters
QList< QRegExp > lstFilters
Definition: kdirlister_p.h:158
KDirLister::Private::jobStarted
void jobStarted(KIO::ListJob *)
Definition: kdirlister.cpp:2655
KDirLister::Private::FilterSettings::mimeFilter
QStringList mimeFilter
Definition: kdirlister_p.h:159
KDirLister::Private::jobDone
void jobDone(KIO::ListJob *)
Definition: kdirlister.cpp:2650
reload
const KShortcut & reload()
KDirLister::Private::Private
Private(KDirLister *parent)
Definition: kdirlister_p.h:45
KDirListerCache::listDir
bool listDir(KDirLister *lister, const KUrl &_url, bool _keep, bool _reload)
Definition: kdirlister.cpp:91
KDirLister::Private::m_cachedItemsJobs
QList< CachedItemsJob * > m_cachedItemsJobs
Definition: kdirlister_p.h:150
KDirListerCache::findByUrl
KFileItem * findByUrl(const KDirLister *lister, const KUrl &url) const
Definition: kdirlister.cpp:821
KDirLister::Private
Definition: kdirlister_p.h:42
OrgKdeKDirNotifyInterface::emitLeftDirectory
static void emitLeftDirectory(const QString &url)
Definition: kdirnotify.cpp:67
QSet
KDirLister::Private::JobData::totalSize
KIO::filesize_t totalSize
Definition: kdirlister_p.h:136
KDirLister::Private::cachedItemsJobForUrl
CachedItemsJob * cachedItemsJobForUrl(const KUrl &url) const
Definition: kdirlister.cpp:279
KDirLister::Private::emitItems
void emitItems()
Definition: kdirlister.cpp:2490
KDirListerCache::forgetDirs
void forgetDirs(KDirLister *lister)
Definition: kdirlister.cpp:511
KDirLister::Private::delayedMimeTypes
bool delayedMimeTypes
Definition: kdirlister_p.h:127
KUrl::List
KDirLister::Private::redirect
void redirect(const KUrl &oldUrl, const KUrl &newUrl, bool keepItems)
Redirect this dirlister from oldUrl to newUrl.
Definition: kdirlister.cpp:2731
KDirListerCache
Design of the cache: There is a single KDirListerCache for the whole process.
Definition: kdirlister_p.h:181
KDirListerCache::setAutoUpdate
void setAutoUpdate(KDirLister *lister, bool enable)
Definition: kdirlister.cpp:496
KDirListerCache::findByName
KFileItem findByName(const KDirLister *lister, const QString &_name) const
Definition: kdirlister.cpp:805
OrgKdeKDirNotifyInterface
Proxy class for interface org.kde.KDirNotify.
Definition: kdirnotify.h:47
KRecentDirs::dir
QString dir(const QString &fileClass)
Returns the most recently used directory accociated with this file-class.
Definition: krecentdirs.cpp:68
KDirLister::Private::CachedItemsJob::setEmitCompleted
void setEmitCompleted(bool b)
Definition: kdirlister_p.h:478
KDirLister::Private::lstDirs
KUrl::List lstDirs
List of dirs handled by this dirlister.
Definition: kdirlister_p.h:118
KDirLister::Private::lstMimeFilteredItems
KFileItemList * lstMimeFilteredItems
Definition: kdirlister_p.h:147
KDirLister::Private::_k_slotTotalSize
void _k_slotTotalSize(KJob *, qulonglong)
Definition: kdirlister.cpp:2589
KDirLister::Private::JobData::processedSize
KIO::filesize_t processedSize
Definition: kdirlister_p.h:136
KDirListerCache::emitItemsFromCache
void emitItemsFromCache(KDirLister::Private::CachedItemsJob *job, KDirLister *lister, const KUrl &_url, bool _reload, bool _emitCompleted)
Definition: kdirlister.cpp:323
KDirListerCache::slotFilesAdded
void slotFilesAdded(const QString &urlDirectory)
Notify that files have been added in directory The receiver will list that directory again to find th...
Definition: kdirlister.cpp:857
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:94
KDirLister::Private::JobData
Definition: kdirlister_p.h:134
KDirLister::Private::lstRemoveItems
KFileItemList * lstRemoveItems
Definition: kdirlister_p.h:147
KDirWatch::removeDir
void removeDir(const QString &path)
KDirLister::Private::numJobs
uint numJobs()
Definition: kdirlister.cpp:2634
KDirWatch::addDir
void addDir(const QString &path, WatchModes watchModes=WatchDirOnly)
KDirLister::Private::_k_slotSpeed
void _k_slotSpeed(KJob *, unsigned long)
Definition: kdirlister.cpp:2619
KUrl::url
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
KDirLister::Private::doMimeExcludeFilter
bool doMimeExcludeFilter(const QString &mimeExclude, const QStringList &filters) const
Definition: kdirlister.cpp:2391
KDirWatch::exists
static bool exists()
KDirLister
Helper class for the kiojob used to list and update a directory.
Definition: kdirlister.h:57
KDirListerCacheDirectoryData::moveListersWithoutCachedItemsJob
void moveListersWithoutCachedItemsJob(const KUrl &url)
Definition: kdirlister.cpp:2761
KDirLister::Private::settings
FilterSettings settings
Definition: kdirlister_p.h:162
KDirLister::Private::CachedItemsJob::url
KUrl url() const
Definition: kdirlister_p.h:480
KUrl::isLocalFile
bool isLocalFile() const
KDirLister::Private::CachedItemsJob
Definition: kdirlister_p.h:470
KDirLister::Private::addRefreshItem
void addRefreshItem(const KUrl &directoryUrl, const KFileItem &oldItem, const KFileItem &item)
Definition: kdirlister.cpp:2452
KDirLister::Private::FilterSettings::FilterSettings
FilterSettings()
Definition: kdirlister_p.h:155
KDirListerCache::~KDirListerCache
~KDirListerCache()
Definition: kdirlister.cpp:75
KJob
KDirListerCache::itemsForDir
KFileItemList * itemsForDir(const KUrl &dir) const
Definition: kdirlister.cpp:799
kfileitem.h
KDirLister::Private::addNewItems
void addNewItems(const KUrl &directoryUrl, const KFileItemList &items)
Definition: kdirlister.cpp:2441
QMap
Definition: netaccess.h:36
KFileItem
A KFileItem is a generic class to handle a file, local or remote.
Definition: kfileitem.h:45
QList
KDirLister::Private::url
KUrl url
Definition: kdirlister_p.h:121
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Thu Sep 5 2019 13:32:31 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.8 API Reference

Skip menu "kdelibs-4.14.8 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal