Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Add a note about responsibility to set KoResource::addMetaData()

Dmitry Kazakove10bd0a696a8
diff --git a/libs/resources/KoResource.cpp b/libs/resources/KoResource.cpp
index dc71159c1b..6eef6937de 100644
--- a/libs/resources/KoResource.cpp
+++ b/libs/resources/KoResource.cpp
@@ -288,6 +288,15 @@ bool KoResource::isDirty() const
void KoResource::addMetaData(QString key, QVariant value)
{
+ /**
+ * It is responsibility of the resource itself to load all the necessary
+ * metadata right on loading in loadFromDevice(). The resource locator will
+ * **not** try to load this information from the database. Database only
+ * caches metadata.
+ *
+ * To make sure that metadata is correctly populated in the database,
+ * it should be set up right in loadFromDevice().
+ */
d->metadata.insert(key, value);
}