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
f8e6c9c5
Verified
Commit
f8e6c9c5
authored
2 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Speedup provider compilation
parent
81d42855
Branches
issue1440
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
scripts/emoji_codegen.py
+1
-1
1 addition, 1 deletion
scripts/emoji_codegen.py
src/emoji/EmojiModel.cpp
+1
-1
1 addition, 1 deletion
src/emoji/EmojiModel.cpp
src/emoji/Provider.cpp
+1
-1
1 addition, 1 deletion
src/emoji/Provider.cpp
src/emoji/Provider.h
+2
-5
2 additions, 5 deletions
src/emoji/Provider.h
with
5 additions
and
8 deletions
scripts/emoji_codegen.py
+
1
−
1
View file @
f8e6c9c5
...
...
@@ -14,7 +14,7 @@ class Emoji(object):
def
generate_qml_list
(
**
kwargs
):
tmpl
=
Template
(
'''
const
QVector<Emoji
> emoji::Provider::emoji = {
const
std::array<Emoji, {{ sum([len(c[1]) for c in kwargs.items()]) }}
> emoji::Provider::emoji = {
{%- for c in kwargs.items() %}
// {{ c[0].capitalize() }}
{%- for e in c[1] %}
...
...
This diff is collapsed.
Click to expand it.
src/emoji/EmojiModel.cpp
+
1
−
1
View file @
f8e6c9c5
...
...
@@ -45,7 +45,7 @@ EmojiModel::roleNames() const
int
EmojiModel
::
rowCount
(
const
QModelIndex
&
parent
)
const
{
return
parent
==
QModelIndex
()
?
Provider
::
emoji
.
count
()
:
0
;
return
parent
==
QModelIndex
()
?
Provider
::
emoji
.
size
()
:
0
;
}
QVariant
...
...
This diff is collapsed.
Click to expand it.
src/emoji/Provider.cpp
+
1
−
1
View file @
f8e6c9c5
...
...
@@ -7,7 +7,7 @@
using namespace emoji;
const
QVector<Emoji
> emoji::Provider::emoji = {
const
std::array<Emoji, 3650
> emoji::Provider::emoji = {
// People
Emoji{QStringLiteral(u"\U0001F600"),
QStringLiteral(u"grinning"),
...
...
This diff is collapsed.
Click to expand it.
src/emoji/Provider.h
+
2
−
5
View file @
f8e6c9c5
...
...
@@ -7,10 +7,7 @@
#pragma once
#include
<QObject>
#include
<QSet>
#include
<QString>
#include
<QVector>
#include
<vector>
#include
<array>
namespace
emoji
{
Q_NAMESPACE
...
...
@@ -49,7 +46,7 @@ class Provider
{
public:
// all emoji for QML purposes
static
const
QVector
<
Emoji
>
emoji
;
static
const
std
::
array
<
Emoji
,
3650
>
emoji
;
};
}
// namespace emoji
...
...
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