replace hardcoded url with REPO_URL macro

This commit is contained in:
uncor3
2025-11-07 19:48:52 +00:00
parent f687550471
commit d1a113987c
4 changed files with 19 additions and 9 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
#define AFC2_SERVICE_NAME "com.apple.afc2"
#define RECOVERY_CLIENT_CONNECTION_TRIES 3
#define APPLE_VENDOR_ID 0x05ac
#define REPO_URL "https://github.com/uncor3/iDescriptor"
// This is because afc_read_directory accepts "/var/mobile/Media" as "/"
#define POSSIBLE_ROOT "../../../../"
+2 -4
View File
@@ -179,10 +179,8 @@ MainWindow::MainWindow(QWidget *parent)
QIcon(":/resources/icons/MdiGithub.png"), "iDescriptor on GitHub");
githubButton->setCursor(Qt::PointingHandCursor);
githubButton->setFixedSize(24, 24);
connect(githubButton, &ZIconWidget::clicked, this, []() {
QDesktopServices::openUrl(
QUrl("https://github.com/uncor3/iDescriptor"));
});
connect(githubButton, &ZIconWidget::clicked, this,
[]() { QDesktopServices::openUrl(QUrl(REPO_URL)); });
m_connectedDeviceCountLabel = new QLabel("iDescriptor: no devices");
m_connectedDeviceCountLabel->setContentsMargins(5, 0, 5, 0);
+13
View File
@@ -18,8 +18,10 @@
*/
#include "sponsorwidget.h"
#include "iDescriptor.h" // Include for REPO_URL
#include "sponsorappcard.h"
#include <QLabel>
#include <QUrl>
#include <QVBoxLayout>
SponsorWidget::SponsorWidget(QWidget *parent) : QWidget(parent)
@@ -34,10 +36,21 @@ SponsorWidget::SponsorWidget(QWidget *parent) : QWidget(parent)
"And in order to keep it that way, we rely on donations. "
"Consider becoming a sponsor to support "
"and promote your app/brand here");
QLabel *contactDesc = new QLabel();
contactDesc->setTextFormat(Qt::RichText);
contactDesc->setOpenExternalLinks(true);
contactDesc->setText(
QString(
"You can read more about sponsorships on our "
"<a href=\"%1\" style=\"color: #2980b9;\">github repository</a>.")
.arg(REPO_URL));
sponsorDesc->setStyleSheet("font-size: 10pt;");
sponsorDesc->setWordWrap(true);
layout()->addWidget(sponsorTitle);
layout()->addWidget(sponsorDesc);
layout()->addWidget(contactDesc);
QLabel *sponsorIconLabel = new QLabel("Example:");
layout()->addWidget(sponsorIconLabel);
SponsorAppCard *card = new SponsorAppCard(this);
+3 -4
View File
@@ -20,6 +20,7 @@
#include "welcomewidget.h"
#include "diagnosewidget.h"
#include "iDescriptor-ui.h"
#include "iDescriptor.h"
#include "responsiveqlabel.h"
#include <QApplication>
#include <QDesktopServices>
@@ -75,10 +76,8 @@ void WelcomeWidget::setupUI()
m_githubLabel->setWordWrap(false);
m_githubLabel->setMaximumWidth(m_imageLabel->sizeHint().width());
m_githubLabel->setCursor(Qt::PointingHandCursor);
connect(m_githubLabel, &ZLabel::clicked, this, []() {
QDesktopServices::openUrl(
QUrl("https://github.com/uncor3/iDescriptor"));
});
connect(m_githubLabel, &ZLabel::clicked, this,
[]() { QDesktopServices::openUrl(QUrl(REPO_URL)); });
// Make it look like a link
QPalette githubPalette = m_githubLabel->palette();