ui: sorting search results

* search results are sorted by: score > length > name
* fixed crash that occurred when trying to get a node by id with id == 0
This commit is contained in:
malte_langkabel
2016-04-18 14:05:27 +02:00
parent 325bc6ac83
commit c7940eb34f
7 changed files with 69 additions and 9 deletions
+1 -1
View File
@@ -422,7 +422,7 @@ StorageNode SqliteStorage::getNodeById(Id id) const
{
return getFirstNode("WHERE id == " + std::to_string(id));
}
return StorageNode(0, 0, 0, definitionTypeToInt(DEFINITION_NONE));
return StorageNode(0, 0, "", definitionTypeToInt(DEFINITION_NONE));
}
StorageNode SqliteStorage::getNodeBySerializedName(const std::string& serializedName) const