summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorDaniel Poelzleithner <git@poelzi.org>2020-12-07 12:10:56 +0100
committerDaniel Poelzleithner <git@poelzi.org>2020-12-07 12:10:56 +0100
commite77124c39828cbc120f6bf566db084869a04b42d (patch)
tree46020dafe469eed4f04bf7d8081935ae1338a28d /src/network
parentbf343d2677f19d1886682c4bd15e26f70884ce27 (diff)
Slimdown moc_compilation.cpp
The moc_compilation file became unbearable large, easily taking 10 minutes to compile whenever a Q_OBJECT changes. AUTOMOC scans for <basename>_moc.cpp includes and does not add the file to the moc_compilation whenever it is included in the propper cpp file. After this patch, moc_compilation.cpp is empty and the mocs are compiled with the approptial cpp, increasing recompile speeds by a factor of 10 when just a header file changed.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/jsonwebtask.cpp2
-rw-r--r--src/network/webtask.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/network/jsonwebtask.cpp b/src/network/jsonwebtask.cpp
index c0634c3151..07d45b8edd 100644
--- a/src/network/jsonwebtask.cpp
+++ b/src/network/jsonwebtask.cpp
@@ -1,5 +1,7 @@
#include "network/jsonwebtask.h"
+#include "moc_jsonwebtask.cpp"
+
#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0)
#include <QBuffer>
#endif
diff --git a/src/network/webtask.cpp b/src/network/webtask.cpp
index 49cc3fc819..534c582b22 100644
--- a/src/network/webtask.cpp
+++ b/src/network/webtask.cpp
@@ -3,6 +3,7 @@
#include <QTimerEvent>
#include <mutex> // std::once_flag
+#include "moc_webtask.cpp"
#include "util/assert.h"
#include "util/counter.h"
#include "util/logger.h"