diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp index 843ac0f1f2..de22a415aa 100644 --- a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp @@ -40,9 +40,9 @@ #include #include -#include -#include -#include +#include +#include +#include class MyPushButton : public QGraphicsProxyWidget { diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro index d7e6f9318a..678abaa020 100644 --- a/examples/declarative/cppextensions/qwidgets/qwidgets.pro +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += widgets declarative DESTDIR = QWidgets TARGET = qmlqwidgetsplugin diff --git a/examples/declarative/minehunt/main.cpp b/examples/declarative/minehunt/main.cpp index 93b9a5280b..752e470d3f 100644 --- a/examples/declarative/minehunt/main.cpp +++ b/examples/declarative/minehunt/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include #include #include diff --git a/examples/declarative/minehunt/minehunt.pro b/examples/declarative/minehunt/minehunt.pro index fe464fb498..12c167236c 100644 --- a/examples/declarative/minehunt/minehunt.pro +++ b/examples/declarative/minehunt/minehunt.pro @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = minehunt -QT += declarative qtquick1 +QT += declarative qtquick1 widgets # Input HEADERS += minehunt.h diff --git a/examples/declarative/script/shell/main.cpp b/examples/declarative/script/shell/main.cpp index ad29fb87e1..5ee8a5e1ca 100644 --- a/examples/declarative/script/shell/main.cpp +++ b/examples/declarative/script/shell/main.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include @@ -95,7 +95,7 @@ static void interactive(QJSEngine *eng) int main(int argc, char *argv[]) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); QScopedPointer eng(new QJSEngine()); { QJSValue globalObject = eng->globalObject(); @@ -150,4 +150,4 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } -#include \ No newline at end of file +#include diff --git a/modules/qt_qmltest.pri b/modules/qt_qmltest.pri index 9cc2977837..d00f621237 100644 --- a/modules/qt_qmltest.pri +++ b/modules/qt_qmltest.pri @@ -12,6 +12,6 @@ QT.qmltest.libs = $$QT_MODULE_LIB_BASE QT.qmltest.plugins = $$QT_MODULE_PLUGIN_BASE QT.qmltest.imports = $$QT_MODULE_IMPORT_BASE QT.qmltest.depends = declarative testlib -QT.qmltest.DEFINES = QT_DECLARATIVE_LIB +QT.qmltest.DEFINES = QT_QMLTEST_LIB QT_CONFIG += qmltest diff --git a/modules/qt_qtquick1.pri b/modules/qt_qtquick1.pri index 173c3da684..70a290637b 100644 --- a/modules/qt_qtquick1.pri +++ b/modules/qt_qtquick1.pri @@ -12,6 +12,6 @@ QT.qtquick1.libs = $$QT_MODULE_LIB_BASE QT.qtquick1.plugins = $$QT_MODULE_PLUGIN_BASE QT.qtquick1.imports = $$QT_MODULE_IMPORT_BASE QT.qtquick1.depends = declarative -QT.qtquick1.DEFINES = QT_DECLARATIVE_LIB +QT.qtquick1.DEFINES = QT_QTQUICK1_LIB QT_CONFIG += qtquick1 diff --git a/src/3rdparty/javascriptcore/DateMath.cpp b/src/3rdparty/javascriptcore/DateMath.cpp index 11c224aebb..e4775273e2 100644 --- a/src/3rdparty/javascriptcore/DateMath.cpp +++ b/src/3rdparty/javascriptcore/DateMath.cpp @@ -75,6 +75,7 @@ #include #include #include +#include //#if HAVE(SYS_TIME_H) #if defined(EXISTS_SYS_TIME) @@ -340,11 +341,15 @@ static const struct KnownZone { double timeClip(double t) { - if (!isfinite(t)) - return NaN; - if (fabs(t) > maxECMAScriptTime) +#if defined(_MSC_VER) + if (!_finite(t) || fabs(t) > maxECMAScriptTime) + return NaN; + return t >= 0 ? floor(t) : ceil(t); +#else + if (!isfinite(t) || fabs(t) > maxECMAScriptTime) return NaN; return trunc(t); +#endif } } // namespace WTF diff --git a/src/declarative/items/context2d/qsgcanvasitem.cpp b/src/declarative/items/context2d/qsgcanvasitem.cpp index 0bd9a47d8d..197a434921 100644 --- a/src/declarative/items/context2d/qsgcanvasitem.cpp +++ b/src/declarative/items/context2d/qsgcanvasitem.cpp @@ -264,7 +264,7 @@ QString QSGCanvasItem::toDataURL(const QString& mimeType) const image.save(&buffer, type.toAscii()); buffer.close(); QString dataUrl = QLatin1String("data:%1;base64,%2"); - return dataUrl.arg(mime).arg(ba.toBase64().constData()); + return dataUrl.arg(mime).arg(QString::fromAscii(ba.toBase64())); } return QLatin1String("data:,"); } diff --git a/src/declarative/items/context2d/qsgcontext2d.cpp b/src/declarative/items/context2d/qsgcontext2d.cpp index 71bc7df980..22a9c7029e 100644 --- a/src/declarative/items/context2d/qsgcontext2d.cpp +++ b/src/declarative/items/context2d/qsgcontext2d.cpp @@ -546,6 +546,7 @@ static v8::Handle ctx2d_valid(v8::Local, const v8::Access QV8Engine *engine = V8ENGINE_ACCESSOR(); + Q_UNUSED(engine) return v8::Boolean::New(r->context->valid()); } diff --git a/src/declarative/items/context2d/qsgcontext2d_p_p.h b/src/declarative/items/context2d/qsgcontext2d_p_p.h index d71a0bccf2..fc656f5f8f 100644 --- a/src/declarative/items/context2d/qsgcontext2d_p_p.h +++ b/src/declarative/items/context2d/qsgcontext2d_p_p.h @@ -58,7 +58,8 @@ QT_BEGIN_NAMESPACE class QSGCanvasItem; -struct QSGContext2DWorkerAgent { +class QSGContext2DWorkerAgent { +public: QSGContext2DWorkerAgent() :ref(1) , orig(0) diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 95ee95d0f7..9f55c400ce 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -252,7 +252,7 @@ void QSGCanvas::exposeEvent(QExposeEvent *) d->thread->paint(); } -void QSGCanvas::resizeEvent(QResizeEvent *e) +void QSGCanvas::resizeEvent(QResizeEvent *) { Q_D(QSGCanvas); d->thread->resize(size()); @@ -268,7 +268,7 @@ void QSGCanvas::animationStopped() d_func()->thread->animationStopped(); } -void QSGCanvas::showEvent(QShowEvent *e) +void QSGCanvas::showEvent(QShowEvent *) { Q_D(QSGCanvas); if (d->vsyncAnimations) { @@ -286,7 +286,7 @@ void QSGCanvas::showEvent(QShowEvent *e) } } -void QSGCanvas::hideEvent(QHideEvent *e) +void QSGCanvas::hideEvent(QHideEvent *) { Q_D(QSGCanvas); d->thread->stopRendering(); diff --git a/src/declarative/items/qsgitemsmodule.cpp b/src/declarative/items/qsgitemsmodule.cpp index 9359906f25..9547dc01cc 100644 --- a/src/declarative/items/qsgitemsmodule.cpp +++ b/src/declarative/items/qsgitemsmodule.cpp @@ -126,7 +126,8 @@ static void qt_sgitems_defineModule(const char *uri, int major, int minor) qmlRegisterType(uri,major,minor,"PathPercent"); qmlRegisterType(uri,major,minor,"PathQuad"); qmlRegisterType(uri,major,minor,"PathView"); - qmlRegisterUncreatableType(uri,major,minor,"Positioner","Positioner is an abstract type that is only available as an attached property."); + qmlRegisterUncreatableType(uri,major,minor,"Positioner", + QStringLiteral("Positioner is an abstract type that is only available as an attached property.")); #ifndef QT_NO_VALIDATOR qmlRegisterType(uri,major,minor,"IntValidator"); qmlRegisterType(uri,major,minor,"DoubleValidator"); diff --git a/src/declarative/items/qsgshadereffect.cpp b/src/declarative/items/qsgshadereffect.cpp index b81e7f15af..7f7bff7719 100644 --- a/src/declarative/items/qsgshadereffect.cpp +++ b/src/declarative/items/qsgshadereffect.cpp @@ -417,7 +417,7 @@ void QSGShaderEffect::setSource(const QVariant &var, int index) QSGItem *item = qobject_cast(obj); if (!item || !item->isTextureProvider()) { qWarning("ShaderEffect: source uniform [%s] is not assigned a valid texture provider: %s [%s]", - qPrintable(source.name), qPrintable(obj->objectName()), obj->metaObject()->className()); + source.name.constData(), qPrintable(obj->objectName()), obj->metaObject()->className()); return; } diff --git a/src/declarative/items/qsgtextedit.cpp b/src/declarative/items/qsgtextedit.cpp index 1c0ed62f0d..cf861684fa 100644 --- a/src/declarative/items/qsgtextedit.cpp +++ b/src/declarative/items/qsgtextedit.cpp @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) -QWidgetPrivate *qt_widget_private(QWidget *widget); +Q_WIDGETS_EXPORT QWidgetPrivate *qt_widget_private(QWidget *widget); /*! \qmlclass TextEdit QSGTextEdit \inqmlmodule QtQuick 2 diff --git a/src/declarative/items/qsgtextinput.cpp b/src/declarative/items/qsgtextinput.cpp index d30faadb34..f6b8ecd436 100644 --- a/src/declarative/items/qsgtextinput.cpp +++ b/src/declarative/items/qsgtextinput.cpp @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD) -QWidgetPrivate *qt_widget_private(QWidget *widget); +Q_WIDGETS_EXPORT QWidgetPrivate *qt_widget_private(QWidget *widget); /*! \qmlclass TextInput QSGTextInput diff --git a/src/declarative/particles/qsgangleddirection.cpp b/src/declarative/particles/qsgangleddirection.cpp index ab39b8a575..844941c178 100644 --- a/src/declarative/particles/qsgangleddirection.cpp +++ b/src/declarative/particles/qsgangleddirection.cpp @@ -102,7 +102,7 @@ QSGAngledDirection::QSGAngledDirection(QObject *parent) : } -const QPointF &QSGAngledDirection::sample(const QPointF &from) +const QPointF &QSGAngledDirection::sample(const QPointF &) { //TODO: Faster qreal theta = m_angle*CONV - m_angleVariation*CONV + rand()/float(RAND_MAX) * m_angleVariation*CONV * 2; diff --git a/src/declarative/particles/qsgcumulativedirection.cpp b/src/declarative/particles/qsgcumulativedirection.cpp index 1d7523972b..3502b41bce 100644 --- a/src/declarative/particles/qsgcumulativedirection.cpp +++ b/src/declarative/particles/qsgcumulativedirection.cpp @@ -61,10 +61,10 @@ QDeclarativeListProperty QSGCumulativeDirection::directi const QPointF &QSGCumulativeDirection::sample(const QPointF &from) { - QPointF ret; + m_ret = QPointF(); foreach (QSGStochasticDirection* dir, m_directions) - ret += dir->sample(from); - return ret; + m_ret += dir->sample(from); + return m_ret; } QT_END_NAMESPACE diff --git a/src/declarative/particles/qsgcumulativedirection_p.h b/src/declarative/particles/qsgcumulativedirection_p.h index c54a795931..53ed7613a1 100644 --- a/src/declarative/particles/qsgcumulativedirection_p.h +++ b/src/declarative/particles/qsgcumulativedirection_p.h @@ -60,5 +60,6 @@ class QSGCumulativeDirection : public QSGStochasticDirection const QPointF &sample(const QPointF &from); private: QList m_directions; + QPointF m_ret; }; #endif // QSGCUMULATIVEDIRECTION_P_H diff --git a/src/declarative/particles/qsgcustomparticle.cpp b/src/declarative/particles/qsgcustomparticle.cpp index 12d32a27b4..373d050627 100644 --- a/src/declarative/particles/qsgcustomparticle.cpp +++ b/src/declarative/particles/qsgcustomparticle.cpp @@ -281,7 +281,7 @@ void QSGCustomParticle::setSource(const QVariant &var, int index) source.item = qobject_cast(obj); if (!source.item || !source.item->isTextureProvider()) { qWarning("ShaderEffect: source uniform [%s] is not assigned a valid texture provider: %s [%s]", - qPrintable(source.name), qPrintable(obj->objectName()), obj->metaObject()->className()); + source.name.constData(), qPrintable(obj->objectName()), obj->metaObject()->className()); return; } diff --git a/src/declarative/particles/qsgfollowemitter.cpp b/src/declarative/particles/qsgfollowemitter.cpp index 68f0f6bf75..d2e3265e2d 100644 --- a/src/declarative/particles/qsgfollowemitter.cpp +++ b/src/declarative/particles/qsgfollowemitter.cpp @@ -209,7 +209,7 @@ void QSGFollowEmitter::emitWindow(int timeStamp) const QPointF &speed = m_speed->sample(newPos); datum->vx = speed.x() + m_speed_from_movement * d->vx; - datum->vy = speed.y(); + datum->vy = speed.y() + m_speed_from_movement * d->vy; // Particle acceleration diff --git a/src/declarative/particles/qsgimageparticle.cpp b/src/declarative/particles/qsgimageparticle.cpp index f269895536..1e410ad1b9 100644 --- a/src/declarative/particles/qsgimageparticle.cpp +++ b/src/declarative/particles/qsgimageparticle.cpp @@ -66,7 +66,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlParticlesDebug, QML_PARTICLES_DEBUG) //TODO: Make it larger on desktop? Requires fixing up shader code with the same define #define UNIFORM_ARRAY_SIZE 64 -const float CONV = 0.017453292519943295; +const qreal CONV = 0.017453292519943295; class ImageMaterialData { public: @@ -99,13 +99,13 @@ class TabledMaterial : public QSGSimpleMaterialShader public: TabledMaterial() { - QFile vf(":defaultshaders/imagevertex.shader"); + QFile vf(QStringLiteral(":defaultshaders/imagevertex.shader")); vf.open(QFile::ReadOnly); m_vertex_code = QByteArray(SHADER_DEFINES) + QByteArray("#define TABLE\n#define DEFORM\n#define COLOR\n") + vf.readAll(); - QFile ff(":defaultshaders/imagefragment.shader"); + QFile ff(QStringLiteral(":defaultshaders/imagefragment.shader")); ff.open(QFile::ReadOnly); m_fragment_code = QByteArray(SHADER_DEFINES) + QByteArray("#define TABLE\n#define DEFORM\n#define COLOR\n") @@ -167,13 +167,13 @@ class DeformableMaterial : public QSGSimpleMaterialShader public: SpriteMaterial() { - QFile vf(":defaultshaders/imagevertex.shader"); + QFile vf(QStringLiteral(":defaultshaders/imagevertex.shader")); vf.open(QFile::ReadOnly); m_vertex_code = QByteArray(SHADER_DEFINES) + QByteArray("#define SPRITE\n#define TABLE\n#define DEFORM\n#define COLOR\n") + vf.readAll(); - QFile ff(":defaultshaders/imagefragment.shader"); + QFile ff(QStringLiteral(":defaultshaders/imagefragment.shader")); ff.open(QFile::ReadOnly); m_fragment_code = QByteArray(SHADER_DEFINES) + QByteArray("#define SPRITE\n#define TABLE\n#define DEFORM\n#define COLOR\n") @@ -296,13 +296,13 @@ class ColoredMaterial : public QSGSimpleMaterialShader public: ColoredMaterial() { - QFile vf(":defaultshaders/imagevertex.shader"); + QFile vf(QStringLiteral(":defaultshaders/imagevertex.shader")); vf.open(QFile::ReadOnly); m_vertex_code = QByteArray(SHADER_DEFINES) + QByteArray("#define COLOR\n") + vf.readAll(); - QFile ff(":defaultshaders/imagefragment.shader"); + QFile ff(QStringLiteral(":defaultshaders/imagefragment.shader")); ff.open(QFile::ReadOnly); m_fragment_code = QByteArray(SHADER_DEFINES) + QByteArray("#define COLOR\n") @@ -317,7 +317,7 @@ class ColoredMaterial : public QSGSimpleMaterialShader void activate() { QSGSimpleMaterialShader::activate(); -#ifndef QT_OPENGL_ES_2 +#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN) glEnable(GL_POINT_SPRITE); glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); #endif @@ -325,7 +325,7 @@ class ColoredMaterial : public QSGSimpleMaterialShader void deactivate() { QSGSimpleMaterialShader::deactivate(); -#ifndef QT_OPENGL_ES_2 +#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN) glDisable(GL_POINT_SPRITE); glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); #endif @@ -367,12 +367,12 @@ class SimpleMaterial : public QSGSimpleMaterialShader public: SimpleMaterial() { - QFile vf(":defaultshaders/imagevertex.shader"); + QFile vf(QStringLiteral(":defaultshaders/imagevertex.shader")); vf.open(QFile::ReadOnly); m_vertex_code = QByteArray(SHADER_DEFINES) + vf.readAll(); - QFile ff(":defaultshaders/imagefragment.shader"); + QFile ff(QStringLiteral(":defaultshaders/imagefragment.shader")); ff.open(QFile::ReadOnly); m_fragment_code = QByteArray(SHADER_DEFINES) + ff.readAll(); @@ -386,7 +386,7 @@ class SimpleMaterial : public QSGSimpleMaterialShader void activate() { QSGSimpleMaterialShader::activate(); -#ifndef QT_OPENGL_ES_2 +#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN) glEnable(GL_POINT_SPRITE); glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); #endif @@ -394,7 +394,7 @@ class SimpleMaterial : public QSGSimpleMaterialShader void deactivate() { QSGSimpleMaterialShader::deactivate(); -#ifndef QT_OPENGL_ES_2 +#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN) glDisable(GL_POINT_SPRITE); glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); #endif @@ -913,7 +913,7 @@ QSGGeometryNode* QSGImageParticle::buildParticleNodes() sizetable = QImage(m_sizetable_name.toLocalFile()); opacitytable = QImage(m_opacitytable_name.toLocalFile()); if (colortable.isNull()) - colortable = QImage(":defaultshaders/identitytable.png"); + colortable = QImage(QStringLiteral(":defaultshaders/identitytable.png")); Q_ASSERT(!colortable.isNull()); getState(m_material)->colorTable = sceneGraphEngine()->createTextureFromImage(colortable); fillUniformArrayFromImage(getState(m_material)->sizeTable, sizetable, UNIFORM_ARRAY_SIZE); diff --git a/src/declarative/particles/qsgmodelparticle.cpp b/src/declarative/particles/qsgmodelparticle.cpp index 2646864283..d90b09fa6d 100644 --- a/src/declarative/particles/qsgmodelparticle.cpp +++ b/src/declarative/particles/qsgmodelparticle.cpp @@ -213,7 +213,7 @@ void QSGModelParticle::processPending() m_requests.clear(); } -void QSGModelParticle::commit(int gIdx, int pIdx) +void QSGModelParticle::commit(int /* gIdx */, int /* pIdx */) { //No-op unless we start copying the data. } diff --git a/src/declarative/particles/qsgparticlesystem.cpp b/src/declarative/particles/qsgparticlesystem.cpp index efd6c22bd9..d12165e4e8 100644 --- a/src/declarative/particles/qsgparticlesystem.cpp +++ b/src/declarative/particles/qsgparticlesystem.cpp @@ -493,7 +493,7 @@ QSGParticleSystem::QSGParticleSystem(QSGItem *parent) : { QSGParticleGroupData* gd = new QSGParticleGroupData(0, this);//Default group m_groupData.insert(0,gd); - m_groupIds.insert("",0); + m_groupIds.insert(QString(),0); m_nextGroupId = 1; connect(&m_painterMapper, SIGNAL(mapped(QObject*)), @@ -549,7 +549,7 @@ void QSGParticleSystem::loadPainter(QObject *p) int particleCount = 0; if (painter->particles().isEmpty()){//Uses default particle QStringList def; - def << ""; + def << QString(); painter->setParticles(def); particleCount += m_groupData[0]->size(); m_groupData[0]->painters << painter; diff --git a/src/declarative/qml/ftw/qdeclarativepool_p.h b/src/declarative/qml/ftw/qdeclarativepool_p.h index 8935046cc3..c4393fe2e6 100644 --- a/src/declarative/qml/ftw/qdeclarativepool_p.h +++ b/src/declarative/qml/ftw/qdeclarativepool_p.h @@ -58,7 +58,8 @@ QT_BEGIN_NAMESPACE -class QDeclarativePool +// Exported for QtQuick1 +class Q_DECLARATIVE_EXPORT QDeclarativePool { public: // The class has a destructor that needs to be called diff --git a/src/declarative/qml/ftw/qfastmetabuilder_p.h b/src/declarative/qml/ftw/qfastmetabuilder_p.h index 9a6971d652..e9457b5943 100644 --- a/src/declarative/qml/ftw/qfastmetabuilder_p.h +++ b/src/declarative/qml/ftw/qfastmetabuilder_p.h @@ -122,7 +122,7 @@ class QFastMetaBuilder QByteArray toData() const { return m_data; } static void fromData(QMetaObject *, const QMetaObject *parent, const QByteArray &); private: - friend class StringRef; + friend struct StringRef; QByteArray m_data; int m_zeroPtr; diff --git a/src/declarative/qml/ftw/qhashedstring_p.h b/src/declarative/qml/ftw/qhashedstring_p.h index f6c7f20d3a..d0dada8d72 100644 --- a/src/declarative/qml/ftw/qhashedstring_p.h +++ b/src/declarative/qml/ftw/qhashedstring_p.h @@ -254,7 +254,7 @@ class Q_AUTOTEST_EXPORT QStringHashNode } }; -struct Q_AUTOTEST_EXPORT QStringHashData +class Q_AUTOTEST_EXPORT QStringHashData { public: QStringHashData() @@ -275,7 +275,7 @@ struct Q_AUTOTEST_EXPORT QStringHashData }; template -class Q_AUTOTEST_EXPORT QStringHash +class QStringHash { public: struct Node : public QStringHashNode { diff --git a/src/declarative/qml/qdeclarativecleanup_p.h b/src/declarative/qml/qdeclarativecleanup_p.h index 3f55bdbe48..1efe564edc 100644 --- a/src/declarative/qml/qdeclarativecleanup_p.h +++ b/src/declarative/qml/qdeclarativecleanup_p.h @@ -58,7 +58,9 @@ QT_BEGIN_NAMESPACE class QDeclarativeEngine; -class QDeclarativeCleanup + +// Exported for QtQuick1 +class Q_DECLARATIVE_EXPORT QDeclarativeCleanup { public: QDeclarativeCleanup(QDeclarativeEngine *); diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 79094b7e0e..b3d714dcb2 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1595,7 +1595,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeScript::Property *prop, QDeclarativePropertyCache::Data defaultPropertyData; defaultPropertyData.load(p, engine); if (p.name()) - prop->setName(p.name()); + prop->setName(QLatin1String(p.name())); prop->core = defaultPropertyData; prop->index = prop->core.coreIndex; } @@ -2406,7 +2406,7 @@ const QMetaObject *QDeclarativeCompiler::resolveType(const QByteArray& name) con int QDeclarativeCompiler::rewriteBinding(const QString& expression, const QString& name) { QDeclarativeRewrite::RewriteBinding rewriteBinding; - rewriteBinding.setName(QLatin1Char('$') + name.mid(name.lastIndexOf('.') + 1)); + rewriteBinding.setName(QLatin1Char('$') + name.mid(name.lastIndexOf(QLatin1Char('.')) + 1)); QString rewrite = rewriteBinding(expression, 0, 0); diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index 0c0719a710..64bdaf108a 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -210,7 +210,7 @@ void QDeclarativeImports::populateCache(QDeclarativeTypeNameCache *cache, QDecla if (module) import.modules.append(QDeclarativeTypeModuleVersion(module, data.minversion)); - QDeclarativeMetaType::ModuleApi moduleApi = QDeclarativeMetaType::moduleApi(data.uri.toUtf8(), data.majversion, data.minversion); + QDeclarativeMetaType::ModuleApi moduleApi = QDeclarativeMetaType::moduleApi(data.uri, data.majversion, data.minversion); if (moduleApi.script || moduleApi.qobject) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); QDeclarativeMetaType::ModuleApiInstance *a = ep->moduleApiInstances.value(moduleApi); diff --git a/src/declarative/qml/qdeclarativeimport_p.h b/src/declarative/qml/qdeclarativeimport_p.h index c695a6b423..7f0b499881 100644 --- a/src/declarative/qml/qdeclarativeimport_p.h +++ b/src/declarative/qml/qdeclarativeimport_p.h @@ -71,7 +71,8 @@ class QDeclarativeImportsPrivate; class QDeclarativeImportDatabase; class QDeclarativeTypeLoader; -class QDeclarativeImports +// Exported for QtQuick1 +class Q_DECLARATIVE_EXPORT QDeclarativeImports { public: QDeclarativeImports(QDeclarativeTypeLoader *); diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp index e2f728ad69..995a6b9ad7 100644 --- a/src/declarative/qml/qdeclarativeinfo.cpp +++ b/src/declarative/qml/qdeclarativeinfo.cpp @@ -132,7 +132,8 @@ QDeclarativeInfo::~QDeclarativeInfo() marker = typeName.indexOf(QLatin1String("_QML_")); if (marker != -1) { - typeName = typeName.left(marker) + "*"; + typeName = typeName.left(marker); + typeName += QLatin1Char('*'); type = QDeclarativeMetaType::qmlType(QMetaType::type(typeName.toLatin1())); if (type) { typeName = QLatin1String(type->qmlTypeName()); diff --git a/src/declarative/qml/qdeclarativescript_p.h b/src/declarative/qml/qdeclarativescript_p.h index 3aff31789a..a985fd7a8a 100644 --- a/src/declarative/qml/qdeclarativescript_p.h +++ b/src/declarative/qml/qdeclarativescript_p.h @@ -72,7 +72,7 @@ QT_MODULE(Declarative) class QByteArray; class QDeclarativePropertyCache; namespace QDeclarativeJS { namespace AST { class Node; class StringLiteral; } } -namespace QDeclarativeCompilerTypes { class BindingReference; class ComponentCompileState; } +namespace QDeclarativeCompilerTypes { struct BindingReference; struct ComponentCompileState; } namespace QDeclarativeScript { diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp index fbe5b95aeb..687aec9448 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -145,7 +145,7 @@ class QV8SqlDatabaseResource : public QV8ObjectResource bool forwardOnly; // type == Rows }; -static v8::Handle qmlsqldatabase_version(v8::Local property, const v8::AccessorInfo& info) +static v8::Handle qmlsqldatabase_version(v8::Local /* property */, const v8::AccessorInfo& info) { QV8SqlDatabaseResource *r = v8_resource_cast(info.This()); if (!r || r->type != QV8SqlDatabaseResource::Database) @@ -154,7 +154,7 @@ static v8::Handle qmlsqldatabase_version(v8::Local proper return r->engine->toString(r->version); } -static v8::Handle qmlsqldatabase_rows_length(v8::Local property, const v8::AccessorInfo& info) +static v8::Handle qmlsqldatabase_rows_length(v8::Local /* property */, const v8::AccessorInfo& info) { QV8SqlDatabaseResource *r = v8_resource_cast(info.This()); if (!r || r->type != QV8SqlDatabaseResource::Rows) @@ -172,7 +172,7 @@ static v8::Handle qmlsqldatabase_rows_length(v8::Local pr return v8::Integer::New(s); } -static v8::Handle qmlsqldatabase_rows_forwardOnly(v8::Local property, +static v8::Handle qmlsqldatabase_rows_forwardOnly(v8::Local /* property */, const v8::AccessorInfo& info) { QV8SqlDatabaseResource *r = v8_resource_cast(info.This()); @@ -182,7 +182,7 @@ static v8::Handle qmlsqldatabase_rows_forwardOnly(v8::Localquery.isForwardOnly()); } -static void qmlsqldatabase_rows_setForwardOnly(v8::Local property, +static void qmlsqldatabase_rows_setForwardOnly(v8::Local /* property */, v8::Local value, const v8::AccessorInfo& info) { @@ -568,7 +568,7 @@ void *qt_add_qmlsqldatabase(QV8Engine *engine) return (void *)new QDeclarativeSqlDatabaseData(engine); } -void qt_rem_qmlsqldatabase(QV8Engine *engine, void *d) +void qt_rem_qmlsqldatabase(QV8Engine * /* engine */, void *d) { QDeclarativeSqlDatabaseData *data = (QDeclarativeSqlDatabaseData *)d; delete data; diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h index 349a9f8428..af1a2f731e 100644 --- a/src/declarative/qml/qdeclarativetypeloader_p.h +++ b/src/declarative/qml/qdeclarativetypeloader_p.h @@ -77,7 +77,8 @@ class QDeclarativeComponentPrivate; class QDeclarativeTypeData; class QDeclarativeDataLoader; -class Q_AUTOTEST_EXPORT QDeclarativeDataBlob : public QDeclarativeRefCount +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataBlob : public QDeclarativeRefCount { public: enum Status { @@ -160,7 +161,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeDataBlob : public QDeclarativeRefCount QList m_errors; }; -class Q_AUTOTEST_EXPORT QDeclarativeDataLoader : public QObject +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDataLoader : public QObject { Q_OBJECT public: @@ -184,7 +186,8 @@ private slots: NetworkReplies m_networkReplies; }; -class Q_AUTOTEST_EXPORT QDeclarativeTypeLoader : public QDeclarativeDataLoader +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeTypeLoader : public QDeclarativeDataLoader { Q_OBJECT public: diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h index 03cb83fdad..41d5e7cb8f 100644 --- a/src/declarative/qml/qdeclarativevaluetype_p.h +++ b/src/declarative/qml/qdeclarativevaluetype_p.h @@ -105,7 +105,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueTypeFactory QDeclarativeValueType *valueTypes[QVariant::UserType - 1]; }; -class Q_AUTOTEST_EXPORT QDeclarativePointFValueType : public QDeclarativeValueType +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePointFValueType : public QDeclarativeValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) @@ -129,7 +130,8 @@ class Q_AUTOTEST_EXPORT QDeclarativePointFValueType : public QDeclarativeValueTy QPointF point; }; -class Q_AUTOTEST_EXPORT QDeclarativePointValueType : public QDeclarativeValueType +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePointValueType : public QDeclarativeValueType { Q_PROPERTY(int x READ x WRITE setX) Q_PROPERTY(int y READ y WRITE setY) @@ -153,7 +155,8 @@ class Q_AUTOTEST_EXPORT QDeclarativePointValueType : public QDeclarativeValueTyp QPoint point; }; -class Q_AUTOTEST_EXPORT QDeclarativeSizeFValueType : public QDeclarativeValueType +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeSizeFValueType : public QDeclarativeValueType { Q_PROPERTY(qreal width READ width WRITE setWidth) Q_PROPERTY(qreal height READ height WRITE setHeight) @@ -177,7 +180,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeSizeFValueType : public QDeclarativeValueTyp QSizeF size; }; -class Q_AUTOTEST_EXPORT QDeclarativeSizeValueType : public QDeclarativeValueType +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeSizeValueType : public QDeclarativeValueType { Q_PROPERTY(int width READ width WRITE setWidth) Q_PROPERTY(int height READ height WRITE setHeight) @@ -201,7 +205,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeSizeValueType : public QDeclarativeValueType QSize size; }; -class Q_AUTOTEST_EXPORT QDeclarativeRectFValueType : public QDeclarativeValueType +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectFValueType : public QDeclarativeValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) @@ -232,7 +237,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeRectFValueType : public QDeclarativeValueTyp QRectF rect; }; -class Q_AUTOTEST_EXPORT QDeclarativeRectValueType : public QDeclarativeValueType +// Exported for QtQuick1 +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeRectValueType : public QDeclarativeValueType { Q_PROPERTY(int x READ x WRITE setX) Q_PROPERTY(int y READ y WRITE setY) @@ -263,7 +269,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeRectValueType : public QDeclarativeValueType QRect rect; }; -class Q_AUTOTEST_EXPORT QDeclarativeVector2DValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector2DValueType : public QDeclarativeValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) @@ -287,7 +293,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeVector2DValueType : public QDeclarativeValue QVector2D vector; }; -class Q_AUTOTEST_EXPORT QDeclarativeVector3DValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector3DValueType : public QDeclarativeValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) @@ -314,7 +320,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeVector3DValueType : public QDeclarativeValue QVector3D vector; }; -class Q_AUTOTEST_EXPORT QDeclarativeVector4DValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeVector4DValueType : public QDeclarativeValueType { Q_PROPERTY(qreal x READ x WRITE setX) Q_PROPERTY(qreal y READ y WRITE setY) @@ -344,7 +350,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeVector4DValueType : public QDeclarativeValue QVector4D vector; }; -class Q_AUTOTEST_EXPORT QDeclarativeQuaternionValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeQuaternionValueType : public QDeclarativeValueType { Q_PROPERTY(qreal scalar READ scalar WRITE setScalar) Q_PROPERTY(qreal x READ x WRITE setX) @@ -374,7 +380,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeQuaternionValueType : public QDeclarativeVal QQuaternion quaternion; }; -class Q_AUTOTEST_EXPORT QDeclarativeMatrix4x4ValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMatrix4x4ValueType : public QDeclarativeValueType { Q_PROPERTY(qreal m11 READ m11 WRITE setM11) Q_PROPERTY(qreal m12 READ m12 WRITE setM12) @@ -441,7 +447,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeMatrix4x4ValueType : public QDeclarativeValu QMatrix4x4 matrix; }; -class Q_AUTOTEST_EXPORT QDeclarativeEasingValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEasingValueType : public QDeclarativeValueType { Q_OBJECT Q_ENUMS(Type) @@ -499,7 +505,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeEasingValueType : public QDeclarativeValueTy QEasingCurve easing; }; -class Q_AUTOTEST_EXPORT QDeclarativeFontValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeFontValueType : public QDeclarativeValueType { Q_OBJECT Q_ENUMS(FontWeight) @@ -582,7 +588,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeFontValueType : public QDeclarativeValueType mutable QDeclarativeNullableValue dpi; }; -class Q_AUTOTEST_EXPORT QDeclarativeColorValueType : public QDeclarativeValueType +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeColorValueType : public QDeclarativeValueType { Q_PROPERTY(qreal r READ r WRITE setR) Q_PROPERTY(qreal g READ g WRITE setG) diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index 0eb923a70c..23f21c91e3 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -613,7 +613,7 @@ v8::Handle CharacterData::length(v8::Local, const v8::Acc QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); - + Q_UNUSED(engine) return v8::Integer::New(r->d->data.length()); } @@ -637,7 +637,7 @@ v8::Handle Text::isElementContentWhitespace(v8::Local, co QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); - + Q_UNUSED(engine) return v8::Boolean::New(r->d->data.trimmed().isEmpty()); } @@ -810,7 +810,7 @@ v8::Handle NamedNodeMap::length(v8::Local, const v8::Acce QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); - + Q_UNUSED(engine) return v8::Integer::New(r->list->count()); } @@ -888,7 +888,7 @@ v8::Handle NodeList::length(v8::Local, const v8::Accessor QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); if (!r) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); - + Q_UNUSED(engine) return v8::Integer::New(r->d->children.count()); } @@ -931,7 +931,7 @@ v8::Handle Document::xmlStandalone(v8::Local, const v8::A QDeclarativeDOMNodeResource *r = v8_resource_cast(args.This()); if (!r || r->d->type != NodeImpl::Document) return v8::Undefined(); QV8Engine *engine = V8ENGINE(); - + Q_UNUSED(engine) return v8::Boolean::New(static_cast(r->d)->isStandalone); } @@ -1646,7 +1646,7 @@ static v8::Handle qmlxmlhttprequest_getAllResponseHeaders(const v8::A } // XMLHttpRequest properties -static v8::Handle qmlxmlhttprequest_readyState(v8::Local property, +static v8::Handle qmlxmlhttprequest_readyState(v8::Local /* property */, const v8::AccessorInfo& info) { QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); @@ -1656,7 +1656,7 @@ static v8::Handle qmlxmlhttprequest_readyState(v8::Local return v8::Integer::NewFromUnsigned(r->readyState()); } -static v8::Handle qmlxmlhttprequest_status(v8::Local property, +static v8::Handle qmlxmlhttprequest_status(v8::Local /* property */, const v8::AccessorInfo& info) { QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); @@ -1673,7 +1673,7 @@ static v8::Handle qmlxmlhttprequest_status(v8::Local prop return v8::Integer::New(r->replyStatus()); } -static v8::Handle qmlxmlhttprequest_statusText(v8::Local property, +static v8::Handle qmlxmlhttprequest_statusText(v8::Local /* property */, const v8::AccessorInfo& info) { QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); @@ -1692,7 +1692,7 @@ static v8::Handle qmlxmlhttprequest_statusText(v8::Local return engine->toString(r->replyStatusText()); } -static v8::Handle qmlxmlhttprequest_responseText(v8::Local property, +static v8::Handle qmlxmlhttprequest_responseText(v8::Local /* property */, const v8::AccessorInfo& info) { QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); @@ -1708,8 +1708,8 @@ static v8::Handle qmlxmlhttprequest_responseText(v8::LocaltoString(r->responseBody()); } -static v8::Handle qmlxmlhttprequest_responseXML(v8::Local property, - const v8::AccessorInfo& info) +static v8::Handle qmlxmlhttprequest_responseXML(v8::Local /* property */, + const v8::AccessorInfo& info) { QDeclarativeXMLHttpRequest *r = v8_resource_cast(info.This()); if (!r) @@ -1729,7 +1729,7 @@ static v8::Handle qmlxmlhttprequest_new(const v8::Arguments &args) if (args.IsConstructCall()) { QV8Engine *engine = V8ENGINE(); QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine->engine()); - + Q_UNUSED(ep) QDeclarativeXMLHttpRequest *r = new QDeclarativeXMLHttpRequest(engine, engine->networkAccessManager()); args.This()->SetExternalResource(r); @@ -1741,7 +1741,7 @@ static v8::Handle qmlxmlhttprequest_new(const v8::Arguments &args) #define NEWFUNCTION(function) v8::FunctionTemplate::New(function)->GetFunction() -void qt_rem_qmlxmlhttprequest(QV8Engine *engine, void *d) +void qt_rem_qmlxmlhttprequest(QV8Engine * /* engine */, void *d) { QDeclarativeXMLHttpRequestData *data = (QDeclarativeXMLHttpRequestData *)d; delete data; diff --git a/src/declarative/qml/v8/qv8qobjectwrapper.cpp b/src/declarative/qml/v8/qv8qobjectwrapper.cpp index 52e106494c..46494daf55 100644 --- a/src/declarative/qml/v8/qv8qobjectwrapper.cpp +++ b/src/declarative/qml/v8/qv8qobjectwrapper.cpp @@ -1018,8 +1018,9 @@ QPair QV8QObjectWrapper::ExtractQtMethod(QV8Engine *engine, v8:: return qMakePair((QObject *)0, -1); } -struct QV8QObjectConnectionList : public QObject, public QDeclarativeGuard +class QV8QObjectConnectionList : public QObject, public QDeclarativeGuard { +public: QV8QObjectConnectionList(QObject *object, QV8Engine *engine); ~QV8QObjectConnectionList(); diff --git a/src/declarative/qml/v8/qv8variantwrapper.cpp b/src/declarative/qml/v8/qv8variantwrapper.cpp index de4f0ce2d7..4b2acfc965 100644 --- a/src/declarative/qml/v8/qv8variantwrapper.cpp +++ b/src/declarative/qml/v8/qv8variantwrapper.cpp @@ -166,13 +166,13 @@ QVariant &QV8VariantWrapper::variantValue(v8::Handle value) return static_cast(r)->data; } -v8::Handle QV8VariantWrapper::Getter(v8::Local property, +v8::Handle QV8VariantWrapper::Getter(v8::Local /* property */, const v8::AccessorInfo &info) { return v8::Handle(); } -v8::Handle QV8VariantWrapper::Setter(v8::Local property, +v8::Handle QV8VariantWrapper::Setter(v8::Local /* property */, v8::Local value, const v8::AccessorInfo &info) { diff --git a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp index 607c5b5b1f..0df00b56cb 100644 --- a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp @@ -600,7 +600,7 @@ static inline GLenum qt_drawTypeForPattern(QSGGeometry::DataPattern p) void QSGRenderer::draw(const QSGMaterialShader *shader, const QSGGeometry *g) { // ### remove before final release... - static bool use_vbo = !QApplication::arguments().contains("--no-vbo"); + static bool use_vbo = !QApplication::arguments().contains(QLatin1String("--no-vbo")); const void *vertexData; int vertexByteSize = g->vertexCount() * g->stride(); diff --git a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp index 13fe62a27a..ec69a64c58 100644 --- a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp +++ b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp @@ -1178,7 +1178,7 @@ void QSGDistanceFieldGlyphCache::updateCache() glBindTexture(GL_TEXTURE_2D, m_textureData->texture); // ### Remove before final release - static bool cacheDistanceFields = QGuiApplication::arguments().contains("--cache-distance-fields"); + static bool cacheDistanceFields = QGuiApplication::arguments().contains(QLatin1String("--cache-distance-fields")); // #define QSGDISTANCEFIELDS_TIME_CREATION #ifdef QSGDISTANCEFIELDS_TIME_CREATION diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index f76531a5f7..d306f8ab2b 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -123,14 +123,14 @@ bool QSmoothedAnimation::recalc() sd = s; } else if (maximumEasingTime != -1 && tf > (maximumEasingTime / 1000.)) { qreal met = maximumEasingTime / 1000.; - // tp| |td - // vp_ _______ - // / \ - // vi_ / \ - // \ - // \ _ 0 - // |ta| |ta| - // + /* tp| |td + * vp_ _______ + * / \ + * vi_ / \ + * \ + * \ _ 0 + * |ta| |ta| + */ qreal ta = met / 2.; a = (s - (vi * tf - 0.5 * vi * ta)) / (tf * ta - ta * ta); diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro index 31192fd764..63f75d9254 100644 --- a/src/imports/folderlistmodel/folderlistmodel.pro +++ b/src/imports/folderlistmodel/folderlistmodel.pro @@ -2,7 +2,7 @@ TARGET = qmlfolderlistmodelplugin TARGETPATH = Qt/labs/folderlistmodel include(../qimportbase.pri) -QT += declarative +QT += widgets declarative SOURCES += qdeclarativefolderlistmodel.cpp plugin.cpp HEADERS += qdeclarativefolderlistmodel.h diff --git a/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h b/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h index 96a5f27f1e..5fd90b0a5f 100644 --- a/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h +++ b/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h @@ -58,7 +58,7 @@ QT_MODULE(Declarative) class QDeclarative1AnchorsPrivate; class QDeclarative1AnchorLine; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Anchors : public QObject +class Q_QTQUICK1_EXPORT QDeclarative1Anchors : public QObject { Q_OBJECT diff --git a/src/qtquick1/graphicsitems/qdeclarativeitem.h b/src/qtquick1/graphicsitems/qdeclarativeitem.h index 609af803f6..c56b59125b 100644 --- a/src/qtquick1/graphicsitems/qdeclarativeitem.h +++ b/src/qtquick1/graphicsitems/qdeclarativeitem.h @@ -65,7 +65,7 @@ class QDeclarative1KeyEvent; class QDeclarative1Anchors; class QDeclarativeItemPrivate; class QDeclarativeV8Function; -class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDeclarativeParserStatus +class Q_QTQUICK1_EXPORT QDeclarativeItem : public QGraphicsObject, public QDeclarativeParserStatus { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) @@ -217,7 +217,7 @@ T qobject_cast(QGraphicsItem *item) } #ifndef QT_NO_DEBUG_STREAM -QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QDeclarativeItem *item); +QDebug Q_QTQUICK1_EXPORT operator<<(QDebug debug, QDeclarativeItem *item); #endif QT_END_NAMESPACE diff --git a/src/qtquick1/graphicsitems/qdeclarativeitem_p.h b/src/qtquick1/graphicsitems/qdeclarativeitem_p.h index 0604194004..8dccd1ac37 100644 --- a/src/qtquick1/graphicsitems/qdeclarativeitem_p.h +++ b/src/qtquick1/graphicsitems/qdeclarativeitem_p.h @@ -116,7 +116,7 @@ class QDeclarative1Contents : public QObject, public QDeclarativeItemChangeListe qreal m_height; }; -class Q_DECLARATIVE_EXPORT QDeclarativeItemPrivate : public QGraphicsItemPrivate +class Q_QTQUICK1_EXPORT QDeclarativeItemPrivate : public QGraphicsItemPrivate { Q_DECLARE_PUBLIC(QDeclarativeItem) diff --git a/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h b/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h index c5f25228bd..17c6b7bc10 100644 --- a/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h +++ b/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarative1BasePositionerPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1BasePositioner : public QDeclarative1ImplicitSizeItem +class Q_QTQUICK1_EXPORT QDeclarative1BasePositioner : public QDeclarative1ImplicitSizeItem { Q_OBJECT diff --git a/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h b/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h index 862799faa2..d4a98ba284 100644 --- a/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h +++ b/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h @@ -53,7 +53,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Pen : public QObject +class Q_QTQUICK1_EXPORT QDeclarative1Pen : public QObject { Q_OBJECT @@ -133,7 +133,7 @@ class Q_AUTOTEST_EXPORT QDeclarative1Gradient : public QObject }; class QDeclarative1RectanglePrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Rectangle : public QDeclarativeItem +class Q_QTQUICK1_EXPORT QDeclarative1Rectangle : public QDeclarativeItem { Q_OBJECT diff --git a/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h b/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h index 5a1c298a74..27e6b5e5a4 100644 --- a/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h +++ b/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1ScaleGrid : public QObject +class Q_QTQUICK1_EXPORT QDeclarative1ScaleGrid : public QObject { Q_OBJECT Q_ENUMS(TileRule) @@ -95,7 +95,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1ScaleGrid : public QObject int _bottom; }; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1GridScaledImage +class Q_QTQUICK1_EXPORT QDeclarative1GridScaledImage { public: QDeclarative1GridScaledImage(); diff --git a/src/qtquick1/graphicsitems/qdeclarativetext_p.h b/src/qtquick1/graphicsitems/qdeclarativetext_p.h index 93261fbb24..efc90bb7a5 100644 --- a/src/qtquick1/graphicsitems/qdeclarativetext_p.h +++ b/src/qtquick1/graphicsitems/qdeclarativetext_p.h @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarative1TextPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Text : public QDeclarative1ImplicitSizeItem +class Q_QTQUICK1_EXPORT QDeclarative1Text : public QDeclarative1ImplicitSizeItem { Q_OBJECT Q_ENUMS(HAlignment) diff --git a/src/qtquick1/qtquick1.pro b/src/qtquick1/qtquick1.pro index 66f2c848f2..d70b532caf 100644 --- a/src/qtquick1/qtquick1.pro +++ b/src/qtquick1/qtquick1.pro @@ -8,7 +8,7 @@ CONFIG += dll warn_on MODULE_PRI += ../../modules/qt_qtquick1.pri QT += testlib-private declarative testlib declarative-private core-private gui-private network widgets-private v8-private -DEFINES += QT_NO_URL_CAST_FROM_STRING +DEFINES += QT_BUILD_QTQUICK1_LIB QT_NO_URL_CAST_FROM_STRING load(qt_module_config) @@ -38,5 +38,5 @@ HEADERS += qtquick1_p.h SOURCES += qtquick1.cpp DEFINES += QT_NO_OPENTYPE -INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src +INCLUDEPATH += $$QT.corelib.sources/../src/3rdparty/harfbuzz/src diff --git a/src/qtquick1/qtquick1_p.h b/src/qtquick1/qtquick1_p.h index 36dfd1ad05..8fb0c1110a 100644 --- a/src/qtquick1/qtquick1_p.h +++ b/src/qtquick1/qtquick1_p.h @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_EXPORT QDeclarativeQtQuick1Module +class Q_QTQUICK1_EXPORT QDeclarativeQtQuick1Module { public: enum Module { QtQuick1, Qt47 }; diff --git a/src/qtquick1/util/qdeclarativeanimation_p.h b/src/qtquick1/util/qdeclarativeanimation_p.h index decb9a339a..57ba38e1d4 100644 --- a/src/qtquick1/util/qdeclarativeanimation_p.h +++ b/src/qtquick1/util/qdeclarativeanimation_p.h @@ -64,7 +64,7 @@ QT_MODULE(Declarative) class QDeclarativeItem; class QDeclarative1AbstractAnimationPrivate; class QDeclarative1AnimationGroup; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1AbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus +class Q_QTQUICK1_EXPORT QDeclarative1AbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarative1AbstractAnimation) @@ -166,7 +166,7 @@ class Q_AUTOTEST_EXPORT QDeclarative1PauseAnimation : public QDeclarative1Abstra }; class QDeclarative1ScriptActionPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1ScriptAction : public QDeclarative1AbstractAnimation +class Q_QTQUICK1_EXPORT QDeclarative1ScriptAction : public QDeclarative1AbstractAnimation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarative1ScriptAction) diff --git a/src/qtquick1/util/qdeclarativeapplication_p.h b/src/qtquick1/util/qdeclarativeapplication_p.h index 4a588c2940..d82578e490 100644 --- a/src/qtquick1/util/qdeclarativeapplication_p.h +++ b/src/qtquick1/util/qdeclarativeapplication_p.h @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarative1ApplicationPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Application : public QObject +class Q_QTQUICK1_EXPORT QDeclarative1Application : public QObject { Q_OBJECT Q_PROPERTY(bool active READ active NOTIFY activeChanged) diff --git a/src/qtquick1/util/qdeclarativebehavior_p.h b/src/qtquick1/util/qdeclarativebehavior_p.h index 76792bc438..cc026ef82d 100644 --- a/src/qtquick1/util/qdeclarativebehavior_p.h +++ b/src/qtquick1/util/qdeclarativebehavior_p.h @@ -57,7 +57,7 @@ QT_MODULE(Declarative) class QDeclarative1AbstractAnimation; class QDeclarative1BehaviorPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Behavior : public QObject, public QDeclarativePropertyValueInterceptor +class Q_QTQUICK1_EXPORT QDeclarative1Behavior : public QObject, public QDeclarativePropertyValueInterceptor { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarative1Behavior) diff --git a/src/qtquick1/util/qdeclarativeopenmetaobject_p.h b/src/qtquick1/util/qdeclarativeopenmetaobject_p.h index 3ee6230e71..5d63387de3 100644 --- a/src/qtquick1/util/qdeclarativeopenmetaobject_p.h +++ b/src/qtquick1/util/qdeclarativeopenmetaobject_p.h @@ -59,7 +59,7 @@ class QMetaPropertyBuilder; QT_MODULE(Declarative) class QDeclarative1OpenMetaObjectTypePrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1OpenMetaObjectType : public QDeclarativeRefCount +class Q_QTQUICK1_EXPORT QDeclarative1OpenMetaObjectType : public QDeclarativeRefCount { public: QDeclarative1OpenMetaObjectType(const QMetaObject *base, QDeclarativeEngine *engine); @@ -80,7 +80,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1OpenMetaObjectType : public QDec }; class QDeclarative1OpenMetaObjectPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1OpenMetaObject : public QAbstractDynamicMetaObject +class Q_QTQUICK1_EXPORT QDeclarative1OpenMetaObject : public QAbstractDynamicMetaObject { public: QDeclarative1OpenMetaObject(QObject *, bool = true); diff --git a/src/qtquick1/util/qdeclarativepixmapcache_p.h b/src/qtquick1/util/qdeclarativepixmapcache_p.h index f0a7770be0..9af156a05c 100644 --- a/src/qtquick1/util/qdeclarativepixmapcache_p.h +++ b/src/qtquick1/util/qdeclarativepixmapcache_p.h @@ -56,7 +56,7 @@ class QDeclarativeEngine; QT_MODULE(Declarative) class QDeclarative1PixmapData; -class Q_DECLARATIVE_EXPORT QDeclarative1Pixmap +class Q_QTQUICK1_EXPORT QDeclarative1Pixmap { Q_DECLARE_TR_FUNCTIONS(QDeclarative1Pixmap) public: diff --git a/src/qtquick1/util/qdeclarativepropertychanges_p.h b/src/qtquick1/util/qdeclarativepropertychanges_p.h index 30609d3c2d..b3aed087e3 100644 --- a/src/qtquick1/util/qdeclarativepropertychanges_p.h +++ b/src/qtquick1/util/qdeclarativepropertychanges_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarative1PropertyChangesPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1PropertyChanges : public QDeclarative1StateOperation +class Q_QTQUICK1_EXPORT QDeclarative1PropertyChanges : public QDeclarative1StateOperation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarative1PropertyChanges) diff --git a/src/qtquick1/util/qdeclarativestate_p.h b/src/qtquick1/util/qdeclarativestate_p.h index fcfa2efead..90a67e9f26 100644 --- a/src/qtquick1/util/qdeclarativestate_p.h +++ b/src/qtquick1/util/qdeclarativestate_p.h @@ -59,7 +59,7 @@ class QDeclarativeExpression; QT_MODULE(Declarative) class QDeclarative1ActionEvent; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Action +class Q_QTQUICK1_EXPORT QDeclarative1Action { public: QDeclarative1Action(); @@ -116,7 +116,7 @@ class Q_AUTOTEST_EXPORT QDeclarative1ActionEvent class QDeclarative1StateGroup; class QDeclarative1State; class QDeclarative1StateOperationPrivate; -class Q_DECLARATIVE_EXPORT QDeclarative1StateOperation : public QObject +class Q_QTQUICK1_EXPORT QDeclarative1StateOperation : public QObject { Q_OBJECT public: @@ -141,7 +141,7 @@ typedef QDeclarative1StateOperation::ActionList QDeclarative1StateActions; class QDeclarative1Transition; class QDeclarative1StatePrivate; -class Q_DECLARATIVE_EXPORT QDeclarative1State : public QObject +class Q_QTQUICK1_EXPORT QDeclarative1State : public QObject { Q_OBJECT diff --git a/src/qtquick1/util/qdeclarativestategroup_p.h b/src/qtquick1/util/qdeclarativestategroup_p.h index e7831d4cca..bef48f4993 100644 --- a/src/qtquick1/util/qdeclarativestategroup_p.h +++ b/src/qtquick1/util/qdeclarativestategroup_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarative1StateGroupPrivate; -class Q_DECLARATIVE_EXPORT QDeclarative1StateGroup : public QObject, public QDeclarativeParserStatus +class Q_QTQUICK1_EXPORT QDeclarative1StateGroup : public QObject, public QDeclarativeParserStatus { Q_OBJECT Q_INTERFACES(QDeclarativeParserStatus) diff --git a/src/qtquick1/util/qdeclarativetimer_p.h b/src/qtquick1/util/qdeclarativetimer_p.h index 5465773280..c62de320b4 100644 --- a/src/qtquick1/util/qdeclarativetimer_p.h +++ b/src/qtquick1/util/qdeclarativetimer_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarative1TimerPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarative1Timer : public QObject, public QDeclarativeParserStatus +class Q_QTQUICK1_EXPORT QDeclarative1Timer : public QObject, public QDeclarativeParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarative1Timer) diff --git a/src/qtquick1/util/qdeclarativetransition_p.h b/src/qtquick1/util/qdeclarativetransition_p.h index f3f7afae6d..90fc909cf5 100644 --- a/src/qtquick1/util/qdeclarativetransition_p.h +++ b/src/qtquick1/util/qdeclarativetransition_p.h @@ -57,7 +57,7 @@ QT_MODULE(Declarative) class QDeclarative1AbstractAnimation; class QDeclarative1TransitionPrivate; class QDeclarative1TransitionManager; -class Q_DECLARATIVE_EXPORT QDeclarative1Transition : public QObject +class Q_QTQUICK1_EXPORT QDeclarative1Transition : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarative1Transition) diff --git a/src/qtquick1/util/qdeclarativeview.h b/src/qtquick1/util/qdeclarativeview.h index b655d2830f..96cb4ed2f6 100644 --- a/src/qtquick1/util/qdeclarativeview.h +++ b/src/qtquick1/util/qdeclarativeview.h @@ -60,7 +60,7 @@ class QDeclarativeError; QT_MODULE(Declarative) class QDeclarativeViewPrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeView : public QGraphicsView +class Q_QTQUICK1_EXPORT QDeclarativeView : public QGraphicsView { Q_OBJECT Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode) diff --git a/src/src.pro b/src/src.pro index f214763f52..baebcaa97f 100644 --- a/src/src.pro +++ b/src/src.pro @@ -6,4 +6,4 @@ SUBDIRS += declarative qtquick1 plugins # contains(QT_CONFIG, qmltest): SUBDIRS += qmltest SUBDIRS += imports -QT += script widgets widgets-private + diff --git a/tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro index 67be35f510..afccbcc6df 100644 --- a/tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro +++ b/tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro @@ -6,9 +6,8 @@ include(../../../../tools/qmlviewer/qml.pri) SOURCES += tst_qdeclarativeviewer.cpp -include(../symbianlibs.pri) - symbian: { + include(../symbianlibs.pri) importFiles.files = data importFiles.path = . DEPLOYMENT += importFiles diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro index 49134a05ab..7db7722c62 100644 --- a/tools/qmlplugindump/qmlplugindump.pro +++ b/tools/qmlplugindump/qmlplugindump.pro @@ -2,7 +2,7 @@ TEMPLATE = app CONFIG += qt uic console DESTDIR = $$QT.declarative.bins -QT += declarative declarative-private qtquick1 core-private +QT += declarative declarative-private qtquick1 core-private widgets TARGET = qmlplugindump diff --git a/tools/qmlscene/qmlscene.pro b/tools/qmlscene/qmlscene.pro index 0e8ca9b6c9..66c2cda035 100644 --- a/tools/qmlscene/qmlscene.pro +++ b/tools/qmlscene/qmlscene.pro @@ -2,7 +2,7 @@ TEMPLATE = app TARGET = qmlscene DESTDIR= $$QT.declarative.bins -QT += declarative declarative-private qtquick1 +QT += declarative declarative-private qtquick1 widgets target.path = $$[QT_INSTALL_BINS] INSTALLS += target