diff --git a/src/appitem.cpp b/src/appitem.cpp index a004fed..85afa3a 100644 --- a/src/appitem.cpp +++ b/src/appitem.cpp @@ -78,12 +78,12 @@ void AppItem::downloadIcon(QString icon) reqManager->deleteLater(); QPixmap pixmap; pixmap.loadFromData(reply->readAll()); - qDebug() << "图标下载完毕:" << pixmap; - qDebug() << icon << "响应有报错吗?" << reply->errorString(); pixmap = pixmap.scaled(78, 78, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); if (reply->error() == QNetworkReply::NoError) { QMetaObject::invokeMethod(this, "loadIcon", Qt::QueuedConnection, Q_ARG(QPixmap, pixmap)); + } else { + qDebug() << reply->errorString(); } }); } diff --git a/src/appitem.h b/src/appitem.h index f7b2e56..3aa0f82 100644 --- a/src/appitem.h +++ b/src/appitem.h @@ -37,7 +37,6 @@ private: QString m_title; QString m_description; QString m_icon; - QString m_pkgname; QString m_url; }; diff --git a/src/widget.cpp b/src/widget.cpp index 6057a53..2a77181 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -727,7 +727,7 @@ void Widget::searchApp(QString text) // ui->stackedWidget->setCurrentIndex(0); // 关键字搜索处理 - httpClient->get("http://spark-store-api.metanoia1989.com/appinfo/search") + httpClient->get("http://search.deepinos.org.cn/appinfo/search") .header("content-type", "application/json") .queryParam("keyword", text) .onResponse([this](QByteArray result) { @@ -737,8 +737,6 @@ void Widget::searchApp(QString text) sendNotification(tr("Not found relative App!")); return; } - // TODO 展示应用 - qDebug() << json; displaySearchApp(json); })