rename to GenericProfiler

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-08-15 22:18:28 +03:00
parent c28d9161cf
commit fa164aa081
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
4 changed files with 16 additions and 14 deletions

View file

@ -15,30 +15,32 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "WaitProfiler.h"
#include "GenericProfiler.h"
#include "BaseInstance.h"
#include "launch/LaunchTask.h"
#include "settings/SettingsObject.h"
class WaitProfiler : public BaseProfiler {
class GenericProfiler : public BaseProfiler {
Q_OBJECT
public:
WaitProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent = 0);
GenericProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent = 0);
protected:
void beginProfilingImpl(shared_qobject_ptr<LaunchTask> process);
};
WaitProfiler::WaitProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent) : BaseProfiler(settings, instance, parent) {}
GenericProfiler::GenericProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent)
: BaseProfiler(settings, instance, parent)
{}
void WaitProfiler::beginProfilingImpl(shared_qobject_ptr<LaunchTask> process)
void GenericProfiler::beginProfilingImpl(shared_qobject_ptr<LaunchTask> process)
{
emit readyToLaunch(tr("Started process: %1").arg(process->pid()));
}
BaseExternalTool* WaitProfilerFactory::createTool(InstancePtr instance, QObject* parent)
BaseExternalTool* GenericProfilerFactory::createTool(InstancePtr instance, QObject* parent)
{
return new WaitProfiler(globalSettings, instance, parent);
return new GenericProfiler(globalSettings, instance, parent);
}
#include "WaitProfiler.moc"
#include "GenericProfiler.moc"

View file

@ -19,9 +19,9 @@
#include "BaseProfiler.h"
class WaitProfilerFactory : public BaseProfilerFactory {
class GenericProfilerFactory : public BaseProfilerFactory {
public:
QString name() const override { return "WaitProfiler"; }
QString name() const override { return "Generic"; }
void registerSettings([[maybe_unused]] SettingsObjectPtr settings) override{};
BaseExternalTool* createTool(InstancePtr instance, QObject* parent = 0) override;
bool check([[maybe_unused]] QString* error) override { return true; };