2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move Image and derived to ui/image.

This commit is contained in:
John Preston
2018-10-11 18:54:57 +03:00
parent d56a3d015b
commit 113f665295
48 changed files with 1917 additions and 1776 deletions

View File

@@ -318,29 +318,6 @@ inline T snap(const T &v, const T &_min, const T &_max) {
return (v < _min) ? _min : ((v > _max) ? _max : v);
}
template <typename T>
class ManagedPtr {
public:
ManagedPtr() = default;
ManagedPtr(T *p) : _data(p) {
}
T *operator->() const {
return _data;
}
T *v() const {
return _data;
}
explicit operator bool() const {
return _data != nullptr;
}
protected:
using Parent = ManagedPtr<T>;
T *_data = nullptr;
};
QString translitRusEng(const QString &rus);
QString rusKeyboardLayoutSwitch(const QString &from);