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:
@@ -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 &©Callback, 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);
|
||||
|
||||
|
Reference in New Issue
Block a user