2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Add emoji autocomplete to history message field.

This commit is contained in:
John Preston
2017-07-22 11:35:18 +03:00
parent 8f8100af3a
commit 2dec9c46a7
10 changed files with 802 additions and 39 deletions

View File

@@ -454,7 +454,7 @@ public:
// So we can pass this pointer to methods like connect().
Object *data() const {
return static_cast<Object*>(_object);
return static_cast<Object*>(_object.data());
}
operator Object*() const {
return data();
@@ -504,14 +504,14 @@ private:
template <typename OtherObject>
friend class object_ptr;
QObject *_object = nullptr;
QPointer<QObject> _object;
};
template <typename ResultType, typename SourceType>
inline object_ptr<ResultType> static_object_cast(object_ptr<SourceType> source) {
auto result = object_ptr<ResultType>(nullptr);
result._object = static_cast<ResultType*>(base::take(source._object));
result._object = static_cast<ResultType*>(base::take(source._object).data());
return std::move(result);
}