Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim
Commits
4af45544
Commit
4af45544
authored
Jan 02, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix hightlighting and autocompleter
parent
20d7259e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
templateparser/templatessyntaxhighlighter.cpp
templateparser/templatessyntaxhighlighter.cpp
+1
-1
templateparser/templatesutil.cpp
templateparser/templatesutil.cpp
+20
-0
templateparser/templatesutil.h
templateparser/templatesutil.h
+1
-1
No files found.
templateparser/templatessyntaxhighlighter.cpp
View file @
4af45544
...
...
@@ -47,7 +47,7 @@ void TemplatesSyntaxHighlighter::init()
QTextCharFormat
keywordWithArgsFormat
;
keywordWithArgsFormat
.
setForeground
(
palette
.
link
()
);
const
QStringList
keywordsWithArgs
=
QStringList
()
<<
Util
::
keywordsWithArgs
();
const
QStringList
keywordsWithArgs
=
QStringList
()
<<
Util
::
keywordsWithArgs
ForCompleter
();
Q_FOREACH
(
const
QString
&
s
,
keywordsWithArgs
)
{
const
QRegExp
regex
(
s
,
Qt
::
CaseInsensitive
);
...
...
templateparser/templatesutil.cpp
View file @
4af45544
...
...
@@ -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
...
...
templateparser/templatesutil.h
View file @
4af45544
...
...
@@ -30,7 +30,7 @@ TEMPLATEPARSER_EXPORT void deleteTemplate( const QString &id );
TEMPLATEPARSER_EXPORT
QStringList
keywords
();
TEMPLATEPARSER_EXPORT
QStringList
keywordsWithArgs
();
TEMPLATEPARSER_EXPORT
QStringList
keywordsWithArgsForCompleter
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment