2017-07-25 18:16:37 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-07-25 18:16:37 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-07-25 18:16:37 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "emoji_suggestions.h"
|
|
|
|
#include "emoji_suggestions_data.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
namespace Emoji {
|
|
|
|
|
|
|
|
inline utf16string QStringToUTF16(const QString &string) {
|
2018-05-13 15:14:02 +00:00
|
|
|
return utf16string(
|
|
|
|
reinterpret_cast<const utf16char*>(string.constData()),
|
|
|
|
string.size());
|
2017-07-25 18:16:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline QString QStringFromUTF16(utf16string string) {
|
2018-05-13 15:14:02 +00:00
|
|
|
return QString::fromRawData(
|
|
|
|
reinterpret_cast<const QChar*>(string.data()),
|
|
|
|
string.size());
|
2017-07-25 18:16:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
constexpr auto kSuggestionMaxLength = internal::kReplacementMaxLength;
|
|
|
|
|
|
|
|
} // namespace Emoji
|
|
|
|
} // namespace Ui
|