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

Closed beta 10019011: various style improvements.

This commit is contained in:
John Preston
2016-12-03 15:10:35 +03:00
parent 2796c53542
commit b0f14d1856
60 changed files with 441 additions and 313 deletions

View File

@@ -520,4 +520,26 @@ inline lambda_slot_wrap *lambda_slot(QObject *parent, lambda<void()> &&lambda) {
return new lambda_slot_wrap(parent, std_::move(lambda));
}
class lambda_slot_once_wrap : public QObject {
Q_OBJECT
public:
lambda_slot_once_wrap(QObject *parent, lambda<void()> &&lambda) : QObject(parent), _lambda(std_::move(lambda)) {
}
public slots :
void action() {
_lambda();
delete this;
}
private:
lambda<void()> _lambda;
};
inline lambda_slot_once_wrap *lambda_slot_once(QObject *parent, lambda<void()> &&lambda) {
return new lambda_slot_once_wrap(parent, std_::move(lambda));
}
} // namespace base

View File

@@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "core/utils.h"
#define BETA_VERSION_MACRO (10019010ULL)
#define BETA_VERSION_MACRO (10019011ULL)
constexpr int AppVersion = 10020;
constexpr str_const AppVersionStr = "0.10.20";