14#include <QCoreApplication>
18#include <kritagitversion.h>
20#include <klocalizedstring.h>
23 : m_checkProcess(new QProcess(this))
24 , m_updateProcess(new QProcess(this))
28#if defined(KRITA_GIT_SHA1_STRING)
29 if (qEnvironmentVariableIsSet(
"KRITA_APPIMAGEUPDATER_USE_DUMMY")) {
30 updaterPath = QString(
"%1%2AppImageUpdateDummy")
31 .arg(QCoreApplication::applicationDirPath())
32 .arg(QDir::separator());
34 updaterPath = QString(
"%1%2AppImageUpdate")
35 .arg(QCoreApplication::applicationDirPath())
36 .arg(QDir::separator());
39 updaterPath = QString(
"%1%2AppImageUpdate")
40 .arg(QCoreApplication::applicationDirPath())
41 .arg(QDir::separator());
48 : m_checkProcess(new QProcess(this))
49 , m_updateProcess(new QProcess(this))
89 QString(
"KisAppimageUpdater: update check finished. Result: %1 Exit status: %2\npath: %3\noutput: %4")
98 if (exitStatus == QProcess::CrashExit) {
137 QString(
"KisAppimageUpdater: error occurred during update check: %1\npath: %2\noutput: %3")
153 QString(
"KisAppimageUpdater: update finished. Result: %1\nExit status: %2\npath: %3\noutput: %4")
162 QString statusDetails;
164 if (exitStatus == QProcess::CrashExit) {
171 statusDetails = i18n(
"New AppImage was downloaded to %1. To complete the update, close Krita and run the new AppImage.", finfoAppImagePath.path());
192 QString(
"KisAppimageUpdater: error occurred during update: %1\npath: %2\noutput: %3")
246 if (finfo.isExecutable()) {
250 QString(
"KisAppimageUpdater: AppImageUpdate (%1) was not found within the Krita appimage, or is not executable")
QList< QString > QStringList
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
bool hasUpdateCapability() override
Returns true if this updater can actually perform an update. If it can only check for new versions,...
void slotUpdateErrorOccurred(QProcess::ProcessError error)
void slotUpdateCheckFinished(int result, QProcess::ExitStatus exitStatus)
void slotAppendCheckOutput()
void doUpdate() override
if the updater has update capability, start the update process When the update is done,...
QScopedPointer< QProcess > m_updateProcess
void slotAppendUpdateOutput()
QScopedPointer< QProcess > m_checkProcess
void initialize(QString &updaterPath)
void slotUpdateCheckErrorOccurred(QProcess::ProcessError error)
void slotUpdateFinished(int result, QProcess::ExitStatus exitStatus)
void slotUpdateCheckStarted()
void checkForUpdate() override
start the process checking whether there is an update available or not When the check is done,...
KisUpdaterStatus m_updaterStatus
void sigUpdateCheckStateChange(KisUpdaterStatus)
void setStatus(const UpdaterStatus::StatusID &status)
void setDetails(const QString &details)
void setUpdaterOutput(const QString &updaterOutput)
static void log(const QString &message)
Logs with date/time.