From 606040b25f0395ab0acdbd44a6879291ea120fc7 Mon Sep 17 00:00:00 2001 From: Tomasz Olszak Date: Wed, 2 Jul 2014 15:51:19 +0200 Subject: Added autodetection of Tizen sensors. Tizen sensors are available for mobile and common profiles. Change-Id: Icc3c3357e932dac3808aee891e467fcc9dad2181 Reviewed-by: Philippe Coval Reviewed-by: Tomasz Olszak --- config.tests/tizensensor_header/main.cpp | 55 ++++++++++++++++++++++ .../tizensensor_header/tizensensor_header.pro | 4 ++ qtsensors.pro | 3 ++ src/plugins/sensors/sensors.pro | 2 +- 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 config.tests/tizensensor_header/main.cpp create mode 100644 config.tests/tizensensor_header/tizensensor_header.pro diff --git a/config.tests/tizensensor_header/main.cpp b/config.tests/tizensensor_header/main.cpp new file mode 100644 index 00000000..4b7d002b --- /dev/null +++ b/config.tests/tizensensor_header/main.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** + ** + ** Copyright (C) 2014 Tomasz Olszak + ** Contact: http://www.qt-project.org/legal + ** + ** This file is part of the QtSensors module of the Qt Toolkit. + ** + ** $QT_BEGIN_LICENSE:LGPL$ + ** 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 Digia. For licensing terms and + ** conditions see http://qt.digia.com/licensing. For further information + ** use the contact form at http://qt.digia.com/contact-us. + ** + ** GNU Lesser General Public License Usage + ** Alternatively, this file may be used under the terms of the GNU Lesser + ** General Public License version 2.1 as published by the Free Software + ** Foundation and appearing in the file LICENSE.LGPL included in the + ** packaging of this file. Please review the following information to + ** ensure the GNU Lesser General Public License version 2.1 requirements + ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + ** + ** In addition, as a special exception, Digia gives you certain additional + ** rights. These rights are described in the Digia Qt LGPL Exception + ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. + ** + ** GNU General Public License Usage + ** Alternatively, this file may be used under the terms of the GNU + ** General Public License version 3.0 as published by the Free Software + ** Foundation and appearing in the file LICENSE.GPL included in the + ** packaging of this file. Please review the following information to + ** ensure the GNU General Public License version 3.0 requirements will be + ** met: http://www.gnu.org/copyleft/gpl.html. + ** + ** + ** $QT_END_LICENSE$ + ** + ****************************************************************************/ + +#include +#ifndef Q_OS_LINUX_TIZEN +#error "Missing Q_OS_LINUX_TIZEN" +#endif +#include + +int main(int argc, char** argv) +{ + Q_UNUSED(argc); + Q_UNUSED(argv); + sensor_h m_sensor; + Q_UNUSED(m_sensor); + return 0; +} diff --git a/config.tests/tizensensor_header/tizensensor_header.pro b/config.tests/tizensensor_header/tizensensor_header.pro new file mode 100644 index 00000000..daf9cf7c --- /dev/null +++ b/config.tests/tizensensor_header/tizensensor_header.pro @@ -0,0 +1,4 @@ +TEMPLATE = app +SOURCES += main.cpp +CONFIG += qt + diff --git a/qtsensors.pro b/qtsensors.pro index 77441730..215f0a7d 100644 --- a/qtsensors.pro +++ b/qtsensors.pro @@ -4,5 +4,8 @@ blackberry { qtCompileTest(bbsensor_compass) qtCompileTest(bbsensor_holster) } +tizen { + qtCompileTest(tizensensor_header) +} load(qt_parts) diff --git a/src/plugins/sensors/sensors.pro b/src/plugins/sensors/sensors.pro index 39d23324..302bd96e 100644 --- a/src/plugins/sensors/sensors.pro +++ b/src/plugins/sensors/sensors.pro @@ -41,4 +41,4 @@ isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, android):android:SUBDIRS += a isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, sensorfw):sensorfw:SUBDIRS += sensorfw isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, ios):ios:SUBDIRS += ios isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, winrt):winrt:SUBDIRS += winrt -isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, tizen):tizen:SUBDIRS += tizen +isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, tizen):tizen:config_tizensensor_header:SUBDIRS += tizen -- cgit v1.2.3