diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-06-16 00:49:12 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-06-16 00:49:12 +0200 |
commit | f8e6c9c53cfeeb422b70e476671fd1c30d4a9798 (patch) | |
tree | ec71d941cbba1d1d12a13328439c247a26dc6a7a /src/emoji | |
parent | 81d4285580fd4a7da9f5bdf10e703a32f79e8a86 (diff) |
Speedup provider compilation
Diffstat (limited to 'src/emoji')
-rw-r--r-- | src/emoji/EmojiModel.cpp | 2 | ||||
-rw-r--r-- | src/emoji/Provider.cpp | 2 | ||||
-rw-r--r-- | src/emoji/Provider.h | 7 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/emoji/EmojiModel.cpp b/src/emoji/EmojiModel.cpp index 6f9ea9db..3381f767 100644 --- a/src/emoji/EmojiModel.cpp +++ b/src/emoji/EmojiModel.cpp @@ -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 diff --git a/src/emoji/Provider.cpp b/src/emoji/Provider.cpp index f5e7c0e8..f98e5d34 100644 --- a/src/emoji/Provider.cpp +++ b/src/emoji/Provider.cpp @@ -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"), diff --git a/src/emoji/Provider.h b/src/emoji/Provider.h index 07a513ae..566c53a0 100644 --- a/src/emoji/Provider.h +++ b/src/emoji/Provider.h @@ -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 |