appletdata:provide storageId

--in case any consumer wants to use that info
work/spdx
Michail Vourlakos 4 years ago
parent 11aa2abd2e
commit c74f5cf7fc

@ -32,7 +32,8 @@ Applet::Applet(Applet &&o)
: Generic(o), : Generic(o),
isSelected(o.isSelected), isSelected(o.isSelected),
description(o.description), description(o.description),
icon(o.icon) icon(o.icon),
storageId(o.storageId)
{ {
} }
@ -40,7 +41,8 @@ Applet::Applet(const Applet &o)
: Generic(o), : Generic(o),
isSelected(o.isSelected), isSelected(o.isSelected),
description(o.description), description(o.description),
icon(o.icon) icon(o.icon),
storageId(o.storageId)
{ {
} }
@ -51,6 +53,7 @@ Applet &Applet::operator=(const Applet &rhs)
description = rhs.description; description = rhs.description;
isSelected = rhs.isSelected; isSelected = rhs.isSelected;
icon = rhs.icon; icon = rhs.icon;
storageId = rhs.storageId;
return (*this); return (*this);
} }
@ -62,6 +65,7 @@ Applet &Applet::operator=(Applet &&rhs)
description = rhs.description; description = rhs.description;
isSelected = rhs.isSelected; isSelected = rhs.isSelected;
icon = rhs.icon; icon = rhs.icon;
storageId = rhs.storageId;
return (*this); return (*this);
} }
@ -72,7 +76,8 @@ bool Applet::operator==(const Applet &rhs) const
&& (name == rhs.name) && (name == rhs.name)
&& (description == rhs.description) && (description == rhs.description)
&& (icon == rhs.icon) && (icon == rhs.icon)
&& (isSelected == rhs.isSelected); && (isSelected == rhs.isSelected)
&& (storageId == rhs.storageId);
} }
bool Applet::operator!=(const Applet &rhs) const bool Applet::operator!=(const Applet &rhs) const

@ -43,6 +43,7 @@ public:
bool isSelected; bool isSelected;
QString description; QString description;
QString icon; QString icon;
QString storageId;
bool isInstalled() const; bool isInstalled() const;
bool isValid() const; bool isValid() const;

@ -877,7 +877,10 @@ bool Storage::hasDifferentAppletsWithSameId(const Layout::GenericLayout *layout,
Data::ErrorInformation errorinfo; Data::ErrorInformation errorinfo;
errorinfo.containment = metadata(containment->pluginMetaData().pluginId()); errorinfo.containment = metadata(containment->pluginMetaData().pluginId());
errorinfo.containment.storageId = cid;
errorinfo.applet = metadata(applet->pluginMetaData().pluginId()); errorinfo.applet = metadata(applet->pluginMetaData().pluginId());
errorinfo.applet.storageId = aid;
error.information << errorinfo; error.information << errorinfo;
} }
} }
@ -907,7 +910,10 @@ bool Storage::hasDifferentAppletsWithSameId(const Layout::GenericLayout *layout,
Data::ErrorInformation errorinfo; Data::ErrorInformation errorinfo;
errorinfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", "")); errorinfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", ""));
errorinfo.containment.storageId = cid;
errorinfo.applet = metadata(containmentsEntries.group(cid).group("Applets").group(aid).readEntry("plugin", "")); errorinfo.applet = metadata(containmentsEntries.group(cid).group("Applets").group(aid).readEntry("plugin", ""));
errorinfo.applet.storageId = aid;
error.information << errorinfo; error.information << errorinfo;
} }
} }
@ -937,6 +943,7 @@ bool Storage::hasOrphanedSubContainments(const Layout::GenericLayout *layout, Da
Data::ErrorInformation errorinfo; Data::ErrorInformation errorinfo;
errorinfo.containment = metadata(containment->pluginMetaData().pluginId()); errorinfo.containment = metadata(containment->pluginMetaData().pluginId());
errorinfo.containment.storageId = cid;
warning.information << errorinfo; warning.information << errorinfo;
} }
} else { // inactive layout } else { // inactive layout
@ -950,6 +957,7 @@ bool Storage::hasOrphanedSubContainments(const Layout::GenericLayout *layout, Da
Data::ErrorInformation errorinfo; Data::ErrorInformation errorinfo;
errorinfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", "")); errorinfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", ""));
errorinfo.containment.storageId = cid;
warning.information << errorinfo; warning.information << errorinfo;
} }
} }

Loading…
Cancel
Save