Commit Graph

151 Commits

Author SHA1 Message Date
John Preston 101d4f6444 Use std::function for base::lambda implementation.
base::lambda becomes just std::function and base::lambda_once becomes
base::unique_function - a move-only wrapper around std::function.

This is required because Visual C++ 2017 15.4.1 has a compiler bug
with static member variables of class templates, they may collide.

The std::function uses inheritance and virtual functions instead of
custom vtables done by static members of class templates used in
custom base::lambda implementation, so they work fine.
2017-11-16 07:59:08 +04:00
John Preston b51f865c54 Save info members list state to memento. 2017-11-16 07:59:08 +04:00
John Preston 5b190c5098 Preserve TopBarOverride in Info WrapWidget.
Also support better selection in info shared media.
Also fix build for Xcode.
2017-11-16 07:59:07 +04:00
John Preston 54cc3e6315 Shared media multiple items selection. 2017-11-16 07:59:07 +04:00
John Preston fdd89d65ca Allow using custom comparators in flat_[map|set]. 2017-11-16 07:59:06 +04:00
John Preston ea0f6b9a12 Use 'if constexpr ()' instead of tag dispatch. 2017-11-16 07:59:05 +04:00
John Preston 80d9938e96 Support and use not type-erased consumers. 2017-11-16 07:59:05 +04:00
John Preston fddcdf359b Use not type-erased producers in code. 2017-11-16 07:59:05 +04:00
John Preston ffc20e4492 Divide structs into several data/ modules. 2017-11-16 07:59:04 +04:00
John Preston 088d23d557 Start new Info section (profile + shared media). 2017-11-16 07:59:02 +04:00
John Preston fbcd5e2f1e Try to use const-ref better in rpl. 2017-11-16 07:59:02 +04:00
John Preston c302219f9e Use rpl in some widgets and effects. 2017-11-16 07:59:02 +04:00
John Preston 2363a6bd44 Add SharedMediaSlice to observe shared media.
Start testing / using it in MediaView.
2017-11-16 07:59:02 +04:00
John Preston 41ed2d1b84 New storage for shared media messages index. 2017-11-16 07:59:02 +04:00
John Preston b873fee1cf Use rvalue references in rpl next / error. 2017-11-16 07:59:01 +04:00
John Preston e70052e966 Add piping and on_next, on_error, on_done, start. 2017-11-16 07:59:01 +04:00
John Preston 101fdb1fba Add event_stream for events with many consumers. 2017-11-16 07:59:01 +04:00
John Preston ebe4bbbf0f Add core rpl::producer/consumer implementation. 2017-11-16 07:59:01 +04:00
visuve 08e3a54a58 Mark missing ctors deleted
- Satisfy the rule of five

Signed-off-by: Veli-Matti Visuri <veli-matti.visuri@cerescon.fi> (github: visuve)
2017-09-28 18:23:42 +03:00
John Preston 7ae1ef0a1a Migrate to VS2017. 2017-09-06 17:11:06 +03:00
John Preston c76389e126 Allow to use base::lambda independently. 2017-09-03 15:45:49 +03:00
John Preston df64c972d8 Replace QFlags with base::flags. 2017-09-03 15:45:47 +03:00
John Preston a1344e862a Add base/flags for bit flags on scoped enums. 2017-09-03 15:45:46 +03:00
John Preston 5faca8d4f6 Add Catch unittest framework and some tests. 2017-09-03 15:45:45 +03:00
John Preston 643bedd4cf Display faved stickers before recently used. 2017-08-30 19:15:48 +03:00
John Preston 25ffaaaa2d Replace t_assert() with Assert().
Also use this assertions for Expects(), Ensures() and Unexpected().
2017-08-30 19:15:42 +03:00
John Preston 782114d644 Add and use base::make_weak_unique() helper. 2017-08-30 19:15:28 +03:00
John Preston f7359093b4 Replace ContactsBox with PeerListBox in two cases.
- View contacts list in PeerListBox.
- Add participants when creating group / channel in PeerListBox.
2017-08-30 19:15:27 +03:00
John Preston 95af8da66a Call correct destructor in base::Observable.
base::Subscription::Node doesn't have a virtual destructor.
2017-08-30 19:15:23 +03:00
John Preston bca444b92e Add base::optional as a wrapper of base::variant. 2017-08-30 19:15:21 +03:00
John Preston ae1dacb7d7 Add base/algorithm for range-based algorithms. 2017-08-30 19:15:21 +03:00
John Preston e209737b1a Display and follow unread mentions in history. 2017-08-30 19:15:13 +03:00
John Preston 1207ddb2ea Add flat_map and flat_set using std::deque. 2017-08-25 14:39:31 +03:00
John Preston 7f5a91d2bb Allow to hide empty megagroup sticker set. 2017-08-25 14:39:24 +03:00
John Preston a143505fd6 Remove lambda_slot() and lambda_slot_once(). 2017-08-25 14:39:15 +03:00
John Preston 9bd89121e8 Replace self-destruct media service messages text.
Also support runtime components with align up to std::max_align_t.
2017-07-23 12:34:42 +03:00
John Preston 5d0e89db5d Switch to the server side changelogs. 2017-06-29 11:40:00 +03:00
John Preston b94099e25b Realtime UI translation in all fields and buttons. 2017-06-29 11:39:51 +03:00
John Preston f5dfeb0c50 Support cloud languages list and switching.
Add Lang::Current().updated() observable for retranslating the UI.
2017-06-29 11:39:43 +03:00
John Preston 0557eeddbd Switch base::TaskQueue to Qt sync primitives.
std::mutex in the current build environment is not supported
by Windows XP, I guess because Ninja uses v140 platform toolset.
2017-05-11 17:21:43 +03:00
John Preston 530a385d4e Add sound override support by codes in Settings. 2017-05-09 23:46:40 +03:00
John Preston 622fbdb64b Fix BN_div/mod_word() usage. 2017-05-09 23:46:37 +03:00
John Preston 299dc3fc96 Reuse call panel if current call is in Busy state. 2017-05-09 23:46:33 +03:00
John Preston f6eb2c5205 Add call top bar above the media player. 2017-05-09 23:46:18 +03:00
John Preston b267957abe Apply all MTP Key generation checks to calls.
Also move all OpenSSL BN_* calls to base/openssl_help header.
2017-05-09 23:46:16 +03:00
John Preston 4925af69e2 Add Calls::Panel and handle incoming calls. 2017-05-09 23:46:15 +03:00
John Preston d18164bc51 Add Calls::Instance. Add libtgvoip as a dependency.
Also move all submodules to Telegram/ThirdParty.
2017-05-09 23:46:08 +03:00
John Preston cd3c5e4ade Fix build in GCC.
GCC doesn't allow using scoped enums in bitfields without warnings.
So we use "unsigned" bitfield and a couple of get/set methods.
2017-04-08 14:25:54 +03:00
John Preston 34ab04cbe6 Add lambda-based checked timers.
Also ApiWrap is now not a QObject.
2017-04-07 18:13:21 +03:00
John Preston 5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +03:00
John Preston c94a88e154 Rename / move a bunch of files.
Next commit fixes the build.
2017-04-07 18:13:16 +03:00