mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 01:10:53 +01:00
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:
@@ -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_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user