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

Closed beta 10019010: unified attach button, new intro, new stickers.

Now all files sending is confirmed before preparing for sending.
You can paste from clipboard and drag many files at once.
This commit is contained in:
John Preston
2016-11-28 18:45:07 +03:00
parent 26c08236cd
commit 3cff50009c
92 changed files with 1702 additions and 1588 deletions

View File

@@ -47,6 +47,11 @@ inline constexpr D up_cast_helper(std_::false_type, T object) {
return nullptr;
}
template <typename T>
constexpr std_::add_const_t<T> &any_as_const(T &&value) noexcept {
return value;
}
} // namespace internal
template <typename D, typename T>
@@ -83,6 +88,12 @@ scope_guard_helper<Lambda> scope_guard(Lambda on_scope_exit) {
} // namespace base
// using for_const instead of plain range-based for loop to ensure usage of const_iterator
// it is important for the copy-on-write Qt containers
// if you have "QVector<T*> v" then "for (T * const p : v)" will still call QVector::detach(),
// while "for_const (T *p, v)" won't and "for_const (T *&p, v)" won't compile
#define for_const(range_declaration, range_expression) for (range_declaration : base::internal::any_as_const(range_expression))
template <typename Enum>
inline QFlags<Enum> qFlags(Enum v) {
return QFlags<Enum>(v);
@@ -352,11 +363,6 @@ enum DBIConnectionType {
dbictTcpProxy = 3,
};
enum DBIDefaultAttach {
dbidaDocument = 0,
dbidaPhoto = 1,
};
struct ProxyData {
QString host;
uint32 port = 0;