summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Olszak <olszak.tomasz@gmail.com>2014-07-02 15:51:19 +0200
committerTomasz Olszak <olszak.tomasz@gmail.com>2015-02-26 16:07:13 +0100
commit606040b25f0395ab0acdbd44a6879291ea120fc7 (patch)
tree6aae21957320ba9f2d411364d3004b4029228ad1
parent9c69ffa9a60b8d573491b71ed4187140e827724b (diff)
Added autodetection of Tizen sensors.
Tizen sensors are available for mobile and common profiles. Change-Id: Icc3c3357e932dac3808aee891e467fcc9dad2181 Reviewed-by: Philippe Coval <rzr@gna.org> Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
-rw-r--r--config.tests/tizensensor_header/main.cpp55
-rw-r--r--config.tests/tizensensor_header/tizensensor_header.pro4
-rw-r--r--qtsensors.pro3
-rw-r--r--src/plugins/sensors/sensors.pro2
4 files changed, 63 insertions, 1 deletions
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 <QtCore/qglobal.h>
+#ifndef Q_OS_LINUX_TIZEN
+#error "Missing Q_OS_LINUX_TIZEN"
+#endif
+#include <system/sensors.h>
+
+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