1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 19:57:45 +00:00
astra/launcher/include/processwatcher.h
Joshua Goins 2ee0606a56 Small improvements to the ProcessWatcher API
Changes the PID parameter to qint64 to be consistent with KProcessList
and QProcess. Also adds a QObject parent parameter.
2024-08-22 17:59:00 -04:00

20 lines
No EOL
397 B
C++

// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QTimer>
/// Listens and waits for a process to finish.
class ProcessWatcher : public QObject
{
Q_OBJECT
public:
explicit ProcessWatcher(qint64 PID, QObject *parent = nullptr);
Q_SIGNALS:
void finished();
private:
QTimer *m_timer = nullptr;
};