Warning, file /kdevelop/kdevelop/plugins/ninjabuilder/ninjajob.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2012 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 SPDX-FileCopyrightText: 2017 Kevin Funk <kfunk@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #ifndef NINJAJOB_H 0009 #define NINJAJOB_H 0010 0011 #include <outputview/outputexecutejob.h> 0012 0013 #include <QPointer> 0014 0015 namespace KDevelop { 0016 class ProjectBaseItem; 0017 } 0018 0019 class NinjaBuilder; 0020 0021 class QUrl; 0022 0023 class NinjaJob 0024 : public KDevelop::OutputExecuteJob 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 enum CommandType { 0030 BuildCommand, 0031 CleanCommand, 0032 CustomTargetCommand, 0033 InstallCommand 0034 }; 0035 0036 enum ErrorTypes { 0037 Correct = 0, 0038 Failed 0039 }; 0040 0041 public: 0042 NinjaJob(KDevelop::ProjectBaseItem* item, CommandType commandType, const QStringList& arguments, 0043 const QByteArray& signal, NinjaBuilder* parent); 0044 ~NinjaJob() override; 0045 0046 void setIsInstalling(bool isInstalling); 0047 static QString ninjaExecutable(); 0048 0049 KDevelop::ProjectBaseItem* item() const; 0050 CommandType commandType() const; 0051 QUrl workingDirectory() const override; 0052 QStringList privilegedExecutionCommand() const override; 0053 0054 protected Q_SLOTS: 0055 void postProcessStdout(const QStringList& lines) override; 0056 void postProcessStderr(const QStringList& lines) override; 0057 0058 private Q_SLOTS: 0059 void emitProjectBuilderSignal(KJob* job); 0060 0061 private: 0062 bool m_isInstalling; 0063 QPersistentModelIndex m_idx; 0064 CommandType m_commandType; 0065 QByteArray m_signal; 0066 QPointer<NinjaBuilder> m_plugin; 0067 0068 void appendLines(const QStringList& lines); 0069 }; 0070 0071 #endif // NINJAJOB_H