Commit 021e7af8 authored by Laurent Montel's avatar Laurent Montel 😁

continue to implement emoji unicode

parent 8a5df04f
......@@ -92,33 +92,39 @@ EmoticonTextEditSelector::~EmoticonTextEditSelector()
void EmoticonTextEditSelector::slotCreateEmoticonList()
{
mListEmoticon->clear();
static QString cachedEmoticonsThemeName;
if (cachedEmoticonsThemeName.isEmpty()) {
cachedEmoticonsThemeName = KEmoticons::currentThemeName();
}
const QHash<QString, QStringList> list
= sEmoticons->theme(cachedEmoticonsThemeName).emoticonsMap();
//Keep in sync with linklocator.cpp
QStringList exclude;
exclude << QStringLiteral("(c)") << QStringLiteral("(C)") << QStringLiteral("&gt;:-(") << QStringLiteral("&gt;:(") << QStringLiteral("(B)") << QStringLiteral("(b)") << QStringLiteral("(P)")
<< QStringLiteral("(p)");
exclude << QStringLiteral("(O)") << QStringLiteral("(o)") << QStringLiteral("(D)") << QStringLiteral("(d)") << QStringLiteral("(E)") << QStringLiteral("(e)") << QStringLiteral("(K)")
<< QStringLiteral("(k)");
exclude << QStringLiteral("(I)") << QStringLiteral("(i)") << QStringLiteral("(L)") << QStringLiteral("(l)") << QStringLiteral("(8)") << QStringLiteral("(T)") << QStringLiteral("(t)")
<< QStringLiteral("(G)");
exclude << QStringLiteral("(g)") << QStringLiteral("(F)") << QStringLiteral("(f)") << QStringLiteral("(H)");
exclude << QStringLiteral("8)") << QStringLiteral("(N)") << QStringLiteral("(n)") << QStringLiteral("(Y)") << QStringLiteral("(y)") << QStringLiteral("(U)") << QStringLiteral("(u)")
<< QStringLiteral("(W)") << QStringLiteral("(w)");
const QHash<QString, QStringList>::const_iterator end = list.constEnd();
for (QHash<QString, QStringList>::const_iterator it = list.constBegin(); it != end; ++it) {
const QString str = it.value().first();
if (!exclude.contains(str)) {
new EmoticonTextEditItem(str, it.key(), mListEmoticon);
if (mEmojiPlainText) {
uint cp = 0x1F50E;
const QString str = QString::fromUcs4(&cp, 1);
new EmoticonTextEditItem(str, mListEmoticon);
//TODO
} else {
static QString cachedEmoticonsThemeName;
if (cachedEmoticonsThemeName.isEmpty()) {
cachedEmoticonsThemeName = KEmoticons::currentThemeName();
}
const QHash<QString, QStringList> list
= sEmoticons->theme(cachedEmoticonsThemeName).emoticonsMap();
//Keep in sync with linklocator.cpp
QStringList exclude;
exclude << QStringLiteral("(c)") << QStringLiteral("(C)") << QStringLiteral("&gt;:-(") << QStringLiteral("&gt;:(") << QStringLiteral("(B)") << QStringLiteral("(b)") << QStringLiteral("(P)")
<< QStringLiteral("(p)");
exclude << QStringLiteral("(O)") << QStringLiteral("(o)") << QStringLiteral("(D)") << QStringLiteral("(d)") << QStringLiteral("(E)") << QStringLiteral("(e)") << QStringLiteral("(K)")
<< QStringLiteral("(k)");
exclude << QStringLiteral("(I)") << QStringLiteral("(i)") << QStringLiteral("(L)") << QStringLiteral("(l)") << QStringLiteral("(8)") << QStringLiteral("(T)") << QStringLiteral("(t)")
<< QStringLiteral("(G)");
exclude << QStringLiteral("(g)") << QStringLiteral("(F)") << QStringLiteral("(f)") << QStringLiteral("(H)");
exclude << QStringLiteral("8)") << QStringLiteral("(N)") << QStringLiteral("(n)") << QStringLiteral("(Y)") << QStringLiteral("(y)") << QStringLiteral("(U)") << QStringLiteral("(u)")
<< QStringLiteral("(W)") << QStringLiteral("(w)");
const QHash<QString, QStringList>::const_iterator end = list.constEnd();
for (QHash<QString, QStringList>::const_iterator it = list.constBegin(); it != end; ++it) {
const QString str = it.value().first();
if (!exclude.contains(str)) {
new EmoticonTextEditItem(str, it.key(), mListEmoticon);
}
}
}
mListEmoticon->setIconSize(QSize(32, 32));
}
......
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