Improve Features

Fix a bug that annotations in server list can be chosen in combobox;
Fix a bug that index page don't follow system theme;
Disable qDebug/qWarning output in Release version;
Update default server list.
This commit is contained in:
zty199 2021-04-17 00:53:26 +08:00
parent 96cd1b9918
commit d164aec86d
3 changed files with 21 additions and 3 deletions

View File

@ -25,6 +25,9 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# 禁止输出 qWarning / qDebug 信息
CONFIG(release, debug|release): DEFINES += QT_NO_WARNING_OUTPUT QT_NO_DEBUG_OUTPUT
SOURCES += main.cpp\
appitem.cpp \
downloadworker.cpp \

View File

@ -236,6 +236,13 @@ void Widget::initConfig()
while (getline(serverList,lineTmp)) {
ui->comboBox_server->addItem(QString::fromStdString(lineTmp));
}
for(int i = 0; i < ui->comboBox_server->count(); i++)
{
if(ui->comboBox_server->itemText(i) == "开发者模式 Dev only")
{
ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(i, 0), QVariant(0), Qt::UserRole - 1);
}
}
}else {
ui->comboBox_server->addItem("https://d.store.deepinos.org.cn/");
}
@ -271,8 +278,8 @@ void Widget::initConfig()
ui->webfoot->hide();
//初始化首页
ui->webEngineView->setUrl(menuUrl[0]);
// ui->webEngineView->setUrl(menuUrl[1]);
chooseLeftMenu(0);
// ui->webEngineView->setUrl(menuUrl[0]);
//给下载列表赋值到数组,方便调用
for (int i =0; i<LIST_MAX;i++){
@ -894,6 +901,14 @@ void Widget::on_pushButton_updateServer_clicked()
}
ui->pushButton_updateServer->setEnabled(true);
ui->comboBox_server->setCurrentIndex(0);
for(int i = 0; i < ui->comboBox_server->count(); i++)
{
if(ui->comboBox_server->itemText(i) == "开发者模式 Dev only")
{
ui->comboBox_server->model()->setData(ui->comboBox_server->model()->index(i, 0), QVariant(0), Qt::UserRole - 1);
}
}
});
}