Element SQLite cache : replace the column mtime by uuid.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4223 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-10-03 15:41:59 +00:00
parent 4edd1f3f24
commit 3e42c3918b
5 changed files with 170 additions and 88 deletions

View File

@@ -29,8 +29,26 @@ bool ElementDefinition::hasParentCategory() {
}
/**
@return la categorie a laquelle appartient cet element
*/
* @brief ElementDefinition::uuid
* @return The uuid of this element definition.
* If uuid can't be found, return a null QUuid.
*/
QUuid ElementDefinition::uuid()
{
if (!m_uuid.isNull()) return m_uuid;
//Get the uuid of element
QList<QDomElement> list_ = QET::findInDomElement(xml(), "uuid");
if (!list_.isEmpty())
m_uuid = QUuid(list_.first().attribute("uuid"));
else
qDebug() << "The element : " << filePath() << "haven't got an uuid, please edit and save this element with element editor to create an uuid";
return m_uuid;
}
ElementsCategory *ElementDefinition::parentCategory() {
return(parent_category_);
}