forked from qt-creator/qt-creator
MacroExpander: Allow "comment" expansion
%{#: is now treated as a comment and expands to an empty string } This is useful to add comments about copyright, etc. into the wizard templates. Change-Id: I6e25c724edfa4b865d2d4f74b0f4900982d9ea47 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
@@ -211,6 +211,8 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
expander->registerPrefix("CurrentTime:", tr("The current time (QTime formatstring)."),
|
||||
[](const QString &fmt) { return QTime::currentTime().toString(fmt); });
|
||||
|
||||
expander->registerPrefix("#:", tr("A comment."), [](const QString &) { return QStringLiteral(""); });
|
||||
|
||||
// Make sure all wizards are there when the user might access the keyboard shortcuts:
|
||||
connect(ICore::instance(), &ICore::optionsDialogRequested, []() { IWizardFactory::allWizardFactories(); });
|
||||
|
||||
|
Reference in New Issue
Block a user