From e77124c39828cbc120f6bf566db084869a04b42d Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Mon, 7 Dec 2020 12:10:56 +0100 Subject: 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 _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. --- src/library/dao/autodjcratesdao.cpp | 2 ++ src/library/dao/playlistdao.cpp | 2 ++ src/library/dao/trackdao.cpp | 1 + 3 files changed, 5 insertions(+) (limited to 'src/library/dao') diff --git a/src/library/dao/autodjcratesdao.cpp b/src/library/dao/autodjcratesdao.cpp index 90c745f91c..149e7a1e89 100644 --- a/src/library/dao/autodjcratesdao.cpp +++ b/src/library/dao/autodjcratesdao.cpp @@ -1,5 +1,7 @@ #include "library/dao/autodjcratesdao.h" +#include "moc_autodjcratesdao.cpp" + #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) #include #endif diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 34e1368755..8a0248717f 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -1,5 +1,7 @@ #include "library/dao/playlistdao.h" +#include "moc_playlistdao.cpp" + #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) #include #endif diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp index e51ee5fbfd..2888750d14 100644 --- a/src/library/dao/trackdao.cpp +++ b/src/library/dao/trackdao.cpp @@ -18,6 +18,7 @@ #include "library/dao/playlistdao.h" #include "library/dao/trackschema.h" #include "library/queryutil.h" +#include "moc_trackdao.cpp" #include "sources/soundsourceproxy.h" #include "track/beatfactory.h" #include "track/beats.h" -- cgit v1.2.3