File indexing completed on 2024-05-12 04:37:43

0001 /*
0002     SPDX-FileCopyrightText: 2009 David Nolden <david.nolden.kdevelop@art-master.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-only
0005 */
0006 
0007 #ifndef KDEVPLATFORM_PARSEPROJECTJOB_H
0008 #define KDEVPLATFORM_PARSEPROJECTJOB_H
0009 
0010 #include <serialization/indexedstring.h>
0011 #include <language/languageexport.h>
0012 
0013 #include <KJob>
0014 
0015 namespace KDevelop {
0016 class ReferencedTopDUContext;
0017 class IProject;
0018 class ParseProjectJobPrivate;
0019 
0020 /// A job that parses currently open files that belong to the given project, or all
0021 /// files that belong to the project if the parseAllProjectSources argument is true.
0022 class KDEVPLATFORMLANGUAGE_EXPORT ParseProjectJob
0023     : public KJob
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     explicit ParseProjectJob(KDevelop::IProject* project, bool forceUpdate = false,
0029                              bool parseAllProjectSources = false);
0030     ~ParseProjectJob() override;
0031     void start() override;
0032     bool doKill() override;
0033 
0034 private Q_SLOTS:
0035     void queueFilesToParse();
0036     void updateReady(const KDevelop::IndexedString& url, const KDevelop::ReferencedTopDUContext& topContext);
0037 
0038 private:
0039     const QScopedPointer<class ParseProjectJobPrivate> d_ptr;
0040     Q_DECLARE_PRIVATE(ParseProjectJob)
0041 };
0042 }
0043 
0044 #endif // KDEVPLATFORM_PARSEPROJECTJOB_H