From a5d289eb89e42e42daba8659a54885a166760533 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 30 Apr 2021 01:38:02 +0300 Subject: [PATCH] storage errors fix adding error data --- app/layouts/storage.cpp | 8 ++++++++ app/settings/settingsdialog/layoutscontroller.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/layouts/storage.cpp b/app/layouts/storage.cpp index ec8489bc7..424adc3cc 100644 --- a/app/layouts/storage.cpp +++ b/app/layouts/storage.cpp @@ -877,6 +877,7 @@ bool Storage::hasDifferentAppletsWithSameId(const Layout::GenericLayout *layout, } Data::ErrorInformation errorinfo; + errorinfo.id = QString::number(error.information.rowCount()); errorinfo.containment = metadata(containment->pluginMetaData().pluginId()); errorinfo.containment.storageId = cid; errorinfo.applet = metadata(applet->pluginMetaData().pluginId()); @@ -911,6 +912,7 @@ bool Storage::hasDifferentAppletsWithSameId(const Layout::GenericLayout *layout, } Data::ErrorInformation errorinfo; + errorinfo.id = QString::number(error.information.rowCount()); errorinfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", "")); errorinfo.containment.storageId = cid; errorinfo.applet = metadata(containmentsEntries.group(cid).group("Applets").group(aid).readEntry("plugin", "")); @@ -969,6 +971,7 @@ bool Storage::hasAppletsAndContainmentsWithSameId(const Layout::GenericLayout *l if (conflicted.contains(cid)) { Data::WarningInformation warninginfo; + warninginfo.id = QString::number(warning.information.rowCount()); warninginfo.containment = metadata(containment->pluginMetaData().pluginId()); warninginfo.containment.storageId = cid; @@ -983,6 +986,7 @@ bool Storage::hasAppletsAndContainmentsWithSameId(const Layout::GenericLayout *l } Data::WarningInformation warninginfo; + warninginfo.id = QString::number(warning.information.rowCount()); warninginfo.containment = metadata(containment->pluginMetaData().pluginId()); warninginfo.containment.storageId = cid; warninginfo.applet = metadata(applet->pluginMetaData().pluginId()); @@ -1022,6 +1026,7 @@ bool Storage::hasAppletsAndContainmentsWithSameId(const Layout::GenericLayout *l for (const auto &cid : containmentsEntries.groupList()) { if (conflicted.contains(cid)) { Data::WarningInformation warninginfo; + warninginfo.id = QString::number(warning.information.rowCount()); warninginfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", "")); warninginfo.containment.storageId = cid; @@ -1034,6 +1039,7 @@ bool Storage::hasAppletsAndContainmentsWithSameId(const Layout::GenericLayout *l } Data::WarningInformation warninginfo; + warninginfo.id = QString::number(warning.information.rowCount()); warninginfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", "")); warninginfo.containment.storageId = cid; warninginfo.applet = metadata(containmentsEntries.group(cid).group("Applets").group(aid).readEntry("plugin", "")); @@ -1068,6 +1074,7 @@ bool Storage::hasOrphanedSubContainments(const Layout::GenericLayout *layout, Da } Data::WarningInformation warninginfo; + warninginfo.id = QString::number(warning.information.rowCount()); warninginfo.containment = metadata(containment->pluginMetaData().pluginId()); warninginfo.containment.storageId = cid; warning.information << warninginfo; @@ -1084,6 +1091,7 @@ bool Storage::hasOrphanedSubContainments(const Layout::GenericLayout *layout, Da } Data::WarningInformation warninginfo; + warninginfo.id = QString::number(warning.information.rowCount()); warninginfo.containment = metadata(containmentsEntries.group(cid).readEntry("plugin", "")); warninginfo.containment.storageId = cid; warning.information << warninginfo; diff --git a/app/settings/settingsdialog/layoutscontroller.cpp b/app/settings/settingsdialog/layoutscontroller.cpp index 93c9b160c..5a955350d 100644 --- a/app/settings/settingsdialog/layoutscontroller.cpp +++ b/app/settings/settingsdialog/layoutscontroller.cpp @@ -543,7 +543,7 @@ void Layouts::messagesForErroredLayouts(const Data::LayoutsTable &layouts) for (int i=0; ishowInlineMessage(i18nc("settings:layout with warnings", - "Warning: Be careful, Layout %0 reports %1 warning(s) that might need your attention.").arg(layouts[i].name).arg(layouts[i].warnings), + "Warning: Be careful, Layout %0 reports %1 warning(s) that need your attention.").arg(layouts[i].name).arg(layouts[i].warnings), KMessageWidget::Warning, true); }