Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
a2065005
Verified
Commit
a2065005
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Use fully qualified emoji and use literals
parent
61404641
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2452
failed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/emoji_codegen.py
+5
-5
5 additions, 5 deletions
scripts/emoji_codegen.py
src/emoji/Provider.cpp
+10410
-7277
10410 additions, 7277 deletions
src/emoji/Provider.cpp
with
10415 additions
and
7282 deletions
scripts/emoji_codegen.py
+
5
−
5
View file @
a2065005
...
...
@@ -8,7 +8,7 @@ from jinja2 import Template
class
Emoji
(
object
):
def
__init__
(
self
,
code
,
shortname
):
self
.
code
=
repr
(
code
.
encode
(
'
utf-8
'
))[
1
:].
strip
(
"'"
)
self
.
code
=
''
.
join
([
'
\\
U
'
+
c
.
rjust
(
8
,
'
0
'
)
for
c
in
code
.
strip
().
split
(
'
'
)]
)
self
.
shortname
=
shortname
def
generate_qml_list
(
**
kwargs
):
...
...
@@ -17,7 +17,7 @@ const QVector<Emoji> emoji::Provider::emoji = {
{%- for c in kwargs.items() %}
// {{ c[0].capitalize() }}
{%- for e in c[1] %}
Emoji{QString
::fromUtf8(
"
{{ e.code }}
"
),
"
{{ e.shortname }}
"
, emoji::Emoji::Category::{{ c[0].capitalize() }}},
Emoji{QString
Literal(u
"
{{ e.code }}
"
),
QStringLiteral(u
"
{{ e.shortname }}
"
)
, emoji::Emoji::Category::{{ c[0].capitalize() }}},
{%- endfor %}
{%- endfor %}
};
...
...
@@ -67,8 +67,8 @@ if __name__ == '__main__':
code
,
qualification
,
charAndName
=
segments
# skip
fully
qualified versions of same unicode
if
code
.
endswith
(
'
FE0F
'
)
:
# skip
un
qualified versions of same unicode
if
qualification
==
'
unqualified
'
:
continue
if
qualification
==
'
component
'
:
...
...
@@ -76,7 +76,7 @@ if __name__ == '__main__':
char
,
name
=
re
.
match
(
r
'
^(\S+) E\d+\.\d+ (.*)$
'
,
charAndName
).
groups
()
categories
[
current_category
].
append
(
Emoji
(
c
har
,
name
))
categories
[
current_category
].
append
(
Emoji
(
c
ode
,
name
))
# Use xclip to pipe the output to clipboard.
# e.g ./codegen.py emoji.json | xclip -sel clip
...
...
This diff is collapsed.
Click to expand it.
src/emoji/Provider.cpp
+
10410
−
7277
View file @
a2065005
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment