Commit 4af45544 authored by Laurent Montel's avatar Laurent Montel 😁

Fix hightlighting and autocompleter

parent 20d7259e
......@@ -47,7 +47,7 @@ void TemplatesSyntaxHighlighter::init()
QTextCharFormat keywordWithArgsFormat;
keywordWithArgsFormat.setForeground( palette.link() );
const QStringList keywordsWithArgs = QStringList() << Util::keywordsWithArgs();
const QStringList keywordsWithArgs = QStringList() << Util::keywordsWithArgsForCompleter();
Q_FOREACH ( const QString & s, keywordsWithArgs ) {
const QRegExp regex( s, Qt::CaseInsensitive );
......
......@@ -36,6 +36,26 @@ void TemplateParser::Util::deleteTemplate( const QString &id )
}
QStringList TemplateParser::Util::keywordsWithArgs()
{
QStringList keywordsWithArgs;
keywordsWithArgs
<< QLatin1String( "%REM=\"\"%-" )
<< QLatin1String( "%INSERT=\"\"" )
<< QLatin1String( "%SYSTEM=\"\"" )
<< QLatin1String( "%PUT=\"\"" )
<< QLatin1String( "%QUOTEPIPE=\"\"" )
<< QLatin1String( "%MSGPIPE=\"\"" )
<< QLatin1String( "%BODYPIPE=\"\"" )
<< QLatin1String( "%CLEARPIPE=\"\"" )
<< QLatin1String( "%TEXTPIPE=\"\"" )
<< QLatin1String( "%OHEADER=\"\"" )
<< QLatin1String( "%HEADER=\"\"" )
<< QLatin1String( "%LANGUAGE=\"\"" );
return keywordsWithArgs;
}
QStringList TemplateParser::Util::keywordsWithArgsForCompleter()
{
QStringList keywordsWithArgs;
keywordsWithArgs
......
......@@ -30,7 +30,7 @@ TEMPLATEPARSER_EXPORT void deleteTemplate( const QString &id );
TEMPLATEPARSER_EXPORT QStringList keywords();
TEMPLATEPARSER_EXPORT QStringList keywordsWithArgs();
TEMPLATEPARSER_EXPORT QStringList keywordsWithArgsForCompleter();
}
}
......
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