新增了配置的保存,以及第一次打开程序时安装默认配置

This commit is contained in:
RigoLigoRLC
2022-02-04 23:27:37 +08:00
parent aa22cd7ff2
commit af40213c5a
7 changed files with 90 additions and 33 deletions

View File

@@ -22,7 +22,7 @@ namespace SpkUi
SpkDownloadMgr *mDownloadMgr;
QMap<uint, SpkDownloadEntry*> mEntries;
uint mNextDownloadId;
QQueue<QPair<int, QString>> mWaitingDownloads;
QQueue<QPair<uint, QString>> mWaitingDownloads;
enum { Idle, Waiting, Downloading } mCurrentStatus;
// UI

View File

@@ -37,6 +37,8 @@ class SpkConfig : public QObject
QVariant ReadField(QString key, QVariant defaultValue);
// Wrapper of QSettings::setValue, used for "set and restart to take effect" configurations
void SetSettings(QString key, QVariant value);
// Wrapper of QSettings::sync
void Sync();
private:
QSettings mSettings;