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

Replace base::lambda with shorter term.

base::lambda -> Fn (type alias for std::function).
base::lambda_once -> FnMut (type alias for base::unique_function).
base::lambda_guarded -> crl::guard.
base::lambda_call_type_t -> crl::deduced_call_type.
This commit is contained in:
John Preston
2018-06-04 18:35:11 +03:00
parent 8d1cdea31a
commit dd81f5d59f
216 changed files with 792 additions and 1455 deletions

View File

@@ -31,9 +31,9 @@ class ShareBox : public BoxContent, public RPCSender {
Q_OBJECT
public:
using CopyCallback = base::lambda<void()>;
using SubmitCallback = base::lambda<void(const QVector<PeerData*> &)>;
using FilterCallback = base::lambda<bool(PeerData*)>;
using CopyCallback = Fn<void()>;
using SubmitCallback = Fn<void(const QVector<PeerData*> &)>;
using FilterCallback = Fn<bool(PeerData*)>;
ShareBox(QWidget*, CopyCallback &&copyCallback, SubmitCallback &&submitCallback, FilterCallback &&filterCallback);
protected:
@@ -103,7 +103,7 @@ class ShareBox::Inner : public TWidget, public RPCSender, private base::Subscrib
public:
Inner(QWidget *parent, ShareBox::FilterCallback &&filterCallback);
void setPeerSelectedChangedCallback(base::lambda<void(PeerData *peer, bool selected)> callback);
void setPeerSelectedChangedCallback(Fn<void(PeerData *peer, bool selected)> callback);
void peerUnselected(not_null<PeerData*> peer);
QVector<PeerData*> selected() const;
@@ -148,7 +148,7 @@ private:
int displayedChatsCount() const;
struct Chat {
Chat(PeerData *peer, base::lambda<void()> updateCallback);
Chat(PeerData *peer, Fn<void()> updateCallback);
PeerData *peer;
Ui::RoundImageCheckbox checkbox;
@@ -201,7 +201,7 @@ private:
using SelectedChats = OrderedSet<PeerData*>;
SelectedChats _selected;
base::lambda<void(PeerData *peer, bool selected)> _peerSelectedChangedCallback;
Fn<void(PeerData *peer, bool selected)> _peerSelectedChangedCallback;
ChatData *data(Dialogs::Row *row);