mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 12:52:04 +08:00
fix:商店更换线路的选项无效,点击刷新线路之后未默认选中首位
This commit is contained in:
@@ -6,7 +6,11 @@ QString SparkAPI::serverUrl = "";
|
||||
|
||||
SparkAPI::SparkAPI(QObject *parent) : QObject(parent)
|
||||
{
|
||||
SparkAPI::serverUrl = "https://cdn.d.store.deepinos.org.cn/";
|
||||
QSettings readConfig(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
|
||||
if(!readConfig.value("server/choose").toString().isEmpty() && readConfig.value("server/updated").toString() == "TRUE")
|
||||
{
|
||||
SparkAPI::setServerUrl(readConfig.value("server/choose").toString());
|
||||
}
|
||||
}
|
||||
void SparkAPI::get(QUrl url)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
#include <QJsonArray>
|
||||
#include <QJsonParseError>
|
||||
#include "utils/httprequest.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QDir>
|
||||
class SparkAPI : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user