23 const bool r = q.prepare(
"SELECT resources.id FROM resources "
24 "INNER JOIN resource_types ON resources.resource_type_id = resource_types.id "
25 "LEFT JOIN metadata ON metadata.foreign_id = resources.id AND metadata.key = :metadata_key "
26 "WHERE resource_types.name = :resource_type AND metadata.value IS Null;");
28 errorMessages.append(i18n(
"Could not access brush tip metadata"));
35 errorMessages.append(i18n(
"Could not access brush tip metadata"));
38 bool updatedAtLeastOneResource =
false;
53 updatedAtLeastOneResource =
true;
56 if (updatedAtLeastOneResource) {
57 qWarning() <<
"Successfully updated brush type metadata in the database";
static const QString brushTypeMetaDataKey
bool setMetaDataForResource(int id, QMap< QString, QVariant > map) const
setMetaDataForResource
KoResourceSP resourceForId(int resourceId)
resourceForId returns the resource with the given id, or 0 if no such resource exists....
static KisResourceLocator * instance()
#define KIS_SAFE_ASSERT_RECOVER(cond)