From e9fa298d06bdeb267a7931f9b54cd82b3c1e3a1b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 3 Apr 2019 23:28:26 +0200 Subject: Cleanup: make qPref::registerQML() static This member function does not access any other member of the object. Make it static. Signed-off-by: Berthold Stoeger --- tests/testqPrefDivePlanner.cpp | 2 +- tests/testqPrefGeneral.cpp | 2 +- tests/testqPrefGeocoding.cpp | 2 +- tests/testqPrefTechnicalDetails.cpp | 2 +- tests/testqml.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/testqPrefDivePlanner.cpp b/tests/testqPrefDivePlanner.cpp index 0a8812cec..5580acf80 100644 --- a/tests/testqPrefDivePlanner.cpp +++ b/tests/testqPrefDivePlanner.cpp @@ -14,7 +14,7 @@ void TestQPrefDivePlanner::initTestCase() QCoreApplication::setOrganizationName("Subsurface"); QCoreApplication::setOrganizationDomain("subsurface.hohndel.org"); QCoreApplication::setApplicationName("SubsurfaceTestQPrefDivePlanner"); - qPref::instance()->registerQML(NULL); + qPref::registerQML(NULL); } void TestQPrefDivePlanner::test_struct_get() diff --git a/tests/testqPrefGeneral.cpp b/tests/testqPrefGeneral.cpp index f3fbbd02b..9e87d4289 100644 --- a/tests/testqPrefGeneral.cpp +++ b/tests/testqPrefGeneral.cpp @@ -14,7 +14,7 @@ void TestQPrefGeneral::initTestCase() QCoreApplication::setOrganizationName("Subsurface"); QCoreApplication::setOrganizationDomain("subsurface.hohndel.org"); QCoreApplication::setApplicationName("SubsurfaceTestQPrefGeneral"); - qPref::instance()->registerQML(NULL); + qPref::registerQML(NULL); } void TestQPrefGeneral::test_struct_get() diff --git a/tests/testqPrefGeocoding.cpp b/tests/testqPrefGeocoding.cpp index 8b9f1442e..4be621d80 100644 --- a/tests/testqPrefGeocoding.cpp +++ b/tests/testqPrefGeocoding.cpp @@ -14,7 +14,7 @@ void TestQPrefGeocoding::initTestCase() QCoreApplication::setOrganizationName("Subsurface"); QCoreApplication::setOrganizationDomain("subsurface.hohndel.org"); QCoreApplication::setApplicationName("SubsurfaceTestQPrefGeocoding"); - qPref::instance()->registerQML(NULL); + qPref::registerQML(NULL); } void TestQPrefGeocoding::test_struct_get() diff --git a/tests/testqPrefTechnicalDetails.cpp b/tests/testqPrefTechnicalDetails.cpp index ebb36fd75..d1c02543c 100644 --- a/tests/testqPrefTechnicalDetails.cpp +++ b/tests/testqPrefTechnicalDetails.cpp @@ -14,7 +14,7 @@ void TestQPrefTechnicalDetails::initTestCase() QCoreApplication::setOrganizationName("Subsurface"); QCoreApplication::setOrganizationDomain("subsurface.hohndel.org"); QCoreApplication::setApplicationName("SubsurfaceTestQPrefTechnicalDetails"); - qPref::instance()->registerQML(NULL); + qPref::registerQML(NULL); } void TestQPrefTechnicalDetails::test_struct_get() diff --git a/tests/testqml.cpp b/tests/testqml.cpp index fcea8dfb1..2c354a536 100644 --- a/tests/testqml.cpp +++ b/tests/testqml.cpp @@ -15,7 +15,7 @@ int main(int argc, char **argv) QMLTestSetup setup; // register C++ types and classes (but not objects) - qPref::instance()->registerQML(NULL); + qPref::registerQML(NULL); return quick_test_main_with_setup(argc, argv, "TestQML", nullptr, &setup); #endif //QT_VERSION @@ -24,6 +24,6 @@ int main(int argc, char **argv) void QMLTestSetup::qmlEngineAvailable(QQmlEngine *engine) { // register C++ objects (but not types and classes) - qPref::instance()->registerQML(engine); + qPref::registerQML(engine); }; -- cgit v1.2.3-70-g09d2