summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f009178)
Windows does not allow exporting thread_local attributes in the
DLL interface. Since it's not good practice anyway to expose such
an implementation detail in the public header, make the accessor
non-inline and move the attribute into a private anonymous namespace,
removing it from the public interface.
// SignalProxy
// ==================================================
// SignalProxy
// ==================================================
-thread_local SignalProxy *SignalProxy::_current{nullptr};
+namespace {
+thread_local SignalProxy *_current{nullptr};
+}
SignalProxy::SignalProxy(QObject *parent)
: QObject(parent)
SignalProxy::SignalProxy(QObject *parent)
: QObject(parent)
+SignalProxy *SignalProxy::current()
+{
+ return _current;
+}
+
+
void SignalProxy::setProxyMode(ProxyMode mode)
{
if (!_peerMap.empty()) {
void SignalProxy::setProxyMode(ProxyMode mode)
{
if (!_peerMap.empty()) {
void dumpProxyStats();
void dumpSyncMap(SyncableObject *object);
void dumpProxyStats();
void dumpSyncMap(SyncableObject *object);
- static SignalProxy *current() {
- return _current;
- }
+ static SignalProxy *current();
Peer *_sourcePeer = nullptr;
Peer *_targetPeer = nullptr;
Peer *_sourcePeer = nullptr;
Peer *_targetPeer = nullptr;
- thread_local static SignalProxy *_current;
-
friend class SignalRelay;
friend class SyncableObject;
friend class Peer;
friend class SignalRelay;
friend class SyncableObject;
friend class Peer;