summaryrefslogtreecommitdiffstats
path: root/backend/net/NetWorker.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-07 01:38:18 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-07 01:38:18 +0200
commitafaa1dc223ec87b685778ee0aed81cb6caaa05c7 (patch)
tree4e1e6589d56ba9bc6984547d158d413a0495272f /backend/net/NetWorker.cpp
parent091b7502cfc1bc01a1abd68a0fb9a0b2693a4658 (diff)
downloadMultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar.gz
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar.lz
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.tar.xz
MultiMC-afaa1dc223ec87b685778ee0aed81cb6caaa05c7.zip
Get rid of QNAM (now subclassed and less needy). Basic LWJGL download and extraction.
Diffstat (limited to 'backend/net/NetWorker.cpp')
-rw-r--r--backend/net/NetWorker.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/net/NetWorker.cpp b/backend/net/NetWorker.cpp
new file mode 100644
index 00000000..1eef13d9
--- /dev/null
+++ b/backend/net/NetWorker.cpp
@@ -0,0 +1,12 @@
+#include "NetWorker.h"
+#include <QThreadStorage>
+
+NetWorker& NetWorker::spawn()
+{
+ static QThreadStorage<NetWorker *> storage;
+ if (!storage.hasLocalData())
+ {
+ storage.setLocalData(new NetWorker());
+ }
+ return *storage.localData();
+}