summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/sensors/grue/console_app/console_app.pro1
-rw-r--r--examples/sensors/grue/import/import.pro2
-rw-r--r--examples/sensors/grue/lib/gruesensor.h12
-rw-r--r--examples/sensors/grue/lib/lib.pro2
-rw-r--r--examples/sensors/grue/plugin/main.cpp2
5 files changed, 14 insertions, 5 deletions
diff --git a/examples/sensors/grue/console_app/console_app.pro b/examples/sensors/grue/console_app/console_app.pro
index fefc0157..33d43176 100644
--- a/examples/sensors/grue/console_app/console_app.pro
+++ b/examples/sensors/grue/console_app/console_app.pro
@@ -1,5 +1,6 @@
TEMPLATE=app
TARGET=detect_grue
+CONFIG += console
QT=core sensors
SOURCES=main.cpp
diff --git a/examples/sensors/grue/import/import.pro b/examples/sensors/grue/import/import.pro
index f76b089d..0bb108f7 100644
--- a/examples/sensors/grue/import/import.pro
+++ b/examples/sensors/grue/import/import.pro
@@ -3,7 +3,7 @@ TARGETPATH = Grue
include(qsensorsimport.pri)
-QT = declarative sensors
+QT = core gui declarative sensors
INCLUDEPATH += $$PWD/../lib
LIBS += -L$$OUT_PWD/../lib -lgruesensor
diff --git a/examples/sensors/grue/lib/gruesensor.h b/examples/sensors/grue/lib/gruesensor.h
index 48df1fd8..1465aaaa 100644
--- a/examples/sensors/grue/lib/gruesensor.h
+++ b/examples/sensors/grue/lib/gruesensor.h
@@ -45,7 +45,13 @@
class GrueSensorReadingPrivate;
-class GrueSensorReading : public QSensorReading
+#if defined(QT_BUILD_GRUE_LIB)
+# define Q_GRUE_EXPORT Q_DECL_EXPORT
+#else
+# define Q_GRUE_EXPORT Q_DECL_IMPORT
+#endif
+
+class Q_GRUE_EXPORT GrueSensorReading : public QSensorReading
{
Q_OBJECT
Q_PROPERTY(qreal chanceOfBeingEaten READ chanceOfBeingEaten WRITE setChanceOfBeingEaten)
@@ -57,7 +63,7 @@ public:
// begin generated code
-class GrueFilter : public QSensorFilter
+class Q_GRUE_EXPORT GrueFilter : public QSensorFilter
{
public:
virtual bool filter(GrueSensorReading *reading) = 0;
@@ -65,7 +71,7 @@ private:
bool filter(QSensorReading *reading) { return filter(static_cast<GrueSensorReading*>(reading)); }
};
-class GrueSensor : public QSensor
+class Q_GRUE_EXPORT GrueSensor : public QSensor
{
Q_OBJECT
public:
diff --git a/examples/sensors/grue/lib/lib.pro b/examples/sensors/grue/lib/lib.pro
index 1cce4dae..dcfd6895 100644
--- a/examples/sensors/grue/lib/lib.pro
+++ b/examples/sensors/grue/lib/lib.pro
@@ -1,6 +1,8 @@
TEMPLATE = lib
TARGET = gruesensor
+DESTDIR = $$OUT_PWD
+DEFINES *= QT_BUILD_GRUE_LIB
QT = core sensors
HEADERS += gruesensor.h\
diff --git a/examples/sensors/grue/plugin/main.cpp b/examples/sensors/grue/plugin/main.cpp
index 50333f2d..74a8900d 100644
--- a/examples/sensors/grue/plugin/main.cpp
+++ b/examples/sensors/grue/plugin/main.cpp
@@ -77,7 +77,7 @@ public:
QStringList keys() const { return QStringList() << "grue";}
};
-Q_EXPORT_PLUGIN2(libsensors_grueplugin, GrueSensorPlugin);
+Q_EXPORT_PLUGIN2(libsensors_grueplugin, GrueSensorPlugin)
#include "main.moc"