From 1d0e0cc65ca5dfd66c10d9e8363c5a55e75875f9 Mon Sep 17 00:00:00 2001 From: metanoia1989 Date: Sat, 5 Dec 2020 13:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=90=9C=E7=B4=A2=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8=E5=9F=9F=E5=90=8D=E4=B8=BA=E6=98=9F=E7=81=AB?= =?UTF-8?q?=E7=9A=84=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/appitem.cpp | 4 ++-- src/appitem.h | 1 - src/widget.cpp | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) 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); })