From 75a154f4fec6987b9454ea8b02ed10e1f7818af2 Mon Sep 17 00:00:00 2001 From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> Date: Mon, 18 Sep 2023 08:28:55 -0300 Subject: [PATCH] plugins: fix background of installed plugin Change-Id: I0b890270dc10ddb3d77d10f07252d5da7266ba7f --- src/app/pluginlistmodel.cpp | 2 +- src/app/pluginstorelistmodel.cpp | 2 +- src/libclient/api/pluginmodel.h | 2 +- src/libclient/pluginmodel.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/pluginlistmodel.cpp b/src/app/pluginlistmodel.cpp index 74e2f9d6a..46f25caee 100644 --- a/src/app/pluginlistmodel.cpp +++ b/src/app/pluginlistmodel.cpp @@ -71,7 +71,7 @@ PluginListModel::data(const QModelIndex& index, int role) const case Role::PluginIcon: return QVariant(details.iconPath); case Role::PluginImage: - return QVariant(details.imagePath); + return QVariant(details.backgroundPath); case Role::IsLoaded: return QVariant(details.loaded); case Role::PluginAuthor: diff --git a/src/app/pluginstorelistmodel.cpp b/src/app/pluginstorelistmodel.cpp index 6a7761570..dc7c7bac3 100644 --- a/src/app/pluginstorelistmodel.cpp +++ b/src/app/pluginstorelistmodel.cpp @@ -210,7 +210,7 @@ PluginStoreListModel::rowFromPluginId(const QString& pluginId) const const auto it = std::find_if(plugins_.begin(), plugins_.end(), [&pluginId](const QVariantMap& p) { - return p["name"].toString() == pluginId; + return p["id"].toString() == pluginId; }); if (it != plugins_.end()) { return std::distance(plugins_.begin(), it); diff --git a/src/libclient/api/pluginmodel.h b/src/libclient/api/pluginmodel.h index 88bdae939..9dee4df00 100644 --- a/src/libclient/api/pluginmodel.h +++ b/src/libclient/api/pluginmodel.h @@ -45,7 +45,7 @@ struct PluginDetails QString version = ""; QString author = ""; QString iconPath = ""; - QString imagePath = ""; + QString backgroundPath = ""; bool loaded = false; }; diff --git a/src/libclient/pluginmodel.cpp b/src/libclient/pluginmodel.cpp index 7e80d30c6..801f3df67 100644 --- a/src/libclient/pluginmodel.cpp +++ b/src/libclient/pluginmodel.cpp @@ -94,7 +94,7 @@ PluginModel::getPluginDetails(const QString& path) result.description = details["description"]; result.path = path; result.iconPath = details["iconPath"]; - result.imagePath = details["imagePath"]; + result.backgroundPath = details["backgroundPath"]; result.author = details["author"]; result.version = details["version"]; } -- GitLab