diff options
Diffstat (limited to 'examples/sensors/grue/import')
-rw-r--r-- | examples/sensors/grue/import/import.pro | 19 | ||||
-rw-r--r-- | examples/sensors/grue/import/main.cpp | 7 |
2 files changed, 22 insertions, 4 deletions
diff --git a/examples/sensors/grue/import/import.pro b/examples/sensors/grue/import/import.pro index 71e2249d..56623daa 100644 --- a/examples/sensors/grue/import/import.pro +++ b/examples/sensors/grue/import/import.pro @@ -2,12 +2,12 @@ TEMPLATE = lib CONFIG += plugin TARGET = $$qtLibraryTarget(declarative_grue) -TARGETPATH = Grue +DESTDIR = ../Grue QT = core gui qml sensors INCLUDEPATH += $$PWD/../lib -LIBS += -L$$OUT_PWD/../lib -lgruesensor +LIBS += -L$$OUT_PWD/.. -lgruesensor # Shared gruesensor library will be installed in parent directory. # Define rpath so that this plugin will know where to look for it. @@ -15,15 +15,26 @@ unix:!mac: QMAKE_LFLAGS += -Wl,-rpath,\\\$\$ORIGIN/.. SOURCES = main.cpp -DESTPATH=$$[QT_INSTALL_EXAMPLES]/qtsensors/grue/Grue +DESTPATH=$$[QT_INSTALL_EXAMPLES]/sensors/grue/Grue target.path=$$DESTPATH INSTALLS += target qmldir.files=$$PWD/qmldir -qmldir.path=$$DESTPATH +qmldir.path=$$DESTDIR INSTALLS += qmldir OTHER_FILES += \ plugin.json qmldir +copyfile = $$PWD/qmldir +copydest = $$DESTDIR + +# On Windows, use backslashes as directory separators +win32: { + copyfile ~= s,/,\\,g + copydest ~= s,/,\\,g +} + +# Copy the qmldir file to the same folder as the plugin binary +QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$copyfile) $$quote($$copydest) $$escape_expand(\\n\\t) diff --git a/examples/sensors/grue/import/main.cpp b/examples/sensors/grue/import/main.cpp index 5f6c925c..4191d623 100644 --- a/examples/sensors/grue/import/main.cpp +++ b/examples/sensors/grue/import/main.cpp @@ -66,6 +66,7 @@ public: // Register the 1.0 interfaces major = 1; minor = 0; + // @uri Grue qmlRegisterType <GrueSensor >(package, major, minor, "GrueSensor"); qmlRegisterUncreatableType<GrueSensorReading>(package, major, minor, "GrueSensorReading", QLatin1String("Cannot create GrueSensorReading")); } @@ -109,6 +110,7 @@ QT_END_NAMESPACE #include "main.moc" /* + \omit \qmltype GrueSensor \instantiates GrueSensor \inherits Sensor @@ -119,9 +121,11 @@ QT_END_NAMESPACE This type wraps the GrueSensor class. Please see the documentation for GrueSensor for details. + \endomit */ /* + \omit \qmltype GrueSensorReading \instantiates GrueSensorReading \inherits SensorReading @@ -134,9 +138,12 @@ QT_END_NAMESPACE GrueSensorReading for details. This type cannot be directly created. + \endomit */ /* + \omit \qmlproperty qreal Grue1::GrueSensorReading::chanceOfBeingEaten Please see GrueSensorReading::chanceOfBeingEaten for information about this property. + \endomit */ |