qPref: reduce recompiles with every commit

Including ssrf-version.h in an include file that a lot of files depend on
caused a ton of unnecessary recompiles with every commit. This should reduce
that problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-10-24 22:28:26 +01:00
parent d9588ec5df
commit 4461b47965
2 changed files with 13 additions and 3 deletions

View file

@ -15,6 +15,7 @@
#include "qPrefTechnicalDetails.h" #include "qPrefTechnicalDetails.h"
#include "qPrefUnit.h" #include "qPrefUnit.h"
#include "qPrefUpdateManager.h" #include "qPrefUpdateManager.h"
#include "ssrf-version.h"
#include <QtQml> #include <QtQml>
#include <QQmlContext> #include <QQmlContext>
@ -29,6 +30,16 @@ qPref *qPref::instance()
return self; return self;
} }
const QString qPref::canonical_version()
{
return QString(CANONICAL_VERSION_STRING);
}
const QString qPref::mobile_version()
{
return QString(MOBILE_VERSION_STRING);
}
void qPref::loadSync(bool doSync) void qPref::loadSync(bool doSync)
{ {
if (!doSync) if (!doSync)

View file

@ -2,7 +2,6 @@
#ifndef QPREF_H #ifndef QPREF_H
#define QPREF_H #define QPREF_H
#include "core/pref.h" #include "core/pref.h"
#include "ssrf-version.h"
#include <QObject> #include <QObject>
#include <QQmlEngine> #include <QQmlEngine>
@ -24,8 +23,8 @@ public:
void registerQML(QQmlEngine *engine); void registerQML(QQmlEngine *engine);
public: public:
static const QString canonical_version() { return QString(CANONICAL_VERSION_STRING); } static const QString canonical_version();
static const QString mobile_version() { return QString(MOBILE_VERSION_STRING); } static const QString mobile_version();
private: private:
static void loadSync(bool doSync); static void loadSync(bool doSync);