Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAppimageUpdater.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Anna Medonosova <anna.medonosova@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7
8#ifndef KISAPPIMAGEUPDATER_H
9#define KISAPPIMAGEUPDATER_H
10
11#include <KisUpdaterBase.h>
12#include <QScopedPointer>
13#include <QProcess>
14
15#include <kritagitversion.h>
16
17#include "kritaui_export.h"
18
19
20class QString;
21
22class KRITAUI_EXPORT KisAppimageUpdater : public KisUpdaterBase
23{
24 Q_OBJECT
25
26public:
28 explicit KisAppimageUpdater(QString dummyUpdaterPath);
29
30 void checkForUpdate() override;
31 bool hasUpdateCapability() override;
32 void doUpdate() override;
33
34private Q_SLOTS:
35 void slotUpdateCheckFinished(int result, QProcess::ExitStatus exitStatus);
36 void slotUpdateCheckStarted();
37 void slotUpdateCheckErrorOccurred(QProcess::ProcessError error);
38
39 void slotUpdateFinished(int result, QProcess::ExitStatus exitStatus);
40 void slotUpdateErrorOccurred(QProcess::ProcessError error);
41
42 void slotAppendCheckOutput();
43 void slotAppendUpdateOutput();
44
45private:
46 void initialize(QString& updaterPath);
47
48 bool findUpdaterBinary();
52 bool m_updaterInProgress {false};
55
56 QScopedPointer<QProcess> m_checkProcess;
57 QScopedPointer<QProcess> m_updateProcess;
58};
59
60#endif // KISAPPIMAGEUPDATER_H
QScopedPointer< QProcess > m_updateProcess
QScopedPointer< QProcess > m_checkProcess
virtual void doUpdate()=0
if the updater has update capability, start the update process When the update is done,...
virtual void checkForUpdate()=0
start the process checking whether there is an update available or not When the check is done,...
virtual bool hasUpdateCapability()=0
Returns true if this updater can actually perform an update. If it can only check for new versions,...