2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2014-04-17 12:47:38 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2014-04-17 12:47:38 +02:00
|
|
|
|
2019-01-08 16:05:57 +01:00
|
|
|
#include "core_global.h"
|
2014-04-17 12:47:38 +02:00
|
|
|
|
2021-08-17 13:37:20 +02:00
|
|
|
#include <utils/filepath.h>
|
2014-04-17 12:47:38 +02:00
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
|
|
|
|
|
class CORE_EXPORT PatchTool
|
|
|
|
|
{
|
|
|
|
|
public:
|
2021-08-17 13:37:20 +02:00
|
|
|
static Utils::FilePath patchCommand();
|
|
|
|
|
static void setPatchCommand(const Utils::FilePath &newCommand);
|
2014-04-17 12:47:38 +02:00
|
|
|
|
|
|
|
|
// Utility to run the 'patch' command
|
2021-08-17 13:37:20 +02:00
|
|
|
static bool runPatch(const QByteArray &input, const Utils::FilePath &workingDirectory = {},
|
2014-04-17 12:47:38 +02:00
|
|
|
int strip = 0, bool reverse = false);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Core
|