哦我的上帝啊这东西是什么时候加的我都不记得了这个坑啊

Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
shenmo 2024-04-10 03:01:40 +00:00 committed by Gitee
parent ffac75eab7
commit bad522e40a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -9,7 +9,7 @@
#define TMP_PATH "/tmp/spark-store"
#define DEFAULT_SERVER_URL "https://cdn.d.store.deepinos.org.cn/"
#define DEFAULT_CHECK_DOMAIN "deepinos"
bool SettingsPage::needUncompatibleNotification = true;
bool SettingsPage::isdownload = false;
@ -57,10 +57,7 @@ void SettingsPage::readServerList()
// 创建 QTextStream 对象
QTextStream textStream(&file);
if (!textStream.readAll().contains(DEFAULT_CHECK_DOMAIN)) // 校验配置文件有效性
{
return;
}
textStream.seek(0); // 回到开头
QString lineData = textStream.readLine(); // 读取文件的第一行
ui->comboBox_server->addItem(lineData);