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
// ==================================================
-thread_local SignalProxy *SignalProxy::_current{nullptr};
+namespace {
+thread_local SignalProxy *_current{nullptr};
+}
SignalProxy::SignalProxy(QObject *parent)
: QObject(parent)
}
+SignalProxy *SignalProxy::current()
+{
+ return _current;
+}
+
+
void SignalProxy::setProxyMode(ProxyMode mode)
{
if (!_peerMap.empty()) {
void dumpProxyStats();
void dumpSyncMap(SyncableObject *object);
- static SignalProxy *current() {
- return _current;
- }
+ static SignalProxy *current();
/**@{*/
/**
Peer *_sourcePeer = nullptr;
Peer *_targetPeer = nullptr;
- thread_local static SignalProxy *_current;
-
friend class SignalRelay;
friend class SyncableObject;
friend class Peer;