From 503f885785d40de48a1d18d207b48552bbbdf4e5 Mon Sep 17 00:00:00 2001 From: Jonas Rabbe Date: Tue, 5 Jul 2011 14:18:51 +1000 Subject: Fixed up examples and demos Changed the .pro files and moved some things around to ensure that the examples and demos for Qt Multimedia Kit compiles and can be checked by the CI system. Change-Id: I915dc38ca76a97f20949df715725659c603231e2 Reviewed-on: http://codereview.qt.nokia.com/1136 Reviewed-by: Qt Sanity Bot Reviewed-by: Dmytro Poplavskiy Reviewed-by: Jonas Rabbe --- examples/audiodevices/audiodevices.pro | 17 ++++--- examples/audiodevices/main.cpp | 58 ++++++++++++++++++++++ examples/audioinput/audioinput.pro | 16 +++--- examples/audiooutput/audiooutput.pro | 17 ++++--- examples/audiorecorder/audiorecorder.pro | 17 ++++--- examples/camera/camera.pro | 15 +++--- examples/declarative-camera/declarative-camera.pro | 15 +++--- examples/examples.pro | 4 -- examples/main.cpp | 58 ---------------------- examples/radio/radio.pro | 17 ++++--- examples/slideshow/slideshow.pro | 12 +++-- examples/videographicsitem/videographicsitem.pro | 17 ++++--- examples/videowidget/videowidget.pro | 16 +++--- 13 files changed, 142 insertions(+), 137 deletions(-) create mode 100644 examples/audiodevices/main.cpp delete mode 100644 examples/main.cpp (limited to 'examples') diff --git a/examples/audiodevices/audiodevices.pro b/examples/audiodevices/audiodevices.pro index 2af690b8c..e7904f5a9 100644 --- a/examples/audiodevices/audiodevices.pro +++ b/examples/audiodevices/audiodevices.pro @@ -1,13 +1,7 @@ TEMPLATE = app -CONFIG += example +TARGET = audiodevices -INCLUDEPATH += ../../src/multimedia ../../src/multimedia/audio -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia - -QMAKE_RPATHDIR += $$DESTDIR +QT += multimediakit HEADERS = audiodevices.h @@ -19,3 +13,10 @@ FORMS += audiodevicesbase.ui symbian { TARGET.CAPABILITY = UserEnvironment WriteDeviceData ReadDeviceData } + +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiodevices +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiodevices + +INSTALLS += target sources + diff --git a/examples/audiodevices/main.cpp b/examples/audiodevices/main.cpp new file mode 100644 index 000000000..451be57b9 --- /dev/null +++ b/examples/audiodevices/main.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "audiodevices.h" + +int main(int argv, char **args) +{ + QApplication app(argv, args); + app.setApplicationName("Audio Device Test"); + + AudioTest audio; +#ifdef Q_OS_SYMBIAN + audio.showMaximized(); +#else + audio.show(); +#endif + + return app.exec(); +} diff --git a/examples/audioinput/audioinput.pro b/examples/audioinput/audioinput.pro index 80daa8d65..6d2aa501d 100644 --- a/examples/audioinput/audioinput.pro +++ b/examples/audioinput/audioinput.pro @@ -1,16 +1,16 @@ TEMPLATE = app -CONFIG += example +TARGET = audioinput -INCLUDEPATH += ../../src/multimedia ../../src/multimedia/audio -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia - -QMAKE_RPATHDIR += $$DESTDIR +QT += multimediakit HEADERS = audioinput.h SOURCES = audioinput.cpp \ main.cpp +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audioinput +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audioinput + +INSTALLS += target sources + diff --git a/examples/audiooutput/audiooutput.pro b/examples/audiooutput/audiooutput.pro index 63d037f60..38159fa70 100644 --- a/examples/audiooutput/audiooutput.pro +++ b/examples/audiooutput/audiooutput.pro @@ -1,15 +1,16 @@ TEMPLATE = app -CONFIG += example +TARGET += audiooutput -INCLUDEPATH += ../../src/multimedia ../../src/multimedia/audio -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia - -QMAKE_RPATHDIR += $$DESTDIR +QT += multimediakit HEADERS = audiooutput.h SOURCES = audiooutput.cpp \ main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiooutput +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiooutput + +INSTALLS += target sources + diff --git a/examples/audiorecorder/audiorecorder.pro b/examples/audiorecorder/audiorecorder.pro index 99502414e..9b56a8cd2 100644 --- a/examples/audiorecorder/audiorecorder.pro +++ b/examples/audiorecorder/audiorecorder.pro @@ -1,13 +1,7 @@ TEMPLATE = app -CONFIG += example +TARGET = audiorecorder -INCLUDEPATH += ../../src/multimedia ../../src/multimedia/audio -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia - -QMAKE_RPATHDIR += $$DESTDIR +QT += multimediakit HEADERS = \ audiorecorder.h @@ -27,3 +21,10 @@ maemo*: { symbian: { TARGET.CAPABILITY = UserEnvironment ReadDeviceData WriteDeviceData } + +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiorecorder +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiorecorder + +INSTALLS += target sources + diff --git a/examples/camera/camera.pro b/examples/camera/camera.pro index 2d657e887..6ec82caf5 100644 --- a/examples/camera/camera.pro +++ b/examples/camera/camera.pro @@ -1,13 +1,7 @@ TEMPLATE = app TARGET = camera -INCLUDEPATH+=../../src/multimedia \ - ../../src/multimedia/video - -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia +QT += multimediakit HEADERS = \ camera.h \ @@ -31,3 +25,10 @@ symbian { TARGET.EPOCHEAPSIZE = 0x20000 0x3000000 LIBS += -lavkon -leiksrv -lcone -leikcore } + +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/camera +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/camera + +INSTALLS += target sources + diff --git a/examples/declarative-camera/declarative-camera.pro b/examples/declarative-camera/declarative-camera.pro index 297361cf3..d0db15776 100644 --- a/examples/declarative-camera/declarative-camera.pro +++ b/examples/declarative-camera/declarative-camera.pro @@ -1,8 +1,7 @@ -include (../mobility_examples.pri) TEMPLATE=app -QT += declarative network +QT += declarative network multimediakit !maemo5 { contains(QT_CONFIG, opengl) { @@ -10,12 +9,6 @@ QT += declarative network } } -win32 { - #required by Qt SDK to resolve Mobility libraries - CONFIG+=mobility - MOBILITY+=multimedia -} - SOURCES += $$PWD/qmlcamera.cpp !mac:TARGET = qml_camera else:TARGET = QmlCamera @@ -29,3 +22,9 @@ symbian { TARGET.EPOCHEAPSIZE = 0x20000 0x3000000 } +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/qml_camera +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/qml_camera + +INSTALLS += target sources + diff --git a/examples/examples.pro b/examples/examples.pro index fd0069732..522b1b561 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -15,7 +15,3 @@ contains(QT_CONFIG, declarative) { SUBDIRS += declarative-camera } -sources.path = $$QT_MOBILITY_EXAMPLES - -INSTALLS += sources - diff --git a/examples/main.cpp b/examples/main.cpp deleted file mode 100644 index 451be57b9..000000000 --- a/examples/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#include "audiodevices.h" - -int main(int argv, char **args) -{ - QApplication app(argv, args); - app.setApplicationName("Audio Device Test"); - - AudioTest audio; -#ifdef Q_OS_SYMBIAN - audio.showMaximized(); -#else - audio.show(); -#endif - - return app.exec(); -} diff --git a/examples/radio/radio.pro b/examples/radio/radio.pro index 386efd4a5..b0b9ff3dc 100644 --- a/examples/radio/radio.pro +++ b/examples/radio/radio.pro @@ -1,13 +1,7 @@ TEMPLATE = app -CONFIG += example +TARGET = radio -INCLUDEPATH += ../../src/multimedia -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia - -QMAKE_RPATHDIR += $$DESTDIR +QT += multimediakit HEADERS = \ radio.h @@ -19,3 +13,10 @@ SOURCES = \ symbian: { TARGET.CAPABILITY = UserEnvironment WriteDeviceData ReadDeviceData SwEvent } + +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/radio +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/radio + +INSTALLS += target sources + diff --git a/examples/slideshow/slideshow.pro b/examples/slideshow/slideshow.pro index 76c660a16..e969ade66 100644 --- a/examples/slideshow/slideshow.pro +++ b/examples/slideshow/slideshow.pro @@ -1,10 +1,7 @@ TEMPLATE = app TARGET = slideshow -INCLUDEPATH+=../../src/multimedia -include (../mobility_examples.pri) -CONFIG += mobility -MOBILITY = multimedia +QT += multimediakit HEADERS = \ slideshow.h @@ -17,3 +14,10 @@ symbian { TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x3000000 } + +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/slideshow +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/slideshow + +INSTALLS += target sources + diff --git a/examples/videographicsitem/videographicsitem.pro b/examples/videographicsitem/videographicsitem.pro index 8461bebe6..4738dfa64 100644 --- a/examples/videographicsitem/videographicsitem.pro +++ b/examples/videographicsitem/videographicsitem.pro @@ -1,13 +1,7 @@ TEMPLATE = app -CONFIG += example +TARGET = videographicsitem -INCLUDEPATH += ../../src/multimedia ../../src/multimedia/video -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia - -QMAKE_RPATHDIR += $$DESTDIR +QT += multimediakit !symbian:contains(QT_CONFIG, opengl): QT += opengl @@ -17,3 +11,10 @@ HEADERS += videoplayer.h \ SOURCES += main.cpp \ videoplayer.cpp \ videoitem.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/videographicsitem +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/videographicsitem + +INSTALLS += target sources + diff --git a/examples/videowidget/videowidget.pro b/examples/videowidget/videowidget.pro index 1ef79fcaa..40f2cc17a 100644 --- a/examples/videowidget/videowidget.pro +++ b/examples/videowidget/videowidget.pro @@ -1,13 +1,7 @@ TEMPLATE = app -CONFIG += example +TARGET = videowidget -INCLUDEPATH += ../../src/multimedia ../../src/multimedia/video -include(../mobility_examples.pri) - -CONFIG += mobility -MOBILITY = multimedia - -QMAKE_RPATHDIR += $$DESTDIR +QT += multimediakit HEADERS = \ videoplayer.h \ @@ -20,3 +14,9 @@ SOURCES = \ videowidget.cpp \ videowidgetsurface.cpp +target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/videowidget +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/videowidget + +INSTALLS += target sources + -- cgit v1.2.3