From 6683b925aacf101ebd388973c6dd5db58e052704 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 28 Jun 2024 10:03:10 +0200 Subject: [PATCH] Fix: remove hard-coded path to gitea repository (mimbach). --- UpdatePTUDevCtrl/git/git_client.cpp | 5 +++-- UpdatePTUDevCtrl/git/git_client.h | 3 ++- UpdatePTUDevCtrl/worker.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/UpdatePTUDevCtrl/git/git_client.cpp b/UpdatePTUDevCtrl/git/git_client.cpp index f4a8971..a3cd5a5 100644 --- a/UpdatePTUDevCtrl/git/git_client.cpp +++ b/UpdatePTUDevCtrl/git/git_client.cpp @@ -9,14 +9,15 @@ #include -GitClient::GitClient(QString const &customerNrStr, +GitClient::GitClient(QString const &customerRepositoryPath, + QString const &customerNrStr, QString const &customerRepository, QString const &workingDirectory, QString const &branchName, QObject *parent) : QObject(parent) , m_worker(qobject_cast(parent)) - , m_repositoryPath(QString("https://git.mimbach49.de/GerhardHoffmann/%1.git").arg(customerNrStr)) + , m_repositoryPath(customerRepositoryPath) , m_customerNr(customerNrStr) , m_workingDirectory(workingDirectory) , m_branchName(branchName) diff --git a/UpdatePTUDevCtrl/git/git_client.h b/UpdatePTUDevCtrl/git/git_client.h index a8acffc..31e5001 100644 --- a/UpdatePTUDevCtrl/git/git_client.h +++ b/UpdatePTUDevCtrl/git/git_client.h @@ -22,7 +22,8 @@ class GitClient : public QObject { bool copyGitConfigFromMaster(); public: - explicit GitClient(QString const &customerNrStr, + explicit GitClient(QString const &customerRepositoryUrl, + QString const &customerNrStr, QString const &repositoryPath, QString const &workingDirectory = QCoreApplication::applicationDirPath(), QString const &branchName = "master", diff --git a/UpdatePTUDevCtrl/worker.cpp b/UpdatePTUDevCtrl/worker.cpp index af115cd..dacf4c6 100644 --- a/UpdatePTUDevCtrl/worker.cpp +++ b/UpdatePTUDevCtrl/worker.cpp @@ -157,7 +157,7 @@ Worker::Worker(int customerNr, , m_parent(parent) , m_serialInterface(serialInterface) , m_baudrate(baudrate) - , m_gc(m_customerNrStr, m_customerRepository, m_workingDirectory, m_branchName, this) + , m_gc(m_customerRepositoryPath, m_customerNrStr, m_customerRepository, m_workingDirectory, m_branchName, this) , m_versionInfo(QStringList()) , m_osVersion(getOsVersion()) , m_atbqtVersion(getATBQTVersion())