• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/project

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • project
filemanagerlistjob.h
Go to the documentation of this file.
1 /* This file is part of KDevelop
2  Copyright 2009 Radu Benea <[email protected]>
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 KDEVPLATFORM_FILEMANAGERLISTJOB_H
21 #define KDEVPLATFORM_FILEMANAGERLISTJOB_H
22 
23 #include <KIO/Job>
24 #include <QQueue>
25 #include <QSemaphore>
26 
27 // uncomment to time import jobs
28 // #define TIME_IMPORT_JOB
29 
30 #ifdef TIME_IMPORT_JOB
31 #include <QElapsedTimer>
32 #endif
33 
34 
35 namespace KDevelop
36 {
37 class ProjectFolderItem;
38 class ProjectBaseItem;
39 
40 class FileManagerListJob : public KIO::Job
41 {
42  Q_OBJECT
43 
44 public:
45  explicit FileManagerListJob(ProjectFolderItem* item);
46  virtual ~FileManagerListJob();
47 
48  void addSubDir(ProjectFolderItem* item);
49  void handleRemovedItem(ProjectBaseItem* item);
50 
51  void abort();
52  void start() override;
53 
54 Q_SIGNALS:
55  void entries(FileManagerListJob* job, ProjectFolderItem* baseItem,
56  const KIO::UDSEntryList& entries);
57  void nextJob();
58 
59 private Q_SLOTS:
60  void slotEntries(KIO::Job* job, const KIO::UDSEntryList& entriesIn );
61  void slotResult(KJob* job) override;
62  void handleResults(const KIO::UDSEntryList& entries);
63  void startNextJob();
64 
65 private:
66 
67  QQueue<ProjectFolderItem*> m_listQueue;
69  ProjectFolderItem* m_item;
70  KIO::UDSEntryList entryList;
71  // kill does not delete the job instantaneously
72  QAtomicInt m_aborted;
73  QSemaphore m_listing;
74 
75 #ifdef TIME_IMPORT_JOB
76  QElapsedTimer m_timer;
77  QElapsedTimer m_subTimer;
78  qint64 m_subWaited = 0;
79 #endif
80 };
81 
82 }
83 
84 #endif // KDEVPLATFORM_FILEMANAGERLISTJOB_H
KDevelop::ProjectFolderItem
Implementation of the ProjectBaseItem interface that is specific to a folder.
Definition: projectmodel.h:268
KDevelop::FileManagerListJob::addSubDir
void addSubDir(ProjectFolderItem *item)
Definition: filemanagerlistjob.cpp:89
KDevelop::ProjectBaseItem
Interface that allows a developer to implement the three basic types of items you would see in a mult...
Definition: projectmodel.h:101
KDevelop::FileManagerListJob::start
void start() override
Definition: filemanagerlistjob.cpp:215
KDevelop::FileManagerListJob
Definition: filemanagerlistjob.h:40
KDevelop::FileManagerListJob::entries
void entries(FileManagerListJob *job, ProjectFolderItem *baseItem, const KIO::UDSEntryList &entries)
KDevelop::FileManagerListJob::nextJob
void nextJob()
KJob
QQueue
QElapsedTimer
QAtomicInt
KDevelop::FileManagerListJob::handleRemovedItem
void handleRemovedItem(ProjectBaseItem *item)
Definition: filemanagerlistjob.cpp:97
KDevelop::FileManagerListJob::abort
void abort()
Definition: filemanagerlistjob.cpp:206
KDevelop
Definition: abstractfilemanagerplugin.h:33
KDevelop::FileManagerListJob::FileManagerListJob
FileManagerListJob(ProjectFolderItem *item)
Definition: filemanagerlistjob.cpp:62
QSemaphore
KDevelop::FileManagerListJob::~FileManagerListJob
virtual ~FileManagerListJob()
Definition: filemanagerlistjob.cpp:81
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:59 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/project

Skip menu "kdevplatform/project"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



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