Commit d7a84cef authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove the translations table

Translations are handled at the .desktop level for tags
parent b11525db
......@@ -75,7 +75,6 @@ QSqlError initDb(const QString &location)
<< "storages"
<< "tags"
<< "resources"
<< "translations"
<< "versioned_resources"
<< "resource_tags";
......@@ -414,9 +413,9 @@ bool KisResourceCacheDb::addResource(KisResourceStorageSP storage, QDateTime tim
return r;
}
bool KisResourceCacheDb::addResources(KisResourceStorageSP storage, QString folder)
bool KisResourceCacheDb::addResources(KisResourceStorageSP storage, QString resourceType)
{
QSharedPointer<KisResourceStorage::ResourceIterator> iter = storage->resources(folder);
QSharedPointer<KisResourceStorage::ResourceIterator> iter = storage->resources(resourceType);
while(iter->hasNext()) {
iter->next();
KoResourceSP res = iter->resource();
......@@ -429,6 +428,16 @@ bool KisResourceCacheDb::addResources(KisResourceStorageSP storage, QString fold
return true;
}
bool KisResourceCacheDb::addTag(KisResourceStorageSP storage, QDateTime timestamp, KoResourceSP resource, const QString &resourceType)
{
return false;
}
bool KisResourceCacheDb::addTags(KisResourceStorageSP storage, QString resourceType)
{
return false;
}
bool KisResourceCacheDb::addStorage(KisResourceStorageSP storage, bool preinstalled)
{
bool r = true;
......
......@@ -69,8 +69,14 @@ private:
static bool addResourceVersion(int resourceId, QDateTime timestamp, KisResourceStorageSP storage, KoResourceSP resource);
static bool hasResource(KisResourceStorageSP storage, KoResourceSP resource, const QString &resourceType);
static bool addResource(KisResourceStorageSP storage, QDateTime timestamp, KoResourceSP resource, const QString &resourceType);
static bool addResources(KisResourceStorageSP storage, QString folder);
static bool addResources(KisResourceStorageSP storage, QString resourceType);
static bool addTag(KisResourceStorageSP storage, QDateTime timestamp, KoResourceSP resource, const QString &resourceType);
static bool addTags(KisResourceStorageSP storage, QString resourceType);
static bool addStorage(KisResourceStorageSP storage, bool preinstalled);
static bool synchronize(KisResourceStorageSP storage);
......
......@@ -184,6 +184,9 @@ bool KisResourceLocator::initializeDb()
if (!KisResourceCacheDb::addResources(storage, folder)) {
d->errorMessages.append(i18n("Could not add resource type %1 to the cache database").arg(folder));
}
if (!KisResourceCacheDb::addTags(storage, folder)) {
d->errorMessages.append(i18n("Could not add tags for resource type %1 to the cache database").arg(folder));
}
}
}
......
......@@ -10,7 +10,6 @@
<file alias="create_resource_types.sql">sql/create_resource_types.sql</file>
<file alias="fill_resource_types.sql">sql/fill_resource_types.sql</file>
<file alias="create_resources.sql">sql/create_resources.sql</file>
<file alias="create_translations.sql">sql/create_translations.sql</file>
<file alias="create_versioned_resources.sql">sql/create_versioned_resources.sql</file>
<file alias="create_resource_tags.sql">sql/create_resource_tags.sql</file>
<file alias="get_version_information.sql">sql/get_version_information.sql</file>
......
CREATE TABLE IF NOT EXISTS tags (
id INTEGER PRIMARY KEY
, url TEXT
, name TEXT
, comment TEXT
, storage_id INTEGER
, active INTEGER
, FOREIGN KEY(storage_id) REFERENCES storages(id)
......
CREATE TABLE IF NOT EXISTS translations (
id INTEGER PRIMARY KEY
, original_id INTEGER
, locale TEXT
, translation TEXT
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment