code format

This commit is contained in:
王劲鹏
2019-12-13 17:48:37 +08:00
parent 3fdedb6240
commit 4610e71f42
8 changed files with 23 additions and 23 deletions

View File

@@ -7,5 +7,5 @@ Q_INVOKABLE void NativeBridge::function(int contextId, QString module, QString m
"methodName: " + methodName + ", " +
"callbackId: " + callbackId + ", " +
"arguments: " + jsValue.toString();
Context* context = ContextManager::getInstance()->getContext(contextId);
Context *context = ContextManager::getInstance()->getContext(contextId);
}

View File

@@ -13,15 +13,15 @@ class NativeTimer : public QObject {
private:
QSet<long> *deletedTimerIds = new QSet<long>();
QJSEngine* engine;
QJSEngine *engine;
public:
NativeTimer(QJSEngine* engine, QObject *parent = nullptr) : QObject(parent) {
NativeTimer(QJSEngine *engine, QObject *parent = nullptr) : QObject(parent) {
this->engine = engine;
}
Q_INVOKABLE void setTimer(long timerId, int time, bool repeat) {
QTimer* timer = new QTimer(this);
QTimer *timer = new QTimer(this);
timer->setSingleShot(!repeat);
connect(timer, &QTimer::timeout, this, [=] () {
if (deletedTimerIds->contains(timerId)) {