diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 19:51:38 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 19:51:38 +0200 |
commit | 318159c8492883d7ef29804a68c398cceaa5f89a (patch) | |
tree | 0ff2aa045f10b54438242d83102d588a89ef020c /src/imports | |
parent | b0a50235bc8b59896478e7b238dbeb463f948863 (diff) | |
parent | d50a09965ae53e02caabdbcf4994ed9bc0ea3293 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: Ia6a6b6fce7aeca446b5e87ff72076fb8be2ada04
Diffstat (limited to 'src/imports')
21 files changed, 388 insertions, 30 deletions
diff --git a/src/imports/audioengine/audioengine.cpp b/src/imports/audioengine/audioengine.cpp index 4d29528f9..aa2d195c5 100644 --- a/src/imports/audioengine/audioengine.cpp +++ b/src/imports/audioengine/audioengine.cpp @@ -70,8 +70,8 @@ public: qmlRegisterType<QDeclarativeAttenuationModelInverse>(uri, 1, 0, "AttenuationModelInverse"); // Dynamically adding audio engine related objects is only supported through revision 1 - qmlRegisterRevision<QDeclarativeAudioEngine, 1>(uri, 1, 1); - qmlRegisterRevision<QDeclarativeSound, 1>(uri, 1, 1); + qmlRegisterType<QDeclarativeAudioEngine, 1>(uri, 1, 1, "AudioEngine"); + qmlRegisterType<QDeclarativeSound, 1>(uri, 1, 1, "Sound"); } }; diff --git a/src/imports/audioengine/plugins.qmltypes b/src/imports/audioengine/plugins.qmltypes index 8c6267bda..22fad073a 100644 --- a/src/imports/audioengine/plugins.qmltypes +++ b/src/imports/audioengine/plugins.qmltypes @@ -1,11 +1,13 @@ -import QtQuick.tooling 1.1 +import QtQuick.tooling 1.2 // This file describes the plugin-supplied types contained in the library. // It is used for QML tooling purposes only. // -// This file was auto-generated with the command 'qmlplugindump -notrelocatable QtAudioEngine 1.0'. +// This file was auto-generated by: +// 'qmlplugindump -nonrelocatable QtAudioEngine 1.0' Module { + dependencies: [] Component { name: "QDeclarativeAttenuationModel" prototype: "QObject" @@ -50,8 +52,11 @@ Module { name: "QDeclarativeAudioEngine" defaultProperty: "bank" prototype: "QObject" - exports: ["QtAudioEngine/AudioEngine 1.0"] - exportMetaObjectRevisions: [0] + exports: [ + "QtAudioEngine/AudioEngine 1.0", + "QtAudioEngine/AudioEngine 1.1" + ] + exportMetaObjectRevisions: [0, 1] Property { name: "bank"; type: "QObject"; isList: true; isReadonly: true } Property { name: "categories"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "samples"; type: "QObject"; isReadonly: true; isPointer: true } @@ -70,6 +75,26 @@ Module { Signal { name: "liveInstanceCountChanged" } Signal { name: "isLoadingChanged" } Signal { name: "finishedLoading" } + Method { + name: "addAudioSample" + revision: 1 + Parameter { type: "QDeclarativeAudioSample"; isPointer: true } + } + Method { + name: "addSound" + revision: 1 + Parameter { type: "QDeclarativeSound"; isPointer: true } + } + Method { + name: "addAudioCategory" + revision: 1 + Parameter { type: "QDeclarativeAudioCategory"; isPointer: true } + } + Method { + name: "addAttenuationModel" + revision: 1 + Parameter { type: "QDeclarativeAttenuationModel"; isPointer: true } + } } Component { name: "QDeclarativeAudioListener" @@ -111,8 +136,8 @@ Module { name: "QDeclarativeSound" defaultProperty: "playVariationlist" prototype: "QObject" - exports: ["QtAudioEngine/Sound 1.0"] - exportMetaObjectRevisions: [0] + exports: ["QtAudioEngine/Sound 1.0", "QtAudioEngine/Sound 1.1"] + exportMetaObjectRevisions: [0, 1] Enum { name: "PlayType" values: { @@ -196,6 +221,11 @@ Module { Parameter { name: "pitch"; type: "double" } } Method { name: "newInstance"; type: "QDeclarativeSoundInstance*" } + Method { + name: "addPlayVariation" + revision: 1 + Parameter { type: "QDeclarativePlayVariation"; isPointer: true } + } } Component { name: "QDeclarativeSoundCone" diff --git a/src/imports/audioengine/qaudioengine_openal_p.h b/src/imports/audioengine/qaudioengine_openal_p.h index f534ab8c4..c2cecff40 100644 --- a/src/imports/audioengine/qaudioengine_openal_p.h +++ b/src/imports/audioengine/qaudioengine_openal_p.h @@ -34,6 +34,17 @@ #ifndef QAUDIOENGINE_OPENAL_P_H #define QAUDIOENGINE_OPENAL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QObject> #include <QList> #include <QMap> diff --git a/src/imports/audioengine/qaudioengine_p.h b/src/imports/audioengine/qaudioengine_p.h index d62e4de48..dccce09ed 100644 --- a/src/imports/audioengine/qaudioengine_p.h +++ b/src/imports/audioengine/qaudioengine_p.h @@ -34,6 +34,17 @@ #ifndef QAUDIOENGINE_P_H #define QAUDIOENGINE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtCore/QObject> #include <QtCore/QMap> #include <QtCore/QUrl> diff --git a/src/imports/audioengine/qdeclarative_attenuationmodel_p.h b/src/imports/audioengine/qdeclarative_attenuationmodel_p.h index f276757de..d4d12df04 100644 --- a/src/imports/audioengine/qdeclarative_attenuationmodel_p.h +++ b/src/imports/audioengine/qdeclarative_attenuationmodel_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVEATTENUATIONMODEL_P_H #define QDECLARATIVEATTENUATIONMODEL_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtQml/qqml.h> #include <QVector3D> diff --git a/src/imports/audioengine/qdeclarative_audiocategory_p.h b/src/imports/audioengine/qdeclarative_audiocategory_p.h index 0345edfdb..cdcd7351c 100644 --- a/src/imports/audioengine/qdeclarative_audiocategory_p.h +++ b/src/imports/audioengine/qdeclarative_audiocategory_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVEAUDIOCATEGORY_P_H #define QDECLARATIVEAUDIOCATEGORY_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtQml/qqml.h> QT_BEGIN_NAMESPACE diff --git a/src/imports/audioengine/qdeclarative_audioengine_p.h b/src/imports/audioengine/qdeclarative_audioengine_p.h index 7ae6049f0..497fdecac 100644 --- a/src/imports/audioengine/qdeclarative_audioengine_p.h +++ b/src/imports/audioengine/qdeclarative_audioengine_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVEAUDIOENGINE_P_H #define QDECLARATIVEAUDIOENGINE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtQml/qqml.h> #include <QtQml/qqmlcomponent.h> #include <QtQml/qqmlpropertymap.h> diff --git a/src/imports/audioengine/qdeclarative_audiolistener_p.h b/src/imports/audioengine/qdeclarative_audiolistener_p.h index 057e4c492..907333b83 100644 --- a/src/imports/audioengine/qdeclarative_audiolistener_p.h +++ b/src/imports/audioengine/qdeclarative_audiolistener_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVEAUDIOLISTENER_P_H #define QDECLARATIVEAUDIOLISTENER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtCore/QObject> #include <QtGui/qvector3d.h> diff --git a/src/imports/audioengine/qdeclarative_audiosample_p.h b/src/imports/audioengine/qdeclarative_audiosample_p.h index 5b549e785..2b8d9f8da 100644 --- a/src/imports/audioengine/qdeclarative_audiosample_p.h +++ b/src/imports/audioengine/qdeclarative_audiosample_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVEAUDIOSAMPLE_P_H #define QDECLARATIVEAUDIOSAMPLE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtQml/qqml.h> QT_BEGIN_NAMESPACE diff --git a/src/imports/audioengine/qdeclarative_playvariation_p.h b/src/imports/audioengine/qdeclarative_playvariation_p.h index d0eed0d0a..4a8306d72 100644 --- a/src/imports/audioengine/qdeclarative_playvariation_p.h +++ b/src/imports/audioengine/qdeclarative_playvariation_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVEPLAYVARIATION_P_H #define QDECLARATIVEPLAYVARIATION_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtQml/qqml.h> QT_BEGIN_NAMESPACE diff --git a/src/imports/audioengine/qdeclarative_sound_p.h b/src/imports/audioengine/qdeclarative_sound_p.h index 83b1eb2af..494fe2e34 100644 --- a/src/imports/audioengine/qdeclarative_sound_p.h +++ b/src/imports/audioengine/qdeclarative_sound_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVESOUND_P_H #define QDECLARATIVESOUND_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtQml/qqml.h> #include <QtCore/qlist.h> #include "qdeclarative_playvariation_p.h" diff --git a/src/imports/audioengine/qdeclarative_soundinstance_p.h b/src/imports/audioengine/qdeclarative_soundinstance_p.h index 55310a3ae..80fe82e47 100644 --- a/src/imports/audioengine/qdeclarative_soundinstance_p.h +++ b/src/imports/audioengine/qdeclarative_soundinstance_p.h @@ -34,6 +34,17 @@ #ifndef QDECLARATIVE_SOUNDINSTANCE_P_H #define QDECLARATIVE_SOUNDINSTANCE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtCore/QObject> #include <QtGui/qvector3d.h> #include "qsoundinstance_p.h" diff --git a/src/imports/audioengine/qsoundbuffer_p.h b/src/imports/audioengine/qsoundbuffer_p.h index 9a98b59ba..9f7af625a 100644 --- a/src/imports/audioengine/qsoundbuffer_p.h +++ b/src/imports/audioengine/qsoundbuffer_p.h @@ -34,6 +34,17 @@ #ifndef QSOUNDBUFFER_P_H #define QSOUNDBUFFER_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QObject> QT_BEGIN_NAMESPACE diff --git a/src/imports/audioengine/qsoundinstance_p.h b/src/imports/audioengine/qsoundinstance_p.h index 37b252b98..39bab3231 100644 --- a/src/imports/audioengine/qsoundinstance_p.h +++ b/src/imports/audioengine/qsoundinstance_p.h @@ -34,6 +34,17 @@ #ifndef QSOUNDINSTANCE_P_H #define QSOUNDINSTANCE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QVector3D> #include <QObject> #include "qsoundsource_p.h" diff --git a/src/imports/audioengine/qsoundsource_p.h b/src/imports/audioengine/qsoundsource_p.h index b9f68ff98..dfe8d0851 100644 --- a/src/imports/audioengine/qsoundsource_p.h +++ b/src/imports/audioengine/qsoundsource_p.h @@ -34,6 +34,17 @@ #ifndef QSOUNDSOURCE_P_H #define QSOUNDSOURCE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QVector3D> #include <QObject> diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp index 4dcb7c61e..7d34672a1 100644 --- a/src/imports/multimedia/multimedia.cpp +++ b/src/imports/multimedia/multimedia.cpp @@ -98,7 +98,7 @@ public: trUtf8("CameraImageProcessing is provided by Camera")); // 5.2 types - qmlRegisterRevision<QDeclarativeVideoOutput, 2>(uri, 5, 2); + qmlRegisterType<QDeclarativeVideoOutput, 2>(uri, 5, 2, "VideoOutput"); // 5.3 types // Nothing changed, but adding "import QtMultimedia 5.3" in QML will fail unless at @@ -107,16 +107,17 @@ public: // 5.4 types qmlRegisterSingletonType<QDeclarativeMultimediaGlobal>(uri, 5, 4, "QtMultimedia", multimedia_global_object); - qmlRegisterRevision<QDeclarativeCamera, 1>(uri, 5, 4); + qmlRegisterType<QDeclarativeCamera, 1>(uri, 5, 4, "Camera"); qmlRegisterUncreatableType<QDeclarativeCameraViewfinder>(uri, 5, 4, "CameraViewfinder", trUtf8("CameraViewfinder is provided by Camera")); // 5.5 types qmlRegisterUncreatableType<QDeclarativeCameraImageProcessing, 1>(uri, 5, 5, "CameraImageProcessing", trUtf8("CameraImageProcessing is provided by Camera")); - qmlRegisterRevision<QDeclarativeCamera, 2>(uri, 5, 5); + qmlRegisterType<QDeclarativeCamera, 2>(uri, 5, 5, "Camera"); // 5.6 types - qmlRegisterRevision<QDeclarativeAudio, 1>(uri, 5, 6); + qmlRegisterType<QDeclarativeAudio, 1>(uri, 5, 6, "Audio"); + qmlRegisterType<QDeclarativeAudio, 1>(uri, 5, 6, "MediaPlayer"); qmlRegisterType<QDeclarativePlaylist>(uri, 5, 6, "Playlist"); qmlRegisterType<QDeclarativePlaylistItem>(uri, 5, 6, "PlaylistItem"); diff --git a/src/imports/multimedia/plugins.qmltypes b/src/imports/multimedia/plugins.qmltypes index 11d423f24..fe1c68af2 100644 --- a/src/imports/multimedia/plugins.qmltypes +++ b/src/imports/multimedia/plugins.qmltypes @@ -146,8 +146,13 @@ Module { Component { name: "QDeclarativeAudio" prototype: "QObject" - exports: ["QtMultimedia/Audio 5.0", "QtMultimedia/MediaPlayer 5.0"] - exportMetaObjectRevisions: [0, 0] + exports: [ + "QtMultimedia/Audio 5.0", + "QtMultimedia/Audio 5.6", + "QtMultimedia/MediaPlayer 5.0", + "QtMultimedia/MediaPlayer 5.6" + ] + exportMetaObjectRevisions: [0, 1, 0, 1] Enum { name: "Status" values: { @@ -212,6 +217,7 @@ Module { } } Property { name: "source"; type: "QUrl" } + Property { name: "playlist"; revision: 1; type: "QDeclarativePlaylist"; isPointer: true } Property { name: "loops"; type: "int" } Property { name: "playbackState"; type: "PlaybackState"; isReadonly: true } Property { name: "autoPlay"; type: "bool" } @@ -237,6 +243,7 @@ Module { Property { name: "mediaObject"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "availability"; type: "Availability"; isReadonly: true } Property { name: "audioRole"; revision: 1; type: "AudioRole" } + Signal { name: "playlistChanged"; revision: 1 } Signal { name: "loopCountChanged" } Signal { name: "paused" } Signal { name: "stopped" } @@ -263,8 +270,12 @@ Module { Component { name: "QDeclarativeCamera" prototype: "QObject" - exports: ["QtMultimedia/Camera 5.0"] - exportMetaObjectRevisions: [0] + exports: [ + "QtMultimedia/Camera 5.0", + "QtMultimedia/Camera 5.4", + "QtMultimedia/Camera 5.5" + ] + exportMetaObjectRevisions: [0, 1, 2] Enum { name: "Position" values: { @@ -536,7 +547,7 @@ Module { name: "supportedViewfinderFrameRateRanges" revision: 2 type: "QJSValue" - Parameter { name: "resolution"; type: "QSize" } + Parameter { name: "resolution"; type: "QJSValue" } } Method { name: "supportedViewfinderFrameRateRanges"; revision: 2; type: "QJSValue" } } @@ -1229,6 +1240,137 @@ Module { Property { name: "availableCameras"; type: "QJSValue"; isReadonly: true } } Component { + name: "QDeclarativePlaylist" + defaultProperty: "items" + prototype: "QAbstractListModel" + exports: ["QtMultimedia/Playlist 5.6"] + exportMetaObjectRevisions: [0] + Enum { + name: "PlaybackMode" + values: { + "CurrentItemOnce": 0, + "CurrentItemInLoop": 1, + "Sequential": 2, + "Loop": 3, + "Random": 4 + } + } + Enum { + name: "Error" + values: { + "NoError": 0, + "FormatError": 1, + "FormatNotSupportedError": 2, + "NetworkError": 3, + "AccessDeniedError": 4 + } + } + Property { name: "playbackMode"; type: "PlaybackMode" } + Property { name: "currentItemSource"; type: "QUrl"; isReadonly: true } + Property { name: "currentIndex"; type: "int" } + Property { name: "itemCount"; type: "int"; isReadonly: true } + Property { name: "readOnly"; type: "bool"; isReadonly: true } + Property { name: "error"; type: "Error"; isReadonly: true } + Property { name: "errorString"; type: "string"; isReadonly: true } + Property { name: "items"; type: "QDeclarativePlaylistItem"; isList: true; isReadonly: true } + Signal { + name: "itemAboutToBeInserted" + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + } + Signal { + name: "itemInserted" + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + } + Signal { + name: "itemAboutToBeRemoved" + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + } + Signal { + name: "itemRemoved" + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + } + Signal { + name: "itemChanged" + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + } + Signal { name: "loaded" } + Signal { name: "loadFailed" } + Signal { + name: "error" + Parameter { name: "error"; type: "QDeclarativePlaylist::Error" } + Parameter { name: "errorString"; type: "string" } + } + Method { + name: "itemSource" + type: "QUrl" + Parameter { name: "index"; type: "int" } + } + Method { + name: "nextIndex" + type: "int" + Parameter { name: "steps"; type: "int" } + } + Method { name: "nextIndex"; type: "int" } + Method { + name: "previousIndex" + type: "int" + Parameter { name: "steps"; type: "int" } + } + Method { name: "previousIndex"; type: "int" } + Method { name: "next" } + Method { name: "previous" } + Method { name: "shuffle" } + Method { + name: "load" + Parameter { name: "location"; type: "QUrl" } + Parameter { name: "format"; type: "string" } + } + Method { + name: "load" + Parameter { name: "location"; type: "QUrl" } + } + Method { + name: "save" + type: "bool" + Parameter { name: "location"; type: "QUrl" } + Parameter { name: "format"; type: "string" } + } + Method { + name: "save" + type: "bool" + Parameter { name: "location"; type: "QUrl" } + } + Method { + name: "addItem" + type: "bool" + Parameter { name: "source"; type: "QUrl" } + } + Method { + name: "insertItem" + type: "bool" + Parameter { name: "index"; type: "int" } + Parameter { name: "source"; type: "QUrl" } + } + Method { + name: "removeItem" + type: "bool" + Parameter { name: "index"; type: "int" } + } + Method { name: "clear"; type: "bool" } + } + Component { + name: "QDeclarativePlaylistItem" + prototype: "QObject" + exports: ["QtMultimedia/PlaylistItem 5.6"] + exportMetaObjectRevisions: [0] + Property { name: "source"; type: "QUrl" } + } + Component { name: "QDeclarativeRadio" prototype: "QObject" exports: ["QtMultimedia/Radio 5.0"] @@ -1516,8 +1658,11 @@ Module { name: "QDeclarativeVideoOutput" defaultProperty: "data" prototype: "QQuickItem" - exports: ["QtMultimedia/VideoOutput 5.0"] - exportMetaObjectRevisions: [0] + exports: [ + "QtMultimedia/VideoOutput 5.0", + "QtMultimedia/VideoOutput 5.2" + ] + exportMetaObjectRevisions: [0, 2] Enum { name: "FillMode" values: { diff --git a/src/imports/multimedia/qdeclarativecamera.cpp b/src/imports/multimedia/qdeclarativecamera.cpp index 5930b20fb..eac1c0c9b 100644 --- a/src/imports/multimedia/qdeclarativecamera.cpp +++ b/src/imports/multimedia/qdeclarativecamera.cpp @@ -1013,12 +1013,17 @@ QJSValue QDeclarativeCamera::supportedViewfinderResolutions(qreal minimumFrameRa \since 5.5 */ -QJSValue QDeclarativeCamera::supportedViewfinderFrameRateRanges(const QSize &resolution) +QJSValue QDeclarativeCamera::supportedViewfinderFrameRateRanges(const QJSValue &resolution) { QQmlEngine *engine = qmlEngine(this); QCameraViewfinderSettings settings; - settings.setResolution(resolution); + if (!resolution.isUndefined()) { + QJSValue width = resolution.property(QStringLiteral("width")); + QJSValue height = resolution.property(QStringLiteral("height")); + if (width.isNumber() && height.isNumber()) + settings.setResolution(width.toInt(), height.toInt()); + } QList<QCamera::FrameRateRange> frameRateRanges = m_camera->supportedViewfinderFrameRateRanges(settings); QJSValue supportedFrameRateRanges = engine->newArray(frameRateRanges.count()); diff --git a/src/imports/multimedia/qdeclarativecamera_p.h b/src/imports/multimedia/qdeclarativecamera_p.h index 623460c59..b3f199a57 100644 --- a/src/imports/multimedia/qdeclarativecamera_p.h +++ b/src/imports/multimedia/qdeclarativecamera_p.h @@ -57,6 +57,7 @@ #include <QtCore/qdatetime.h> #include <QtQml/qqmlparserstatus.h> #include <QtQml/qqml.h> +#include <QtQml/qjsvalue.h> QT_BEGIN_NAMESPACE @@ -297,7 +298,7 @@ public Q_SLOTS: Q_REVISION(2) QJSValue supportedViewfinderResolutions(qreal minimumFrameRate = 0.0, qreal maximumFrameRate = 0.0); - Q_REVISION(2) QJSValue supportedViewfinderFrameRateRanges(const QSize &resolution = QSize()); + Q_REVISION(2) QJSValue supportedViewfinderFrameRateRanges(const QJSValue &resolution = QJSValue()); Q_SIGNALS: void errorChanged(); diff --git a/src/imports/multimedia/qdeclarativeradiodata.cpp b/src/imports/multimedia/qdeclarativeradiodata.cpp index 51d3bb877..f272e8d09 100644 --- a/src/imports/multimedia/qdeclarativeradiodata.cpp +++ b/src/imports/multimedia/qdeclarativeradiodata.cpp @@ -129,7 +129,10 @@ QDeclarativeRadioData::~QDeclarativeRadioData() */ QDeclarativeRadioData::Availability QDeclarativeRadioData::availability() const { - return Availability(m_radioData->availability()); + if (m_radioData) + return Availability(m_radioData->availability()); + + return Unavailable; } @@ -141,7 +144,10 @@ QDeclarativeRadioData::Availability QDeclarativeRadioData::availability() const */ QString QDeclarativeRadioData::stationId() const { - return m_radioData->stationId(); + if (m_radioData) + return m_radioData->stationId(); + + return QString(); } /*! @@ -206,7 +212,10 @@ QString QDeclarativeRadioData::stationId() const */ QDeclarativeRadioData::ProgramType QDeclarativeRadioData::programType() const { - return static_cast<QDeclarativeRadioData::ProgramType>(m_radioData->programType()); + if (m_radioData) + return static_cast<QDeclarativeRadioData::ProgramType>(m_radioData->programType()); + + return Undefined; } /*! @@ -216,7 +225,10 @@ QDeclarativeRadioData::ProgramType QDeclarativeRadioData::programType() const */ QString QDeclarativeRadioData::programTypeName() const { - return m_radioData->programTypeName(); + if (m_radioData) + return m_radioData->programTypeName(); + + return QString(); } /*! @@ -226,7 +238,10 @@ QString QDeclarativeRadioData::programTypeName() const */ QString QDeclarativeRadioData::stationName() const { - return m_radioData->stationName(); + if (m_radioData) + return m_radioData->stationName(); + + return QString(); } /*! @@ -238,7 +253,10 @@ QString QDeclarativeRadioData::stationName() const */ QString QDeclarativeRadioData::radioText() const { - return m_radioData->radioText(); + if (m_radioData) + return m_radioData->radioText(); + + return QString(); } /*! @@ -250,12 +268,16 @@ QString QDeclarativeRadioData::radioText() const */ bool QDeclarativeRadioData::alternativeFrequenciesEnabled() const { - return m_radioData->isAlternativeFrequenciesEnabled(); + if (m_radioData) + return m_radioData->isAlternativeFrequenciesEnabled(); + + return false; } void QDeclarativeRadioData::setAlternativeFrequenciesEnabled(bool enabled) { - m_radioData->setAlternativeFrequenciesEnabled(enabled); + if (m_radioData) + m_radioData->setAlternativeFrequenciesEnabled(enabled); } void QDeclarativeRadioData::_q_programTypeChanged(QRadioData::ProgramType programType) diff --git a/src/imports/multimedia/qdeclarativetorch_p.h b/src/imports/multimedia/qdeclarativetorch_p.h index b7ef55755..db7f99ed5 100644 --- a/src/imports/multimedia/qdeclarativetorch_p.h +++ b/src/imports/multimedia/qdeclarativetorch_p.h @@ -35,6 +35,17 @@ #ifndef QDECLARATIVETORCH_P_H #define QDECLARATIVETORCH_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtCore/QObject> #include <QtQml/qqml.h> #include <qcamera.h> |