Commit 09102ddc authored by Tobias Hunger's avatar Tobias Hunger
Browse files

MacroExpander: Add a way to generate a new UUID

Change-Id: I5c43419f717d84bd9954a4921eb6e6723d331646
Reviewed-by: default avatarEike Ziller <>
parent 62e9d51c
......@@ -61,6 +61,7 @@
#include <QDebug>
#include <QDateTime>
#include <QMenu>
#include <QUuid>
using namespace Core;
using namespace Core::Internal;
......@@ -204,6 +205,8 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
[](const QString &fmt) { return QDate::currentDate().toString(fmt); });
expander->registerPrefix("CurrentTime:", tr("The current time (QTime formatstring)."),
[](const QString &fmt) { return QTime::currentTime().toString(fmt); });
expander->registerVariable("UUID", tr("Generate a new UUID."),
[]() { return QUuid::createUuid().toString(); });
expander->registerPrefix("#:", tr("A comment."), [](const QString &) { return QStringLiteral(""); });
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