Cleanup: remove qPref::canonical_version() and qPref::mobile_version()

These two member functions were never used, but cause frequent
recompilation of the qPref.cpp file. Remove them for now until
their usefulness becomes evident.

These were the only functions tested in test_qPref.qml. Therefore
remove this test-file.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-04-03 23:19:13 +02:00 committed by Dirk Hohndel
parent d45f67c84d
commit 2ead52b139
3 changed files with 0 additions and 29 deletions

View file

@ -14,7 +14,6 @@
#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,16 +28,6 @@ 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

@ -8,8 +8,6 @@
class qPref : public QObject { class qPref : public QObject {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString canonical_version READ canonical_version);
Q_PROPERTY(QString mobile_version READ mobile_version);
public: public:
qPref(QObject *parent = NULL); qPref(QObject *parent = NULL);
@ -22,10 +20,6 @@ public:
// Register QML // Register QML
void registerQML(QQmlEngine *engine); void registerQML(QQmlEngine *engine);
public:
static const QString canonical_version();
static const QString mobile_version();
private: private:
static void loadSync(bool doSync); static void loadSync(bool doSync);
}; };

View file

@ -1,12 +0,0 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.6
import QtTest 1.2
TestCase {
name: "qPref"
function test_register() {
var x = Pref.mobile_version
compare(x, Pref.mobile_version)
}
}