core/settings: allow signals to be strongly typed in C++

Register enums to allow them to be used in signal handlers instead of int.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
jan Iversen 2020-01-19 12:25:17 +01:00 committed by Dirk Hohndel
parent 75fe59b0da
commit 13b2b9f19c
2 changed files with 19 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#include "core/pref.h"
#include "core/qthelper.h"
#include "core/settings/qPref.h"
#include "core/settings/qPrefUnit.h"
#include <QTest>
@ -13,6 +14,7 @@ void TestQPrefUnits::initTestCase()
QCoreApplication::setOrganizationName("Subsurface");
QCoreApplication::setOrganizationDomain("subsurface.hohndel.org");
QCoreApplication::setApplicationName("SubsurfaceTestQPrefUnits");
qPref::registerQML(NULL);
}
void TestQPrefUnits::test_struct_get()