diff --git a/src/Method.cpp b/src/Method.cpp index d6b20615a51..6798cb39301 100644 --- a/src/Method.cpp +++ b/src/Method.cpp @@ -31,6 +31,14 @@ Method::Method(QWidget* parent) : QMainWindow(parent) { managerDownLoad = new QNetworkAccessManager(this); myfile = new QFile(this); tempDir = QDir::homePath() + "/tempocat/"; + + errorInfo = tr("Possible reasons:") + "\n\n" + tr("1.Network or URL error!") + + "\n\n" + + tr("2.The Github API is not accessed by token.(A limit of 60 " + "visits per hour). ") + + "\n\n" + + tr("3.Access the Github API via a token, but the token has a " + "problem (expired or incorrect)."); } QStringList Method::getDLUrlList(QString url) { @@ -146,11 +154,7 @@ QString Method::getHTMLSource(QString URLSTR, bool writeFile) { QString code = reply->readAll(); if (code == "") { mw_one->dlgSyncOC->on_btnStop_clicked(); - QMessageBox::critical( - this, "", - tr("Network or URL error!") + "\n\n" + - tr("Or if the GitHub API has reached the number of accesses per " - "hour (typically 60 per hour), please try again later.")); + QMessageBox::critical(this, "", errorInfo); return ""; } @@ -306,7 +310,8 @@ void Method::kextUpdate() { } reGetUrl = true; if (reGetUrl) { - if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked()) + if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked() || + mw_one->myDlgPreference->ui->rbtnToken->isChecked()) getLastReleaseFromUrl(test); if (mw_one->myDlgPreference->ui->rbtnWeb->isChecked()) getLastReleaseFromHtml(test + "/releases"); @@ -380,7 +385,8 @@ void Method::downloadAllKexts() { } reGetUrl = true; if (reGetUrl) { - if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked()) + if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked() || + mw_one->myDlgPreference->ui->rbtnToken->isChecked()) getLastReleaseFromUrl(test); if (mw_one->myDlgPreference->ui->rbtnWeb->isChecked()) getLastReleaseFromHtml(test + "/releases"); @@ -760,6 +766,16 @@ void Method::getLastReleaseFromUrl(QString strUrl) { QNetworkRequest quest; quest.setUrl(QUrl(strAPI)); quest.setHeader(QNetworkRequest::UserAgentHeader, "RT-Thread ART"); + + if (mw_one->myDlgPreference->ui->rbtnToken->isChecked()) { + QString strToken = mw_one->myDlgPreference->ui->editToken->text().trimmed(); + if (strToken != "") { + quest.setRawHeader("Authorization", + QString("token %1").arg(strToken).toUtf8()); + qDebug() << "strAPI=" << strAPI; + } + } + manager->get(quest); } @@ -775,11 +791,7 @@ void Method::parse_UpdateJSON(QString str) { if (err_rpt.error != QJsonParseError::NoError) { mw_one->dlgSyncOC->on_btnStop_clicked(); - QMessageBox::critical( - this, "", - tr("Network or URL error!") + "\n\n" + - tr("Or if the GitHub API has reached the number of accesses per " - "hour (typically 60 per hour), please try again later.")); + QMessageBox::critical(this, "", errorInfo); return; } @@ -827,11 +839,7 @@ void Method::parse_UpdateJSON(QString str) { qDebug() << strDLInfoList.at(0) << strDLInfoList.at(1); if (strDLUrl == "") { mw_one->dlgSyncOC->on_btnStop_clicked(); - QMessageBox::critical( - this, "", - tr("Network or URL error!") + "\n\n" + - tr("Or if the GitHub API has reached the number of accesses per " - "hour (typically 60 per hour), please try again later.")); + QMessageBox::critical(this, "", errorInfo); return; } diff --git a/src/Method.h b/src/Method.h index ea437d3c77d..39cc406ddfc 100644 --- a/src/Method.h +++ b/src/Method.h @@ -151,9 +151,11 @@ class Method : public QMainWindow { void replyFinished(QNetworkReply *reply); void Quit(); -private: + + private: QElapsedTimer downloadTimer; void cancelDownload(); + QString errorInfo; signals: private slots: diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp index 7568c7a4fd5..cc54e878565 100644 --- a/src/aboutdialog.cpp +++ b/src/aboutdialog.cpp @@ -7,7 +7,7 @@ extern MainWindow* mw_one; extern QString strAppName, strIniFile; -QString CurVersion = "20240003"; +QString CurVersion = "20240004"; QString ocVer = "0.8.8"; QString ocVerDev = "0.8.9"; QString ocFrom, ocFromDev, strOCFrom, strOCFromDev; diff --git a/src/cn.qm b/src/cn.qm index add8f9b3aa4..7f57bc6b5d6 100644 Binary files a/src/cn.qm and b/src/cn.qm differ diff --git a/src/cn.ts b/src/cn.ts index 606bf7da057..64e1246b56f 100644 --- a/src/cn.ts +++ b/src/cn.ts @@ -62,7 +62,7 @@ - + Save 保存-Save 保存 @@ -127,9 +127,9 @@ - - - + + + Delete 删除条目-Delete Delete @@ -140,10 +140,10 @@ - - - - + + + + Add Add 增加 @@ -152,22 +152,22 @@ - - - + + + Patch 补丁-Patch Patch 补丁 - + Booter 启动设置-Booter Booter 引导器 - + ACPI ACPI 电源管理 @@ -178,7 +178,7 @@ - + MmioWhitelist 内存映射白名单-MmioWhitelist MmioWhitelist @@ -360,20 +360,20 @@ Mmio白名单 - + DeviceProperties 设备属性配置-DeviceProperties DeviceProperties 设备属性 - + Kernel 内核设置-Kernel Kernel 内核 - + Block 阻止-Block Block @@ -381,7 +381,7 @@ Mmio白名单 - + Force 强制-Force Force @@ -389,7 +389,7 @@ Mmio白名单 - + Emulate Quirks + Emulate Emulate @@ -430,10 +430,10 @@ Mmio白名单 - - + - + + Quirks Quirks 选项 @@ -599,7 +599,7 @@ Mmio白名单 - + Scheme Scheme 老旧系统方案 @@ -636,7 +636,7 @@ Mmio白名单 - + Boot Boot-引导 Boot @@ -745,7 +745,7 @@ Mmio白名单 - + Debug Debug-调试 Debug @@ -832,7 +832,7 @@ Mmio白名单 - + Security Security-安全 Security @@ -941,28 +941,28 @@ Mmio白名单 - + BlessOverride BlessOverride 定制引导加载程序 - + Entries Entries 添加启动项 - + Tools Tools-工具 Tools 工具 - + NVRAM NVRAM 变量 @@ -998,14 +998,14 @@ Mmio白名单 - + LegacySchema LegacySchema-传统BIOS LegacySchema 传统BIOS - + PlatformInfo 机型配置-PlatformInfo PlatformInfo 机型 @@ -1174,7 +1174,7 @@ Console logging prints less than all the other variants. Depending on the build - + Generic Generic 通用 @@ -1316,7 +1316,7 @@ Console logging prints less than all the other variants. Depending on the build - + DataHub DataHub 数据Hub @@ -1512,7 +1512,7 @@ This works around patched tables becoming incompatible with the SLIC table causi - + Preset 预置 @@ -1630,7 +1630,7 @@ Unsupported platforms including Atom and AMD require modified versions of XNU ke - + Add boot-args 添加引导参数 @@ -1680,7 +1680,7 @@ Unsupported platforms including Atom and AMD require modified versions of XNU ke - + Memory Memory 自定义内存 @@ -1724,7 +1724,7 @@ Unsupported platforms including Atom and AMD require modified versions of XNU ke - + PlatformNVRAM PlatformNVRAM 平台NVRAM @@ -1953,7 +1953,7 @@ Note 2 : While this quirk can increase GPU PCI BAR sizes, this will not work on OpenCore 开发版 - + Preferences 偏好设置 @@ -2109,7 +2109,7 @@ Description: Enable AVX vector acceleration of SHA-512 and SHA-384 hashing algor - + Search 搜索 @@ -2184,7 +2184,7 @@ trim. - + SMBIOS SMBIOS 系统管理BIOS @@ -2552,7 +2552,7 @@ trim. - + Serial Serial 串行 @@ -2689,14 +2689,14 @@ trim. - - + + Select date 选择日期 - + AppleInput AppleInput Apple输入 @@ -2708,7 +2708,7 @@ Apple输入 - + Unload Unload 卸载 @@ -3121,7 +3121,7 @@ Note: This value should be disabled on most types of firmware but is left config - + Audio Audio设置-Audio Audio @@ -3174,7 +3174,7 @@ Note: This value should be disabled on most types of firmware but is left config - + Drivers UEFI驱动-Drivers Drivers @@ -3208,7 +3208,7 @@ Note: This value should be disabled on most types of firmware but is left config - + Input 键盘设置-Input Input @@ -3392,7 +3392,7 @@ Note: This value should be disabled on most types of firmware but is left config - + ProtocolOverrides 协议覆盖-ProtocolOverrides ProtocolOverrides @@ -3534,7 +3534,7 @@ Note: This value should be disabled on most types of firmware but is left config - + Misc Misc 杂项 @@ -3785,13 +3785,13 @@ A continuously updated variable list can be found in a corresponding document: N - + UEFI UEFI 固件接口 - + APFS APFS 文件系统 @@ -3831,7 +3831,7 @@ A continuously updated variable list can be found in a corresponding document: N - + Output Output 输出 @@ -3890,7 +3890,7 @@ A continuously updated variable list can be found in a corresponding document: N - + ReservedMemory 保留内存-ReservedMemory ReservedMemory @@ -3970,7 +3970,7 @@ A continuously updated variable list can be found in a corresponding document: N - + Hardware Information 硬件信息 @@ -3992,27 +3992,27 @@ A continuously updated variable list can be found in a corresponding document: N - - - - - - - - + + + + + + + + Export 导出 - - - - - - - - + + + + + + + + Import 导入 @@ -4070,39 +4070,39 @@ A continuously updated variable list can be found in a corresponding document: N 重新保存 - + Copy 拷贝 - + Cut 剪切 - + Paste 粘贴 - + Select All 全选 - + true or false - + SerialInfo SerialInfo 序列号信息 - + Auto Column Width 自动列宽度 @@ -4115,42 +4115,42 @@ A continuously updated variable list can be found in a corresponding document: N 错误 - - + + This is not a valid Clover configuration file. 这不是一个有效的Clover配置文件。 - + You cannot add a new key field to a page where a data table exists. 不能在存在数据表的页面上添加一个新的键字段。 - + Add Item 增加条目 - + Delete Item 删除条目 - + Move Up 上移 - + Move Down 下移 - + Browse Database 浏览数据库 @@ -4174,311 +4174,311 @@ A continuously updated variable list can be found in a corresponding document: N 开发版数据库不存在,请在“升级OpenCore和Kexts”UI中在线更新它。 - + Application - + CpuName CPU名称 - + CpuId CPU ID - + CpuCoresNum CPU核心数量 - + CpuCpuLogicalProcessorsNum CPU逻辑处理器数量 - + MainboardName 主板名称 - + BaseBordNum 主板序列号 - + MainboardUUID 主板UUID - + BiosNum BIOS序列号 - + MainboardVendor 主板供应商 - + DiskNum 磁盘序列号 - + Physical Memory 物理内存 - + CPU CPU - + ctrl+o - + Recently Open 最近打开 - + ctrl+s - + ctrl+shift+s - + ctrl+m - + Open backup directory 打开备份目录 - + ASCII - - + + Hide 隐藏 - + ctrl+l - + ctrl+p ctrl+h - + ctrl+u - + ctrl+d - + The document has been modified. 文件已修改。 - + Do you want to save your changes? 是否保存? - + Discard 不保存 - + Open Recent... 最近打开... - + Command List 命令列表 - - + + Undo &Undo 撤消 - - + + Redo &Redo 恢复 - + Clear search history 清除搜索历史记录 - + ctrl+f - + ctrl+3 - + ctrl+4 - - + + Integer 整数 - - - + + + Hexadecimal 十六进制 - - - - - - - - + + + + + + + + CopyText 复制文本 - - - + + + Show Tips 显示提示 - + Load - + Network error! 网络错误! - + New version detected! 检测到新版本! - + Version: 版本: - + Published at: 更新时间: - + Release Notes: 更新说明: - - + + Download 下载 - + There is a new version 有新版本 - + Cut Line 剪切行 - + Copy Line 复制行 - + Paste Line 粘贴行 - - - + + + Cancel 取消 - + Copy Line to Text 复制行到文本 - + Intel CPU configuration template Intel CPU 配置文件模板 - + OK ! 验证通过! - + There is a issue with the configuration file. 配置文件有问题 - + You are currently using the latest version! It is currently the latest version! 您目前使用的是最新版本! @@ -4487,124 +4487,138 @@ A continuously updated variable list can be found in a corresponding document: N Method - + Download Progress 下载进度 - - - Network or URL error! Network error! - 网络或网址错误! + 网络或网址错误! - - + + OpenCore Database has been successfully updated to OpenCore数据库已成功更新到 - - + + No update is currently available, or please check the update source for the OpenCore development version. 目前没有更新可用,或者请检查OpenCore开发版的更新源。 - - - Or if the GitHub API has reached the number of accesses per hour (typically 60 per hour), please try again later. - 或者GitHub API已达到每小时的访问次数(一般情况下每小时60次),请稍后再试。 + 或者GitHub API已达到每小时的访问次数(一般情况下每小时60次),请稍后再试。 + + + + Possible reasons: + 可能的原因: - + + 1.Network or URL error! + 1.网络或网址错误! + + + + 2.The Github API is not accessed by token.(A limit of 60 visits per hour). + 2.没有通过令牌访问Github API。(存在每小时60次的访问限制) + + + + 3.Access the Github API via a token, but the token has a problem (expired or incorrect). + 3.通过令牌访问Github API,但令牌有问题(过期或错误)。 + + + Warning 提醒 - + File creation failed! 文件创建失败! - + Or if you are in a region that does not have direct access to GitHub, please select the mirror server in Preferences and try again. 或者您所在的区域不能直接访问GitHub,请在“偏好设置”中选择镜像服务器再试。 - + Note: This version or update source does not contain Mac related files. This will affect the use of the APP under Mac. 注意:这个版本或更新源不包含Mac的相关文件。这将影响APP在Mac下的使用。 - + Note: This version or update source does not contain Windows related files. This will affect the use of the APP under Windows. 注意:这个版本或更新源不包含Windows的相关文件。这将影响APP在Windows下的使用。 - + Note: This version or update source does not contain Linux related files. This will affect the use of the APP under Linux. 注意:这个版本或更新源不包含Linux的相关文件。这将影响APP在Linux下的使用。 - + Cannot read file %1: %2. - + None - + From 来自 - - + + Finished generating the EFI folder on the desktop. 已完成在桌面上生成EFI文件夹。 - + The following files do not exist in the database at the moment, please add them yourself: 下面的文件在数据库中目前不存在,请自行添加: - + Save File 保存文件 - - + + Config file(*.plist);;All files(*.*) - + Open File 打开文件 - + Cannot write file %1: %2. - + Cannot open file %1 for writing: %2. - + The EFI directory is incomplete and the backup cannot be completed. Please check if the [EFI/OC] and [EFI/OC/Drivers] directories exist? EFI目录不完整,无法完成备份。请检查“EFI/OC”和“EFI/OC/Drivers”目录是否存在? @@ -4612,55 +4626,55 @@ A continuously updated variable list can be found in a corresponding document: N QInstaller - + bytes - + KiB - + MiB - + GiB - + TiB - + PiB - + EiB - + ZiB - + YiB @@ -4834,7 +4848,7 @@ A continuously updated variable list can be found in a corresponding document: N - + Get OpenCore 获取 OpenCore @@ -4870,7 +4884,7 @@ A continuously updated variable list can be found in a corresponding document: N - + Kexts update check or OpenCore database upgrade is in progress, please wait for it to finish. Kexts更新检查或者OpenCore数据库升级正在进行中,请等待它结束。 @@ -4898,7 +4912,7 @@ A continuously updated variable list can be found in a corresponding document: N OpenCore数据库升级正在进行中,请等待它结束。 - + Please wait while we get the download information of Kexts development version... 正在获取Kexts开发版的下载信息,请稍等... @@ -4915,16 +4929,16 @@ A continuously updated variable list can be found in a corresponding document: N - - + + Source 来源 - - + + Latest Version 最新版 @@ -5499,82 +5513,96 @@ A continuously updated variable list can be found in a corresponding document: N Network 网络 + + + Access the GitHub API using a Token (A limit of 5000 visits per hour). + Access the Github API using a Token (A limit of 5000 visits per hour). + 通过令牌访问Github API(每小时最多5000次) + + Your personal access tokens : + 你的个人访问令牌: + + + HTTP && HTTPS Proxy 网页代理 - + Host Name 代理服务器 - + 127.0.0.1 - + Port 端口 - + 38457 - - + + https://github.com/ - + + https://gh.llkk.cc/https://github.com/ + + + + https://gh.flyinbug.top/gh/https://github.com/ - + https://download.fastgit.org/ - + https://ghproxy.com/https://github.com/ - + https://gh.api.99988866.xyz/https://github.com/ - - + + https://github.moeyy.xyz/https://github.com/ + + + + + https://mirror.ghproxy.com/https://github.com/ + + + + + Testing 测试 - + Use TAB Indent 使用TAB缩进 - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css"> -p, li { white-space: pre-wrap; } -hr { height: 1px; border-width: 0; } -li.unchecked::marker { content: "\2610"; } -li.checked::marker { content: "\2612"; } -</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'SimSun'; font-size:9pt;"><br /></p></body></html> - - - - + Find 查找 @@ -5585,11 +5613,12 @@ li.checked::marker { content: "\2612"; } - Accessing the GitHub API (There is a limit to the number of visits per hour) - 访问GitHub API (有每小时访问次数限制) + Accessing the GitHub API (A limit of 60 visits per hour). + Accessing the GitHub API (There is a limit to the number of visits per hour) + 访问GitHub API (每小时最多60次) - + Crawl web source code (No limit on the number of visits) 爬取网页源代码 (无访问次数限制) @@ -5598,122 +5627,134 @@ li.checked::marker { content: "\2612"; } 智能适应OpenCore的升级 - + Select the mirror server for web access 选择网页访问的镜像服务器 - + Select the mirror server for upgrade download 选择升级下载的镜像服务器 - + https://hub.fastgit.org/ - + Additional Options 附加选项 - + Automatically open the last opened file 自动打开上次打开的文件 - + Show all volume names when mounting ESP 挂载ESP时显示所有的卷标名称 - + https://archive.fastgit.org/ - + UI Appearance (effective after the next app opening) UI外观(下次打开APP时生效) - + Toolbar button 工具栏按钮 - + Recently Open 最近打开 - + Browse Catalog 浏览目录 - + Mount ESP 挂载ESP - + Backup EFI 备份EFI - + Database 数据库 - + Hide Toolbar 隐藏工具栏 - + Hover Tips 悬浮提示 - + Kext Upgrade URL Kext升级网址 - + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css"> +p, li { white-space: pre-wrap; } +hr { height: 1px; border-width: 0; } +li.unchecked::marker { content: "\2610"; } +li.checked::marker { content: "\2612"; } +</style></head><body style=" font-family:'Microsoft YaHei UI'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'SimSun';"><br /></p></body></html> + + + + Download Kexts to the user database 下载所有的Kext到用户数据库 - + + - + Kext Name Kext名称 - + Source URL 网址 - + - - + Stop 停止 - + Open URL in browser 打开网址 diff --git a/src/dlgpreference.cpp b/src/dlgpreference.cpp index 1aeb378d836..c5180cb285d 100644 --- a/src/dlgpreference.cpp +++ b/src/dlgpreference.cpp @@ -48,6 +48,9 @@ dlgPreference::dlgPreference(QWidget *parent) Reg.value("Web", "https://github.com/").toString()); ui->rbtnAPI->setChecked(Reg.value("rbtnAPI").toBool()); ui->rbtnWeb->setChecked(Reg.value("rbtnWeb").toBool()); + ui->rbtnToken->setChecked(Reg.value("rbtnToken").toBool()); + ui->editToken->setText(Reg.value("editToken").toString()); + ui->chkBoxLastFile->setChecked(Reg.value("LastFile").toBool()); ui->chkShowVolName->setChecked(Reg.value("ShowVolName", 0).toBool()); @@ -80,6 +83,11 @@ void dlgPreference::closeEvent(QCloseEvent *event) { Reg.setValue("Port", ui->txtPort->text().trimmed()); Reg.setValue("HoverTips", ui->chkHoverTips->isChecked()); Reg.setValue("TabIndent", ui->chkTabIndent->isChecked()); + + Reg.setValue("rbtnAPI", ui->rbtnAPI->isChecked()); + Reg.setValue("rbtnWeb", ui->rbtnWeb->isChecked()); + Reg.setValue("rbtnToken", ui->rbtnToken->isChecked()); + Reg.setValue("editToken", ui->editToken->text()); } void dlgPreference::keyPressEvent(QKeyEvent *event) { @@ -211,10 +219,14 @@ void dlgPreference::on_rbtnAPI_clicked() { QSettings Reg(strIniFile, QSettings::IniFormat); Reg.setValue("rbtnAPI", ui->rbtnAPI->isChecked()); Reg.setValue("rbtnWeb", ui->rbtnWeb->isChecked()); + Reg.setValue("rbtnToken", ui->rbtnToken->isChecked()); + Reg.setValue("editToken", ui->editToken->text()); } void dlgPreference::on_rbtnWeb_clicked() { on_rbtnAPI_clicked(); } +void dlgPreference::on_rbtnToken_clicked() { on_rbtnAPI_clicked(); } + void dlgPreference::on_btnTest_clicked() { mw_one->on_actionOnline_Download_Updates_triggered(); mw_one->dlgAutoUpdate->ui->btnStartUpdate->setHidden(true); diff --git a/src/dlgpreference.h b/src/dlgpreference.h index eb49e84dbc3..373c62d65c6 100644 --- a/src/dlgpreference.h +++ b/src/dlgpreference.h @@ -64,6 +64,7 @@ class dlgPreference : public QDialog { void on_tableKextUrl_itemChanged(QTableWidgetItem *item); void on_myeditFind_returnPressed(); + void on_rbtnToken_clicked(); }; #endif // DLGPREFERENCE_H diff --git a/src/dlgpreference.ui b/src/dlgpreference.ui index f70c372ec5d..bd7281f3f85 100644 --- a/src/dlgpreference.ui +++ b/src/dlgpreference.ui @@ -38,25 +38,46 @@ The way to get the download link for Kext upgrade - - + + - Accessing the GitHub API (There is a limit to the number of visits per hour) + Accessing the GitHub API (A limit of 60 visits per hour). true - + + + + + + Access the GitHub API using a Token (A limit of 5000 visits per hour). + + + + + + + Your personal access tokens : + + + + + + + + + Crawl web source code (No limit on the number of visits) - + diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c1ea278c588..cde455319be 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -8920,8 +8920,6 @@ void MainWindow::on_actionQuit_triggered() { this->close(); } void MainWindow::on_actionUpgrade_OC_triggered() { dlgSyncOC->init_Sync_OC_Table(); dlgSyncOC->resizeWindowsPos(); - - myDlgPreference->ui->rbtnAPI->click(); } void MainWindow::initColorValue() { diff --git a/src/syncocdialog.cpp b/src/syncocdialog.cpp index 73e68fb5054..cd583337d17 100644 --- a/src/syncocdialog.cpp +++ b/src/syncocdialog.cpp @@ -869,7 +869,8 @@ void SyncOCDialog::on_btnGetOC_clicked() { QString url = getKextDevDL(bufferJson, "OpenCorePkg"); mymethod->startDownload(url); } else { - if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked()) + if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked() || + mw_one->myDlgPreference->ui->rbtnToken->isChecked()) mymethod->getLastReleaseFromUrl(DevSource); if (mw_one->myDlgPreference->ui->rbtnWeb->isChecked()) mymethod->getLastReleaseFromHtml(DevSource + "/releases"); @@ -878,7 +879,8 @@ void SyncOCDialog::on_btnGetOC_clicked() { } else { if (ui->comboOCVersions->currentText() == tr("Latest Version")) { QString ocUrl = "https://github.com/acidanthera/OpenCorePkg"; - if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked()) + if (mw_one->myDlgPreference->ui->rbtnAPI->isChecked() || + mw_one->myDlgPreference->ui->rbtnToken->isChecked()) mymethod->getLastReleaseFromUrl(ocUrl); if (mw_one->myDlgPreference->ui->rbtnWeb->isChecked()) mymethod->getLastReleaseFromHtml(ocUrl + "/releases"); diff --git a/src/syncocdialog.ui b/src/syncocdialog.ui index faf8c00eaee..e2f0c8f51f2 100644 --- a/src/syncocdialog.ui +++ b/src/syncocdialog.ui @@ -31,7 +31,7 @@ DLInfo - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -46,10 +46,10 @@ - QFrame::NoFrame + QFrame::Shape::NoFrame - QFrame::Plain + QFrame::Shadow::Plain @@ -116,7 +116,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -149,7 +149,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -169,7 +169,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -195,7 +195,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -221,7 +221,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -248,16 +248,16 @@ - Qt::StrongFocus + Qt::FocusPolicy::StrongFocus - QFrame::NoFrame + QFrame::Shape::NoFrame - QFrame::Plain + QFrame::Shadow::Plain - Qt::ScrollBarAlwaysOn + Qt::ScrollBarPolicy::ScrollBarAlwaysOn @@ -266,7 +266,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -301,10 +301,10 @@ - QFrame::NoFrame + QFrame::Shape::NoFrame - QFrame::Plain + QFrame::Shadow::Plain @@ -338,11 +338,6 @@ https://github.com/dortania/build-repo - - - https://github.com/bugprogrammer/HackinPlugins - - https://github.com/wjz304/OpenCore_NO_ACPI_Build