Create link annotation

This commit is contained in:
Jakub Melka
2020-03-23 19:10:22 +01:00
parent 35ffc256f3
commit f4bb5c2fa1
8 changed files with 1270 additions and 803 deletions

View File

@ -40,6 +40,14 @@ QObjectList GeneratedCodeStorage::getFunctions() const
void GeneratedCodeStorage::setFunctions(const QObjectList& functions)
{
m_functions = functions;
auto comparator = [](const QObject* left, const QObject* right)
{
const GeneratedFunction* leftFunction = qobject_cast<const GeneratedFunction*>(left);
const GeneratedFunction* rightFunction = qobject_cast<const GeneratedFunction*>(right);
return leftFunction->getFunctionName() < rightFunction->getFunctionName();
};
std::sort(m_functions.begin(), m_functions.end(), comparator);
}
GeneratedFunction* GeneratedCodeStorage::addFunction(const QString& name)