File indexing completed on 2024-04-28 04:38:54
0001 /* 0002 SPDX-FileCopyrightText: 2017 Anton Anikin <anton.anikin@htower.ru> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <interfaces/istatus.h> 0010 #include <outputview/outputexecutejob.h> 0011 0012 class IExecutePlugin; 0013 namespace KDevelop { class ILaunchConfiguration; } 0014 0015 namespace Heaptrack 0016 { 0017 0018 class Job : public KDevelop::OutputExecuteJob, public KDevelop::IStatus 0019 { 0020 Q_OBJECT 0021 Q_INTERFACES(KDevelop::IStatus) 0022 0023 public: 0024 Job(KDevelop::ILaunchConfiguration* launchConfig, IExecutePlugin* executePlugin); 0025 explicit Job(long int pid); 0026 ~Job() override; 0027 0028 void start() override; 0029 0030 QString statusName() const override; 0031 QString resultsFile() const; 0032 0033 Q_SIGNALS: 0034 void clearMessage(KDevelop::IStatus*) override; 0035 void hideProgress(KDevelop::IStatus*) override; 0036 void showErrorMessage(const QString& message, int timeout) override; 0037 void showMessage(KDevelop::IStatus*, const QString& message, int timeout = 0) override; 0038 void showProgress(KDevelop::IStatus*, int minimum, int maximum, int value) override; 0039 0040 protected: 0041 void setup(); 0042 void postProcessStdout(const QStringList& lines) override; 0043 0044 long int m_pid; 0045 QString m_analyzedExecutable; 0046 QString m_resultsFile; 0047 }; 0048 0049 }