Fix compilation after qtbase:8f85b84f4eaa85ff5c02ec5e65fd6706a10690b9.
Remove QDeclarative compatibility module code. Change-Id: Ib24c0c027c899e7eb30b3c8550a483d0d8b2b77f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
e2f5779d2a
commit
5ae3adcfa9
@@ -1,7 +1,7 @@
|
||||
|
||||
TEMPLATE=app
|
||||
|
||||
QT += declarative qtquick1 network multimedia
|
||||
QT += qtquick1 network multimedia
|
||||
|
||||
contains(QT_CONFIG, opengl) {
|
||||
QT += opengl
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include <QGuiApplication>
|
||||
|
||||
#include <qdeclarative.h>
|
||||
#include <qqml.h>
|
||||
#include <QtQuick/qquickview.h>
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <QtCore/QStandardPaths>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtDeclarative/QDeclarativeContext>
|
||||
#include <QtQml/QQmlContext>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtQuick/QQuickItem>
|
||||
#include "qmlapplicationviewer.h"
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtDeclarative/QDeclarativeComponent>
|
||||
#include <QtDeclarative/QDeclarativeEngine>
|
||||
#include <QtDeclarative/QDeclarativeContext>
|
||||
#include <QtQml/QQmlComponent>
|
||||
#include <QtQml/QQmlEngine>
|
||||
#include <QtQml/QQmlContext>
|
||||
#include <QtGui/QGuiApplication>
|
||||
|
||||
class QmlApplicationViewerPrivate
|
||||
|
||||
@@ -2,7 +2,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $OTHER_FILES *.pro *.pri
|
||||
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimedia/$${TARGET}
|
||||
INSTALLS += sources
|
||||
|
||||
QT += quick
|
||||
QT += qml quick
|
||||
|
||||
SOURCES += $$PWD/qmlapplicationviewer.cpp
|
||||
HEADERS += $$PWD/qmlapplicationviewer.h
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "frequencymonitor.h"
|
||||
#include <QtDeclarative/qdeclarative.h>
|
||||
#include <QtQml/qqml.h>
|
||||
|
||||
void FrequencyMonitor::qmlRegisterType()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include($$PWD/frequencymonitor.pri)
|
||||
QT += declarative
|
||||
QT += qml
|
||||
SOURCES += $$PWD/frequencymonitordeclarative.cpp
|
||||
|
||||
defineTest(frequencyItemAddDeployment) {
|
||||
|
||||
@@ -175,14 +175,14 @@ QDeclarativeSoundInstance* QDeclarativeAudioEngine::newDeclarativeSoundInstance(
|
||||
m_managedDeclSndInstancePool.pop_back();
|
||||
} else {
|
||||
instance = new QDeclarativeSoundInstance(this);
|
||||
qmlEngine(instance)->setObjectOwnership(instance, QDeclarativeEngine::CppOwnership);
|
||||
qmlEngine(instance)->setObjectOwnership(instance, QQmlEngine::CppOwnership);
|
||||
instance->setEngine(this);
|
||||
}
|
||||
m_managedDeclSoundInstances.push_back(instance);
|
||||
} else {
|
||||
instance = new QDeclarativeSoundInstance();
|
||||
instance->setEngine(this);
|
||||
qmlEngine(instance)->setObjectOwnership(instance, QDeclarativeEngine::JavaScriptOwnership);
|
||||
qmlEngine(instance)->setObjectOwnership(instance, QQmlEngine::JavaScriptOwnership);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ void QDeclarativeAudioEngine::updateSoundInstances()
|
||||
m_updateTimer.stop();
|
||||
}
|
||||
|
||||
void QDeclarativeAudioEngine::appendFunction(QDeclarativeListProperty<QObject> *property, QObject *value)
|
||||
void QDeclarativeAudioEngine::appendFunction(QQmlListProperty<QObject> *property, QObject *value)
|
||||
{
|
||||
QDeclarativeAudioEngine* engine = static_cast<QDeclarativeAudioEngine*>(property->object);
|
||||
if (engine->m_complete) {
|
||||
@@ -401,9 +401,9 @@ void QDeclarativeAudioEngine::appendFunction(QDeclarativeListProperty<QObject> *
|
||||
qWarning("Unknown child type for AudioEngine!");
|
||||
}
|
||||
|
||||
QDeclarativeListProperty<QObject> QDeclarativeAudioEngine::bank()
|
||||
QQmlListProperty<QObject> QDeclarativeAudioEngine::bank()
|
||||
{
|
||||
return QDeclarativeListProperty<QObject>(this, 0, appendFunction);
|
||||
return QQmlListProperty<QObject>(this, 0, appendFunction);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
|
||||
//This is used for tracking all objects declared inside AudioEngine
|
||||
//see appendFunction
|
||||
QDeclarativeListProperty<QObject> bank();
|
||||
QQmlListProperty<QObject> bank();
|
||||
|
||||
QObject* categories();
|
||||
QObject* samples();
|
||||
@@ -136,13 +136,13 @@ private:
|
||||
bool m_complete;
|
||||
|
||||
//see bank()
|
||||
static void appendFunction(QDeclarativeListProperty<QObject> *property, QObject *value);
|
||||
static void appendFunction(QQmlListProperty<QObject> *property, QObject *value);
|
||||
|
||||
QDeclarativeAudioListener *m_listener;
|
||||
QDeclarativeAudioCategory* m_defaultCategory;
|
||||
QDeclarativePropertyMap m_categories;
|
||||
QDeclarativePropertyMap m_samples;
|
||||
QDeclarativePropertyMap m_sounds;
|
||||
QQmlPropertyMap m_categories;
|
||||
QQmlPropertyMap m_samples;
|
||||
QQmlPropertyMap m_sounds;
|
||||
|
||||
//Use strong type here since no need to for AttenuationModel to be accessible directly by user
|
||||
//after config stage
|
||||
|
||||
@@ -360,9 +360,9 @@ void QDeclarativeSound::setCategoryObject(QDeclarativeAudioCategory *categoryObj
|
||||
m_categoryObject = categoryObject;
|
||||
}
|
||||
|
||||
QDeclarativeListProperty<QDeclarativePlayVariation> QDeclarativeSound::playVariationlist()
|
||||
QQmlListProperty<QDeclarativePlayVariation> QDeclarativeSound::playVariationlist()
|
||||
{
|
||||
return QDeclarativeListProperty<QDeclarativePlayVariation>(this, 0, appendFunction);
|
||||
return QQmlListProperty<QDeclarativePlayVariation>(this, 0, appendFunction);
|
||||
}
|
||||
|
||||
QList<QDeclarativePlayVariation*>& QDeclarativeSound::playlist()
|
||||
@@ -370,7 +370,7 @@ QList<QDeclarativePlayVariation*>& QDeclarativeSound::playlist()
|
||||
return m_playlist;
|
||||
}
|
||||
|
||||
void QDeclarativeSound::appendFunction(QDeclarativeListProperty<QDeclarativePlayVariation> *property, QDeclarativePlayVariation *value)
|
||||
void QDeclarativeSound::appendFunction(QQmlListProperty<QDeclarativePlayVariation> *property, QDeclarativePlayVariation *value)
|
||||
{
|
||||
QDeclarativeSound *sound = static_cast<QDeclarativeSound*>(property->object);
|
||||
if (sound->m_complete) {
|
||||
|
||||
@@ -84,18 +84,18 @@ private:
|
||||
qreal m_outerGain;
|
||||
};
|
||||
|
||||
class QDeclarativeSound : public QObject, public QDeclarativeParserStatus
|
||||
class QDeclarativeSound : public QObject, public QQmlParserStatus
|
||||
{
|
||||
friend class QDeclarativeSoundCone;
|
||||
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDeclarativeParserStatus)
|
||||
Q_INTERFACES(QQmlParserStatus)
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
Q_PROPERTY(PlayType playType READ playType WRITE setPlayType)
|
||||
Q_PROPERTY(QString category READ category WRITE setCategory)
|
||||
Q_PROPERTY(QDeclarativeSoundCone* cone READ cone CONSTANT)
|
||||
Q_PROPERTY(QString attenuationModel READ attenuationModel WRITE setAttenuationModel)
|
||||
Q_PROPERTY(QDeclarativeListProperty<QDeclarativePlayVariation> playVariationlist READ playVariationlist CONSTANT)
|
||||
Q_PROPERTY(QQmlListProperty<QDeclarativePlayVariation> playVariationlist READ playVariationlist CONSTANT)
|
||||
Q_CLASSINFO("DefaultProperty", "playVariationlist")
|
||||
|
||||
Q_ENUMS(PlayType)
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
QDeclarativePlayVariation* getVariation(int index);
|
||||
|
||||
//This is used for tracking new PlayVariation declared inside Sound
|
||||
QDeclarativeListProperty<QDeclarativePlayVariation> playVariationlist();
|
||||
QQmlListProperty<QDeclarativePlayVariation> playVariationlist();
|
||||
QList<QDeclarativePlayVariation*>& playlist();
|
||||
|
||||
public Q_SLOTS:
|
||||
@@ -156,7 +156,7 @@ public Q_SLOTS:
|
||||
private:
|
||||
Q_DISABLE_COPY(QDeclarativeSound)
|
||||
QDeclarativeSoundInstance* newInstance(bool managed);
|
||||
static void appendFunction(QDeclarativeListProperty<QDeclarativePlayVariation> *property, QDeclarativePlayVariation *value);
|
||||
static void appendFunction(QQmlListProperty<QDeclarativePlayVariation> *property, QDeclarativePlayVariation *value);
|
||||
bool m_complete;
|
||||
PlayType m_playType;
|
||||
QString m_name;
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
qmlRegisterType<QDeclarativeMediaMetaData>();
|
||||
}
|
||||
|
||||
void initializeEngine(QDeclarativeEngine *engine, const char *uri)
|
||||
void initializeEngine(QQmlEngine *engine, const char *uri)
|
||||
{
|
||||
Q_UNUSED(uri);
|
||||
engine->addImageProvider("camera", new QDeclarativeCameraPreviewProvider);
|
||||
|
||||
@@ -55,7 +55,7 @@ struct QDeclarativeCameraPreviewProviderPrivate
|
||||
Q_GLOBAL_STATIC(QDeclarativeCameraPreviewProviderPrivate, qDeclarativeCameraPreviewProviderPrivate)
|
||||
|
||||
QDeclarativeCameraPreviewProvider::QDeclarativeCameraPreviewProvider()
|
||||
: QDeclarativeImageProvider(QDeclarativeImageProvider::Image)
|
||||
: QQuickImageProvider(QQuickImageProvider::Image)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtQml/qqmlimageprovider.h>
|
||||
#include <QtQuick/qquickimageprovider.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDeclarativeCameraPreviewProvider : public QQmlImageProvider
|
||||
class QDeclarativeCameraPreviewProvider : public QQuickImageProvider
|
||||
{
|
||||
public:
|
||||
QDeclarativeCameraPreviewProvider();
|
||||
|
||||
@@ -140,11 +140,11 @@ private slots:
|
||||
// to holder?
|
||||
|
||||
private:
|
||||
QDeclarativeEngine m_engine;
|
||||
QQmlEngine m_engine;
|
||||
QByteArray m_plainQML;
|
||||
|
||||
// Variables used for the mapping test
|
||||
QDeclarativeComponent *m_mappingComponent;
|
||||
QQmlComponent *m_mappingComponent;
|
||||
QObject *m_mappingOutput;
|
||||
SurfaceHolder *m_mappingSurface;
|
||||
|
||||
@@ -165,7 +165,7 @@ void tst_QDeclarativeVideoOutput::initTestCase()
|
||||
"}";
|
||||
|
||||
// We initialize the mapping vars here
|
||||
m_mappingComponent = new QDeclarativeComponent(&m_engine);
|
||||
m_mappingComponent = new QQmlComponent(&m_engine);
|
||||
m_mappingComponent->setData(m_plainQML, QUrl());
|
||||
m_mappingSurface = new SurfaceHolder(this);
|
||||
|
||||
@@ -182,7 +182,7 @@ Q_DECLARE_METATYPE(QDeclarativeVideoOutput::FillMode)
|
||||
|
||||
void tst_QDeclarativeVideoOutput::fillMode()
|
||||
{
|
||||
QDeclarativeComponent component(&m_engine);
|
||||
QQmlComponent component(&m_engine);
|
||||
component.setData(m_plainQML, QUrl());
|
||||
|
||||
QObject *videoOutput = component.create();
|
||||
@@ -211,7 +211,7 @@ void tst_QDeclarativeVideoOutput::fillMode()
|
||||
|
||||
void tst_QDeclarativeVideoOutput::orientation()
|
||||
{
|
||||
QDeclarativeComponent component(&m_engine);
|
||||
QQmlComponent component(&m_engine);
|
||||
component.setData(m_plainQML, QUrl());
|
||||
|
||||
QObject *videoOutput = component.create();
|
||||
@@ -264,7 +264,7 @@ void tst_QDeclarativeVideoOutput::orientation()
|
||||
|
||||
void tst_QDeclarativeVideoOutput::surfaceSource()
|
||||
{
|
||||
QDeclarativeComponent component(&m_engine);
|
||||
QQmlComponent component(&m_engine);
|
||||
component.setData(m_plainQML, QUrl());
|
||||
|
||||
QObject *videoOutput = component.create();
|
||||
@@ -350,7 +350,7 @@ void tst_QDeclarativeVideoOutput::surfaceSource()
|
||||
|
||||
void tst_QDeclarativeVideoOutput::sourceRect()
|
||||
{
|
||||
QDeclarativeComponent component(&m_engine);
|
||||
QQmlComponent component(&m_engine);
|
||||
component.setData(m_plainQML, QUrl());
|
||||
|
||||
QObject *videoOutput = component.create();
|
||||
|
||||
Reference in New Issue
Block a user