Skip to content

Commit c05e141

Browse files
neclepsioKellyLSB
authored andcommitted
Update idletimer.cpp
Make it work without global variable initialization. This is due to golang/go#10023 (duplicate of golang/go#4069) and solves go-qml#142.
1 parent bc32fe2 commit c05e141

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/idletimer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class IdleTimer : public QObject
1212
public:
1313

1414
static IdleTimer *singleton() {
15-
if (_singleton == nullptr) _singleton = new IdleTimer;
15+
if (_singleton == nullptr) _singleton = new IdleTimer;
1616
return _singleton;
1717
}
1818

@@ -38,12 +38,13 @@ class IdleTimer : public QObject
3838
}
3939
}
4040

41-
static IdleTimer* _singleton;
41+
static IdleTimer* _singleton;
42+
4243
private:
4344

4445
int32_t *guiIdleRun;
4546

46-
QBasicTimer timer;
47+
QBasicTimer timer;
4748
};
4849

4950
IdleTimer* IdleTimer::_singleton;

0 commit comments

Comments
 (0)