summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsensor/test_sensorplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qsensor/test_sensorplugin.cpp')
-rw-r--r--tests/auto/qsensor/test_sensorplugin.cpp41
1 files changed, 8 insertions, 33 deletions
diff --git a/tests/auto/qsensor/test_sensorplugin.cpp b/tests/auto/qsensor/test_sensorplugin.cpp
index a48428b3..1734d3a9 100644
--- a/tests/auto/qsensor/test_sensorplugin.cpp
+++ b/tests/auto/qsensor/test_sensorplugin.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "test_sensorimpl.h"
#include "test_sensor2impl.h"
@@ -55,19 +30,19 @@ public:
// This is bad code. It caused a crash due to recursively calling
// loadPlugins() in qsensormanager.cpp (because loadPlugins() did
// not set the pluginsLoaded flag soon enough).
- (void)QSensor::defaultSensorForType(TestSensor::type);
+ (void)QSensor::defaultSensorForType(TestSensor::sensorType);
- QSensorManager::registerBackend(TestSensor::type, testsensorimpl::id, this);
- QSensorManager::registerBackend(TestSensor::type, "test sensor 2", this);
- QSensorManager::registerBackend(TestSensor2::type, testsensor2impl::id, this);
+ QSensorManager::registerBackend(TestSensor::sensorType, testsensorimpl::id, this);
+ QSensorManager::registerBackend(TestSensor::sensorType, "test sensor 2", this);
+ QSensorManager::registerBackend(TestSensor2::sensorType, testsensor2impl::id, this);
}
void sensorsChanged() override
{
// Register a new type on initial load
// This is testing the "don't emit availableSensorsChanged() too many times" functionality.
- if (!QSensorManager::isBackendRegistered(TestSensor::type, "test sensor 3"))
- QSensorManager::registerBackend(TestSensor::type, "test sensor 3", this);
+ if (!QSensorManager::isBackendRegistered(TestSensor::sensorType, "test sensor 3"))
+ QSensorManager::registerBackend(TestSensor::sensorType, "test sensor 3", this);
// When a sensor of type "a random type" is registered, register another sensor.
// This is testing the "don't emit availableSensorsChanged() too many times" functionality.