mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
feat: ISSUE #I67K8Y 新增 spk://search/keyword 链接格式解析
支持打开该链接跳转搜索页面(禁止直接搜索 %,搜索结果过多会导致搜索页面 QtWebEngine 进程崩溃,无法继续搜索) Log: 支持链接跳转搜索结果页面;暂不支持直接跳转到应用详情页
This commit is contained in:
@@ -56,7 +56,7 @@ void AppListPage::getAppList(QString type)
|
||||
delete api;
|
||||
}
|
||||
|
||||
void AppListPage::getSearchList(QString keyword)
|
||||
void AppListPage::getSearchList(const QString &keyword)
|
||||
{
|
||||
isSearch = true;
|
||||
nowType = keyword;
|
||||
@@ -71,7 +71,7 @@ void AppListPage::getSearchList(QString keyword)
|
||||
{
|
||||
theme = "theme=light";
|
||||
}
|
||||
url = api->getServerUrl() + "store/#/flamescion/search?keywords=" + keyword + "&" + theme;
|
||||
url = api->getServerUrl() + "store/#/flamescion/search?keywords=" + QUrl::toPercentEncoding(keyword) + "&" + theme;
|
||||
ui->webEngineView->setUrl(url);
|
||||
delete api;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class AppListPage : public QWidget
|
||||
|
||||
public:
|
||||
void setTheme(bool dark);
|
||||
void getSearchList(QString keyword);
|
||||
void getSearchList(const QString &keyword);
|
||||
void getAppList(QString type);
|
||||
explicit AppListPage(QWidget *parent = nullptr);
|
||||
~AppListPage();
|
||||
|
||||
Reference in New Issue
Block a user