解决兼容性问题

This commit is contained in:
Mike Solar
2023-08-21 15:10:19 +08:00
parent 5ec58b3bfb
commit 9ee232cead
9 changed files with 110 additions and 55 deletions

View File

@ -155,8 +155,8 @@ void NavBar::getLogoFromInternet(ConfigResponse *configResponse) {
timer.stop();
buffer = new QByteArray;
delete request_logo;
reply->close();
if (downloadSuccess == true) {
if (downloadSuccess == true&& reply->error() == QNetworkReply::NoError) {
*buffer = reply->readAll();
QFile logo(QApplication::applicationDirPath() + DEFAULT_LOGO);
if (logo.open(QIODevice::WriteOnly)) {
@ -164,10 +164,11 @@ void NavBar::getLogoFromInternet(ConfigResponse *configResponse) {
logo.close();
}
buffer->clear();
reply->close();
}
delete manager;
manager = nullptr;
}
void NavBar::storeToBuffer() {
buffer = new QByteArray;