From b855240b782395f94315f43ea3e7e182299fac48 Mon Sep 17 00:00:00 2001 From: Matthew Vogt Date: Thu, 16 Feb 2012 14:43:03 +1000 Subject: Rename QDeclarative symbols to QQuick and QQml Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones --- tools/qmleasing/TextField.qml | 2 +- tools/qmleasing/easing.qml | 2 +- tools/qmleasing/qmleasing.pro | 2 +- tools/qmlmin/main.cpp | 20 ++++----- tools/qmlmin/qmlmin.pro | 2 +- tools/qmlplugindump/main.cpp | 66 ++++++++++++++-------------- tools/qmlplugindump/qmlplugindump.pro | 4 +- tools/qmlprofiler/commandlistener.cpp | 2 +- tools/qmlprofiler/commandlistener.h | 2 +- tools/qmlprofiler/constants.h | 2 +- tools/qmlprofiler/profileclient.cpp | 46 +++++++++---------- tools/qmlprofiler/profileclient.h | 16 +++---- tools/qmlprofiler/profiledata.cpp | 60 ++++++++++++------------- tools/qmlprofiler/profiledata.h | 10 ++--- tools/qmlprofiler/qmlprofiler.pro | 4 +- tools/qmlprofiler/qmlprofilerapplication.cpp | 10 ++--- tools/qmlprofiler/qmlprofilerapplication.h | 4 +- tools/qmlscene/main.cpp | 18 ++++---- tools/qmlscene/qmlscene.pro | 4 +- tools/qmltestrunner/qmltestrunner.pro | 4 +- 20 files changed, 140 insertions(+), 140 deletions(-) (limited to 'tools') diff --git a/tools/qmleasing/TextField.qml b/tools/qmleasing/TextField.qml index ccdb562cfa..2d7cb5ec28 100644 --- a/tools/qmleasing/TextField.qml +++ b/tools/qmleasing/TextField.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmleasing/easing.qml b/tools/qmleasing/easing.qml index 50a349357f..437bc7da3d 100644 --- a/tools/qmleasing/easing.qml +++ b/tools/qmleasing/easing.qml @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmleasing/qmleasing.pro b/tools/qmleasing/qmleasing.pro index 6f5e56b147..488ec5748a 100644 --- a/tools/qmleasing/qmleasing.pro +++ b/tools/qmleasing/qmleasing.pro @@ -1,4 +1,4 @@ -QT += declarative quick widgets +QT += qml quick widgets CONFIG -= app_bundle SOURCES += main.cpp diff --git a/tools/qmlmin/main.cpp b/tools/qmlmin/main.cpp index f59eedec84..8baa131b9a 100644 --- a/tools/qmlmin/main.cpp +++ b/tools/qmlmin/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE // // QML/JS minifier // -namespace QDeclarativeJS { +namespace QQmlJS { enum RegExpFlag { Global = 0x01, @@ -66,7 +66,7 @@ enum RegExpFlag { class QmlminLexer: protected Lexer, public Directives { - QDeclarativeJS::Engine _engine; + QQmlJS::Engine _engine; QString _fileName; QString _directives; @@ -492,7 +492,7 @@ bool Tokenize::parse(int startToken) return false; } -} // end of QDeclarativeJS namespace +} // end of QQmlJS namespace static void usage(bool showHelp = false) { @@ -571,7 +571,7 @@ int runQmlmin(int argc, char *argv[]) const QString code = QString::fromUtf8(file.readAll()); // QML files are UTF-8 encoded. file.close(); - QDeclarativeJS::Minify minify; + QQmlJS::Minify minify; if (! minify(fileName, code)) { std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "' (not a valid QML/JS file)" << std::endl; return EXIT_FAILURE; @@ -580,13 +580,13 @@ int runQmlmin(int argc, char *argv[]) // // verify the output // - QDeclarativeJS::Minify secondMinify; + QQmlJS::Minify secondMinify; if (! secondMinify(fileName, minify.minifiedCode()) || secondMinify.minifiedCode() != minify.minifiedCode()) { std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "'" << std::endl; return EXIT_FAILURE; } - QDeclarativeJS::Tokenize originalTokens, minimizedTokens; + QQmlJS::Tokenize originalTokens, minimizedTokens; originalTokens(fileName, code); minimizedTokens(fileName, minify.minifiedCode()); diff --git a/tools/qmlmin/qmlmin.pro b/tools/qmlmin/qmlmin.pro index 67c7004c18..c57ec29d5b 100644 --- a/tools/qmlmin/qmlmin.pro +++ b/tools/qmlmin/qmlmin.pro @@ -1,7 +1,7 @@ QT = core qmldevtools-private CONFIG += console CONFIG -= app_bundle -DESTDIR = $$QT.declarative.bins +DESTDIR = $$QT.qml.bins SOURCES += main.cpp target.path = $$[QT_INSTALL_BINS] diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index ad8a3a6d64..2c12941d07 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -101,14 +101,14 @@ void collectReachableMetaObjects(QObject *object, QSet *met for (int index = 0; index < meta->propertyCount(); ++index) { QMetaProperty prop = meta->property(index); - if (QDeclarativeMetaType::isQObject(prop.userType())) { + if (QQmlMetaType::isQObject(prop.userType())) { if (verbose) qDebug() << " Processing property" << prop.name(); currentProperty = QString("%1::%2").arg(meta->className(), prop.name()); // if the property was not initialized during construction, // accessing a member of oo is going to cause a segmentation fault - QObject *oo = QDeclarativeMetaType::toQObject(prop.read(object)); + QObject *oo = QQmlMetaType::toQObject(prop.read(object)); if (oo && !metas->contains(oo->metaObject())) collectReachableMetaObjects(oo, metas); currentProperty.clear(); @@ -116,7 +116,7 @@ void collectReachableMetaObjects(QObject *object, QSet *met } } -void collectReachableMetaObjects(const QDeclarativeType *ty, QSet *metas) +void collectReachableMetaObjects(const QQmlType *ty, QSet *metas) { collectReachableMetaObjects(ty->metaObject(), metas, ty->isExtendedType()); if (ty->attachedPropertiesType()) @@ -136,7 +136,7 @@ public: To do this, we need to find the QDeclarativeTypes associated with this QMetaObject. */ -static QHash > qmlTypesByCppName; +static QHash > qmlTypesByCppName; static QHash cppToId; @@ -187,13 +187,13 @@ public: }; QList moduleApis; -QSet collectReachableMetaObjects(QDeclarativeEngine *engine, const QList &skip = QList()) +QSet collectReachableMetaObjects(QQmlEngine *engine, const QList &skip = QList()) { QSet metas; metas.insert(FriendlyQObject::qtMeta()); QHash > extensions; - foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { + foreach (const QQmlType *ty, QQmlMetaType::qmlTypes()) { qmlTypesByCppName[ty->metaObject()->className()].insert(ty); if (ty->isExtendedType()) { extensions[ty->typeName()].insert(ty->metaObject()->className()); @@ -206,18 +206,18 @@ QSet collectReachableMetaObjects(QDeclarativeEngine *engine // Example: QDeclarativeGraphicsWidget overrides the QtQuick/QGraphicsWidget export // of QGraphicsWidget. foreach (const QByteArray &baseCpp, extensions.keys()) { - QSet baseExports = qmlTypesByCppName.value(baseCpp); + QSet baseExports = qmlTypesByCppName.value(baseCpp); const QSet extensionCppNames = extensions.value(baseCpp); foreach (const QByteArray &extensionCppName, extensionCppNames) { - const QSet extensionExports = qmlTypesByCppName.value(extensionCppName); + const QSet extensionExports = qmlTypesByCppName.value(extensionCppName); // remove extension exports from base imports - // unfortunately the QDeclarativeType pointers don't match, so can't use QSet::substract - QSet newBaseExports; - foreach (const QDeclarativeType *baseExport, baseExports) { + // unfortunately the QQmlType pointers don't match, so can't use QSet::substract + QSet newBaseExports; + foreach (const QQmlType *baseExport, baseExports) { bool match = false; - foreach (const QDeclarativeType *extensionExport, extensionExports) { + foreach (const QQmlType *extensionExport, extensionExports) { if (baseExport->qmlTypeName() == extensionExport->qmlTypeName() && baseExport->majorVersion() == extensionExport->majorVersion() && baseExport->minorVersion() == extensionExport->minorVersion()) { @@ -235,14 +235,14 @@ QSet collectReachableMetaObjects(QDeclarativeEngine *engine // find even more QMetaObjects by instantiating QML types and running // over the instances - foreach (QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { + foreach (QQmlType *ty, QQmlMetaType::qmlTypes()) { if (skip.contains(ty)) continue; if (ty->isExtendedType()) continue; if (!ty->isCreatable()) continue; - if (ty->typeName() == "QDeclarativeComponent") + if (ty->typeName() == "QQmlComponent") continue; QString tyName = ty->qmlTypeName(); @@ -261,10 +261,10 @@ QSet collectReachableMetaObjects(QDeclarativeEngine *engine } // extract exported module api - QHashIterator > moduleApiIt(QDeclarativeMetaType::moduleApis()); + QHashIterator > moduleApiIt(QQmlMetaType::moduleApis()); while (moduleApiIt.hasNext()) { moduleApiIt.next(); - foreach (const QDeclarativeMetaType::ModuleApi &api, moduleApiIt.value()) { + foreach (const QQmlMetaType::ModuleApi &api, moduleApiIt.value()) { ModuleApi moduleApi; moduleApi.uri = moduleApiIt.key(); moduleApi.majorVersion = api.major; @@ -322,11 +322,11 @@ public: if (meta->superClass()) qml->writeScriptBinding(QLatin1String("prototype"), enquote(convertToId(meta->superClass()))); - QSet qmlTypes = qmlTypesByCppName.value(meta->className()); + QSet qmlTypes = qmlTypesByCppName.value(meta->className()); if (!qmlTypes.isEmpty()) { - QHash exports; + QHash exports; - foreach (const QDeclarativeType *qmlTy, qmlTypes) { + foreach (const QQmlType *qmlTy, qmlTypes) { QString qmlTyName = qmlTy->qmlTypeName(); if (qmlTyName.startsWith(relocatableModuleUri + QLatin1Char('/'))) { qmlTyName.remove(0, relocatableModuleUri.size() + 1); @@ -432,7 +432,7 @@ public: { qml->writeStartObject(QLatin1String("Component")); qml->writeScriptBinding(QLatin1String("name"), enquote(QLatin1String("QEasingCurve"))); - qml->writeScriptBinding(QLatin1String("prototype"), enquote(QLatin1String("QDeclarativeEasingValueType"))); + qml->writeScriptBinding(QLatin1String("prototype"), enquote(QLatin1String("QQmlEasingValueType"))); qml->writeEndObject(); } @@ -447,7 +447,7 @@ private: */ static void removePointerAndList(QByteArray *typeName, bool *isList, bool *isPointer) { - static QByteArray declListPrefix = "QDeclarativeListProperty<"; + static QByteArray declListPrefix = "QQmlListProperty<"; if (typeName->endsWith('*')) { *isPointer = true; @@ -670,7 +670,7 @@ int main(int argc, char *argv[]) } } - QDeclarativeEngine engine; + QQmlEngine engine; if (!pluginImportPath.isEmpty()) { QDir cur = QDir::current(); cur.cd(pluginImportPath); @@ -682,11 +682,11 @@ int main(int argc, char *argv[]) // load the QtQuick 2 plugin { QByteArray code("import QtQuick 2.0\nQtObject {}"); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/loadqtquick2.qml")); c.create(); if (!c.errors().isEmpty()) { - foreach (const QDeclarativeError &error, c.errors()) + foreach (const QQmlError &error, c.errors()) qWarning() << error.toString(); return EXIT_IMPORTERROR; } @@ -694,7 +694,7 @@ int main(int argc, char *argv[]) // find all QMetaObjects reachable from the builtin module QSet defaultReachable = collectReachableMetaObjects(&engine); - QList defaultTypes = QDeclarativeMetaType::qmlTypes(); + QList defaultTypes = QQmlMetaType::qmlTypes(); // add some otherwise unreachable QMetaObjects defaultReachable.insert(&QQuickMouseEvent::staticMetaObject); @@ -708,7 +708,7 @@ int main(int argc, char *argv[]) } else { // find a valid QtQuick import QByteArray importCode; - QDeclarativeType *qtObjectType = QDeclarativeMetaType::qmlType(&QObject::staticMetaObject); + QQmlType *qtObjectType = QQmlMetaType::qmlType(&QObject::staticMetaObject); if (!qtObjectType) { qWarning() << "Could not find QtObject type"; importCode = QByteArray("import QtQuick 2.0\n"); @@ -733,12 +733,12 @@ int main(int argc, char *argv[]) { QByteArray code = importCode; code += "QtObject {}"; - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/typelist.qml")); c.create(); if (!c.errors().isEmpty()) { - foreach (const QDeclarativeError &error, c.errors()) + foreach (const QQmlError &error, c.errors()) qWarning() << error.toString(); return EXIT_IMPORTERROR; } @@ -761,7 +761,7 @@ int main(int argc, char *argv[]) // setup static rewrites of type names cppToId.insert("QString", "string"); - cppToId.insert("QDeclarativeEasingValueType::Type", "Type"); + cppToId.insert("QQmlEasingValueType::Type", "Type"); // start dumping data QByteArray bytes; @@ -787,7 +787,7 @@ int main(int argc, char *argv[]) dumper.dump(meta); } - // define QEasingCurve as an extension of QDeclarativeEasingValueType, this way + // define QEasingCurve as an extension of QQmlEasingValueType, this way // properties using the QEasingCurve type get useful type information. if (pluginImportUri.isEmpty()) dumper.writeEasingCurve(); diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro index e1c8485e27..7662fd79c8 100644 --- a/tools/qmlplugindump/qmlplugindump.pro +++ b/tools/qmlplugindump/qmlplugindump.pro @@ -1,8 +1,8 @@ TEMPLATE = app CONFIG += qt uic console -DESTDIR = $$QT.declarative.bins +DESTDIR = $$QT.qml.bins -QT += declarative declarative-private quick-private core-private +QT += qml qml-private quick-private core-private TARGET = qmlplugindump diff --git a/tools/qmlprofiler/commandlistener.cpp b/tools/qmlprofiler/commandlistener.cpp index cc969160d6..aa3659636d 100644 --- a/tools/qmlprofiler/commandlistener.cpp +++ b/tools/qmlprofiler/commandlistener.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmlprofiler/commandlistener.h b/tools/qmlprofiler/commandlistener.h index 77fd79362d..abe302cb8a 100644 --- a/tools/qmlprofiler/commandlistener.h +++ b/tools/qmlprofiler/commandlistener.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmlprofiler/constants.h b/tools/qmlprofiler/constants.h index 2e6acda275..e5a1f8025d 100644 --- a/tools/qmlprofiler/constants.h +++ b/tools/qmlprofiler/constants.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/tools/qmlprofiler/profileclient.cpp b/tools/qmlprofiler/profileclient.cpp index 3e84569f2f..5871aa29af 100644 --- a/tools/qmlprofiler/profileclient.cpp +++ b/tools/qmlprofiler/profileclient.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,8 +45,8 @@ #include ProfileClient::ProfileClient(const QString &clientName, - QDeclarativeDebugConnection *client) - : QDeclarativeDebugClient(clientName, client), + QQmlDebugConnection *client) + : QQmlDebugClient(clientName, client), m_recording(false), m_enabled(false) { @@ -111,19 +111,19 @@ public: , maximumTime(0) { ::memset(rangeCount, 0, - QDeclarativeProfilerService::MaximumRangeType * sizeof(int)); + QQmlProfilerService::MaximumRangeType * sizeof(int)); } qint64 inProgressRanges; - QStack rangeStartTimes[QDeclarativeProfilerService::MaximumRangeType]; - QStack rangeDatas[QDeclarativeProfilerService::MaximumRangeType]; - QStack rangeLocations[QDeclarativeProfilerService::MaximumRangeType]; - int rangeCount[QDeclarativeProfilerService::MaximumRangeType]; + QStack rangeStartTimes[QQmlProfilerService::MaximumRangeType]; + QStack rangeDatas[QQmlProfilerService::MaximumRangeType]; + QStack rangeLocations[QQmlProfilerService::MaximumRangeType]; + int rangeCount[QQmlProfilerService::MaximumRangeType]; qint64 maximumTime; }; DeclarativeProfileClient::DeclarativeProfileClient( - QDeclarativeDebugConnection *client) + QQmlDebugConnection *client) : ProfileClient(QLatin1String("CanvasFrameRate"), client), d(new DeclarativeProfileClientPrivate) { @@ -137,7 +137,7 @@ DeclarativeProfileClient::~DeclarativeProfileClient() void DeclarativeProfileClient::clearData() { ::memset(d->rangeCount, 0, - QDeclarativeProfilerService::MaximumRangeType * sizeof(int)); + QQmlProfilerService::MaximumRangeType * sizeof(int)); ProfileClient::clearData(); } @@ -159,43 +159,43 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) stream >> time >> messageType; - if (messageType >= QDeclarativeProfilerService::MaximumMessage) + if (messageType >= QQmlProfilerService::MaximumMessage) return; - if (messageType == QDeclarativeProfilerService::Event) { + if (messageType == QQmlProfilerService::Event) { int event; stream >> event; - if (event == QDeclarativeProfilerService::EndTrace) { + if (event == QQmlProfilerService::EndTrace) { emit this->traceFinished(time); d->maximumTime = time; d->maximumTime = qMax(time, d->maximumTime); - } else if (event == QDeclarativeProfilerService::AnimationFrame) { + } else if (event == QQmlProfilerService::AnimationFrame) { int frameRate, animationCount; stream >> frameRate >> animationCount; emit this->frame(time, frameRate, animationCount); d->maximumTime = qMax(time, d->maximumTime); - } else if (event == QDeclarativeProfilerService::StartTrace) { + } else if (event == QQmlProfilerService::StartTrace) { emit this->traceStarted(time); d->maximumTime = time; - } else if (event < QDeclarativeProfilerService::MaximumEventType) { + } else if (event < QQmlProfilerService::MaximumEventType) { d->maximumTime = qMax(time, d->maximumTime); } - } else if (messageType == QDeclarativeProfilerService::Complete) { + } else if (messageType == QQmlProfilerService::Complete) { emit complete(); } else { int range; stream >> range; - if (range >= QDeclarativeProfilerService::MaximumRangeType) + if (range >= QQmlProfilerService::MaximumRangeType) return; - if (messageType == QDeclarativeProfilerService::RangeStart) { + if (messageType == QQmlProfilerService::RangeStart) { d->rangeStartTimes[range].push(time); d->inProgressRanges |= (static_cast(1) << range); ++d->rangeCount[range]; - } else if (messageType == QDeclarativeProfilerService::RangeData) { + } else if (messageType == QQmlProfilerService::RangeData) { QString data; stream >> data; @@ -206,7 +206,7 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) d->rangeDatas[range][count-1] << data; } - } else if (messageType == QDeclarativeProfilerService::RangeLocation) { + } else if (messageType == QQmlProfilerService::RangeLocation) { QString fileName; int line; int column = -1; @@ -232,7 +232,7 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) d->rangeLocations[range].pop() : EventLocation(); qint64 startTime = d->rangeStartTimes[range].pop(); - emit this->range((QDeclarativeProfilerService::RangeType)range, + emit this->range((QQmlProfilerService::RangeType)range, startTime, time - startTime, data, location); if (d->rangeCount[range] == 0) { int count = d->rangeDatas[range].count() + @@ -246,7 +246,7 @@ void DeclarativeProfileClient::messageReceived(const QByteArray &data) } } -V8ProfileClient::V8ProfileClient(QDeclarativeDebugConnection *client) +V8ProfileClient::V8ProfileClient(QQmlDebugConnection *client) : ProfileClient(QLatin1String("V8Profiler"), client) { } diff --git a/tools/qmlprofiler/profileclient.h b/tools/qmlprofiler/profileclient.h index 87e9dbc508..fd581c59c4 100644 --- a/tools/qmlprofiler/profileclient.h +++ b/tools/qmlprofiler/profileclient.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,11 +44,11 @@ #include "profiledata.h" -#include -#include +#include +#include class ProfileClientPrivate; -class ProfileClient : public QDeclarativeDebugClient +class ProfileClient : public QQmlDebugClient { Q_OBJECT @@ -58,7 +58,7 @@ class ProfileClient : public QDeclarativeDebugClient public: ProfileClient(const QString & clientName, - QDeclarativeDebugConnection *client); + QQmlDebugConnection *client); ~ProfileClient(); bool isEnabled() const; @@ -88,7 +88,7 @@ class DeclarativeProfileClient : public ProfileClient Q_OBJECT public: - DeclarativeProfileClient(QDeclarativeDebugConnection *client); + DeclarativeProfileClient(QQmlDebugConnection *client); ~DeclarativeProfileClient(); public slots: @@ -98,7 +98,7 @@ public slots: signals: void traceFinished( qint64 time ); void traceStarted( qint64 time ); - void range(QDeclarativeProfilerService::RangeType type, qint64 startTime, + void range(QQmlProfilerService::RangeType type, qint64 startTime, qint64 length, const QStringList &data, const EventLocation &location); void frame(qint64 time, int frameRate, int animationCount); @@ -122,7 +122,7 @@ public: V8MaximumMessage }; - V8ProfileClient(QDeclarativeDebugConnection *client); + V8ProfileClient(QQmlDebugConnection *client); ~V8ProfileClient(); public slots: diff --git a/tools/qmlprofiler/profiledata.cpp b/tools/qmlprofiler/profiledata.cpp index 19c282b97c..96d7520844 100644 --- a/tools/qmlprofiler/profiledata.cpp +++ b/tools/qmlprofiler/profiledata.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -52,7 +52,7 @@ using namespace Constants; DeclarativeEvent::DeclarativeEvent() { - eventType = QDeclarativeProfilerService::MaximumRangeType; + eventType = QQmlProfilerService::MaximumRangeType; eventId = -1; duration = 0; calls = 0; @@ -204,22 +204,22 @@ bool compareStartIndexes(const DeclarativeEventEndTime &t1, return t1.startTimeIndex < t2.startTimeIndex; } -QString declarativeEventType(QDeclarativeProfilerService::RangeType typeEnum) +QString declarativeEventType(QQmlProfilerService::RangeType typeEnum) { switch (typeEnum) { - case QDeclarativeProfilerService::Painting: + case QQmlProfilerService::Painting: return QLatin1String(TYPE_PAINTING_STR); break; - case QDeclarativeProfilerService::Compiling: + case QQmlProfilerService::Compiling: return QLatin1String(TYPE_COMPILING_STR); break; - case QDeclarativeProfilerService::Creating: + case QQmlProfilerService::Creating: return QLatin1String(TYPE_CREATING_STR); break; - case QDeclarativeProfilerService::Binding: + case QQmlProfilerService::Binding: return QLatin1String(TYPE_BINDING_STR); break; - case QDeclarativeProfilerService::HandlingSignal: + case QQmlProfilerService::HandlingSignal: return QLatin1String(TYPE_HANDLINGSIGNAL_STR); break; default: @@ -227,32 +227,32 @@ QString declarativeEventType(QDeclarativeProfilerService::RangeType typeEnum) } } -QDeclarativeProfilerService::RangeType declarativeEventType(const QString &typeString) +QQmlProfilerService::RangeType declarativeEventType(const QString &typeString) { if (typeString == QLatin1String(TYPE_PAINTING_STR)) { - return QDeclarativeProfilerService::Painting; + return QQmlProfilerService::Painting; } else if (typeString == QLatin1String(TYPE_COMPILING_STR)) { - return QDeclarativeProfilerService::Compiling; + return QQmlProfilerService::Compiling; } else if (typeString == QLatin1String(TYPE_CREATING_STR)) { - return QDeclarativeProfilerService::Creating; + return QQmlProfilerService::Creating; } else if (typeString == QLatin1String(TYPE_BINDING_STR)) { - return QDeclarativeProfilerService::Binding; + return QQmlProfilerService::Binding; } else if (typeString == QLatin1String(TYPE_HANDLINGSIGNAL_STR)) { - return QDeclarativeProfilerService::HandlingSignal; + return QQmlProfilerService::HandlingSignal; } else { bool isNumber = false; int type = typeString.toUInt(&isNumber); if (isNumber) { - return (QDeclarativeProfilerService::RangeType)type; + return (QQmlProfilerService::RangeType)type; } else { - return QDeclarativeProfilerService::MaximumRangeType; + return QQmlProfilerService::MaximumRangeType; } } } QString getHashStringForDeclarativeEvent( EventLocation location, - QDeclarativeProfilerService::RangeType eventType) + QQmlProfilerService::RangeType eventType) { return QString("%1:%2:%3:%4").arg(location.filename, QString::number(location.line), @@ -383,7 +383,7 @@ const V8Events& ProfileData::getV8Events() const } void ProfileData::addDeclarativeEvent( - QDeclarativeProfilerService::RangeType type, qint64 startTime, qint64 length, + QQmlProfilerService::RangeType type, qint64 startTime, qint64 length, const QStringList &data, const EventLocation &location) { const QChar colon = QLatin1Char(':'); @@ -408,7 +408,7 @@ void ProfileData::addDeclarativeEvent( // backwards compatibility: "compiling" events don't have a proper location in older // version of the protocol, but the filename is passed in the details string - if (type == QDeclarativeProfilerService::Compiling && eventLocation.filename.isEmpty()) { + if (type == QQmlProfilerService::Compiling && eventLocation.filename.isEmpty()) { eventLocation.filename = details; eventLocation.line = 1; eventLocation.column = 1; @@ -544,7 +544,7 @@ void ProfileData::addFrameEvent(qint64 time, int framerate, int animationcount) newEvent = new DeclarativeEvent; newEvent->displayname = displayName; newEvent->eventHashStr = eventHashStr; - newEvent->eventType = QDeclarativeProfilerService::Painting; + newEvent->eventType = QQmlProfilerService::Painting; newEvent->details = details; d->m_eventDescriptions.insert(eventHashStr, newEvent); } @@ -651,7 +651,7 @@ void ProfileDataPrivate::clearDeclarativeRootEvent() m_qmlRootEvent.location = EventLocation(); m_qmlRootEvent.eventHashStr = m_rootEventName; m_qmlRootEvent.details = m_rootEventDesc; - m_qmlRootEvent.eventType = QDeclarativeProfilerService::Binding; + m_qmlRootEvent.eventType = QQmlProfilerService::Binding; m_qmlRootEvent.duration = 0; m_qmlRootEvent.calls = 0; m_qmlRootEvent.minTime = 0; @@ -721,7 +721,7 @@ void ProfileData::compileStatistics(qint64 startTime, qint64 endTime) continue; } - if (eventDescription->eventType == QDeclarativeProfilerService::Painting) { + if (eventDescription->eventType == QQmlProfilerService::Painting) { // skip animation/paint events continue; } @@ -948,7 +948,7 @@ void ProfileData::findAnimationLimits() for (int i = 0; i < d->m_startTimeSortedList.count(); i++) { if (d->m_startTimeSortedList[i].description->eventType == - QDeclarativeProfilerService::Painting && + QQmlProfilerService::Painting && d->m_startTimeSortedList[i].animationCount >= 0) { int animationcount = d->m_startTimeSortedList[i].animationCount; if (d->m_lastFrameEvent) { @@ -974,7 +974,7 @@ void ProfileData::computeNestingLevels() int level = MIN_LEVEL; endtimesPerLevel[MIN_LEVEL] = 0; - for (int i = 0; i < QDeclarativeProfilerService::MaximumRangeType; i++) { + for (int i = 0; i < QQmlProfilerService::MaximumRangeType; i++) { nestingLevels << MIN_LEVEL; QHash dummyHash; dummyHash[MIN_LEVEL] = 0; @@ -985,7 +985,7 @@ void ProfileData::computeNestingLevels() qint64 st = d->m_startTimeSortedList[i].startTime; int type = d->m_startTimeSortedList[i].description->eventType; - if (type == QDeclarativeProfilerService::Painting) { + if (type == QQmlProfilerService::Painting) { // animation/paint events have level 1 by definition, // but are not considered parents of other events for // statistical purposes @@ -1075,8 +1075,8 @@ void ProfileData::reloadDetails() { // request binding/signal details from the AST foreach (DeclarativeEvent *event, d->m_eventDescriptions.values()) { - if (event->eventType != QDeclarativeProfilerService::Binding && - event->eventType != QDeclarativeProfilerService::HandlingSignal) + if (event->eventType != QQmlProfilerService::Binding && + event->eventType != QQmlProfilerService::HandlingSignal) continue; // This skips anonymous bindings in Qt4.8 (we don't have valid location data for them) @@ -1146,7 +1146,7 @@ void ProfileData::findBindingLoops(qint64 startTime, qint64 endTime) } void ProfileData::rewriteDetailsString( - QDeclarativeProfilerService::RangeType eventType, + QQmlProfilerService::RangeType eventType, const EventLocation &location, const QString &newString) { QString eventHashStr = getHashStringForDeclarativeEvent(location, @@ -1366,7 +1366,7 @@ bool ProfileData::save(const QString &filename) QString::number(d->m_eventDescriptions.keys().indexOf( rangedEvent.description->eventHashStr))); if (rangedEvent.description->eventType == - QDeclarativeProfilerService::Painting && rangedEvent.animationCount >= 0) { + QQmlProfilerService::Painting && rangedEvent.animationCount >= 0) { // animation frame stream.writeAttribute("framerate", QString::number(rangedEvent.frameRate)); @@ -1825,7 +1825,7 @@ QString ProfileData::getDetails(int index) const { // special: animations if (d->m_startTimeSortedList[index].description->eventType == - QDeclarativeProfilerService::Painting && + QQmlProfilerService::Painting && d->m_startTimeSortedList[index].animationCount >= 0) return tr("%1 animations at %2 FPS").arg( QString::number(d->m_startTimeSortedList[index].animationCount), diff --git a/tools/qmlprofiler/profiledata.h b/tools/qmlprofiler/profiledata.h index eaa2127f4a..4dd12f7fd3 100644 --- a/tools/qmlprofiler/profiledata.h +++ b/tools/qmlprofiler/profiledata.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef PROFILEDATA_H #define PROFILEDATA_H -#include +#include #include #include @@ -87,7 +87,7 @@ struct DeclarativeEvent QString eventHashStr; QString details; EventLocation location; - QDeclarativeProfilerService::RangeType eventType; + QQmlProfilerService::RangeType eventType; QHash parentHash; QHash childrenHash; qint64 duration; @@ -205,7 +205,7 @@ signals: public slots: void clear(); - void addDeclarativeEvent(QDeclarativeProfilerService::RangeType type, + void addDeclarativeEvent(QQmlProfilerService::RangeType type, qint64 startTime, qint64 length, const QStringList &data, const EventLocation &location); @@ -222,7 +222,7 @@ public slots: void setTraceEndTime( qint64 time ); void setTraceStartTime( qint64 time ); - void rewriteDetailsString(QDeclarativeProfilerService::RangeType eventType, + void rewriteDetailsString(QQmlProfilerService::RangeType eventType, const EventLocation &location, const QString &newString); void finishedRewritingDetails(); diff --git a/tools/qmlprofiler/qmlprofiler.pro b/tools/qmlprofiler/qmlprofiler.pro index 1d8f89a150..ec5f50e376 100644 --- a/tools/qmlprofiler/qmlprofiler.pro +++ b/tools/qmlprofiler/qmlprofiler.pro @@ -1,8 +1,8 @@ TEMPLATE = app TARGET = qmlprofiler -DESTDIR = $$QT.declarative.bins +DESTDIR = $$QT.qml.bins -QT += declarative declarative-private network +QT += qml qml-private network target.path = $$[QT_INSTALL_BINS] INSTALLS += target diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp index af5f4298a8..855ede711c 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.cpp +++ b/tools/qmlprofiler/qmlprofilerapplication.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -104,8 +104,8 @@ QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) : connect(&m_declarativeProfilerClient, SIGNAL(enabledChanged()), this, SLOT(traceClientEnabled())); connect(&m_declarativeProfilerClient, SIGNAL(recordingChanged(bool)), this, SLOT(recordingChanged())); - connect(&m_declarativeProfilerClient, SIGNAL(range(QDeclarativeProfilerService::RangeType,qint64,qint64,QStringList,EventLocation)), - &m_profileData, SLOT(addDeclarativeEvent(QDeclarativeProfilerService::RangeType,qint64,qint64,QStringList,EventLocation))); + connect(&m_declarativeProfilerClient, SIGNAL(range(QQmlProfilerService::RangeType,qint64,qint64,QStringList,EventLocation)), + &m_profileData, SLOT(addDeclarativeEvent(QQmlProfilerService::RangeType,qint64,qint64,QStringList,EventLocation))); connect(&m_declarativeProfilerClient, SIGNAL(traceFinished(qint64)), &m_profileData, SLOT(setTraceEndTime(qint64))); connect(&m_declarativeProfilerClient, SIGNAL(traceStarted(qint64)), &m_profileData, SLOT(setTraceStartTime(qint64))); connect(&m_declarativeProfilerClient, SIGNAL(frame(qint64,int,int)), &m_profileData, SLOT(addFrameEvent(qint64,int,int))); @@ -414,7 +414,7 @@ void QmlProfilerApplication::logStatus(const QString &status) void QmlProfilerApplication::declarativeComplete() { m_declarativeDataReady = true; - if (m_v8profilerClient.state() != QDeclarativeDebugClient::Enabled || + if (m_v8profilerClient.state() != QQmlDebugClient::Enabled || m_v8DataReady) { m_profileData.complete(); // once complete is sent, reset the flag @@ -425,7 +425,7 @@ void QmlProfilerApplication::declarativeComplete() void QmlProfilerApplication::v8Complete() { m_v8DataReady = true; - if (m_declarativeProfilerClient.state() != QDeclarativeDebugClient::Enabled || + if (m_declarativeProfilerClient.state() != QQmlDebugClient::Enabled || m_declarativeDataReady) { m_profileData.complete(); // once complete is sent, reset the flag diff --git a/tools/qmlprofiler/qmlprofilerapplication.h b/tools/qmlprofiler/qmlprofilerapplication.h index 49ddaf88cd..5bedb46cff 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.h +++ b/tools/qmlprofiler/qmlprofilerapplication.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -103,7 +103,7 @@ private: bool m_verbose; bool m_quitAfterSave; - QDeclarativeDebugConnection m_connection; + QQmlDebugConnection m_connection; DeclarativeProfileClient m_declarativeProfilerClient; V8ProfileClient m_v8profilerClient; ProfileData m_profileData; diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index d586131845..327dfc6889 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -47,10 +47,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -308,7 +308,7 @@ static void displayFileDialog(Options *options) #endif } -static void loadDummyDataFiles(QDeclarativeEngine &engine, const QString& directory) +static void loadDummyDataFiles(QQmlEngine &engine, const QString& directory) { QDir dir(directory+"/dummydata", "*.qml"); QStringList list = dir.entryList(); @@ -317,13 +317,13 @@ static void loadDummyDataFiles(QDeclarativeEngine &engine, const QString& direct QFile f(dir.filePath(qml)); f.open(QIODevice::ReadOnly); QByteArray data = f.readAll(); - QDeclarativeComponent comp(&engine); + QQmlComponent comp(&engine); comp.setData(data, QUrl()); QObject *dummyData = comp.create(); if(comp.isError()) { - QList errors = comp.errors(); - foreach (const QDeclarativeError &error, errors) { + QList errors = comp.errors(); + foreach (const QQmlError &error, errors) { qWarning() << error; } } @@ -401,7 +401,7 @@ int main(int argc, char ** argv) #endif QWindow *window = 0; - QDeclarativeEngine *engine = 0; + QQmlEngine *engine = 0; int exitCode = 0; diff --git a/tools/qmlscene/qmlscene.pro b/tools/qmlscene/qmlscene.pro index 5e4d79253e..392e607b88 100644 --- a/tools/qmlscene/qmlscene.pro +++ b/tools/qmlscene/qmlscene.pro @@ -1,8 +1,8 @@ TEMPLATE = app TARGET = qmlscene -DESTDIR= $$QT.declarative.bins +DESTDIR= $$QT.qml.bins -QT += declarative quick core-private +QT += qml quick core-private !isEmpty(QT.widgets.name): QT += widgets target.path = $$[QT_INSTALL_BINS] diff --git a/tools/qmltestrunner/qmltestrunner.pro b/tools/qmltestrunner/qmltestrunner.pro index 72990d6f98..a6c9533e0a 100644 --- a/tools/qmltestrunner/qmltestrunner.pro +++ b/tools/qmltestrunner/qmltestrunner.pro @@ -1,11 +1,11 @@ TEMPLATE = app TARGET = qmltestrunner -DESTDIR= $$QT.declarative.bins +DESTDIR= $$QT.qml.bins CONFIG += warn_on SOURCES += main.cpp -QT += declarative qmltest +QT += qml qmltest macx: CONFIG -= app_bundle -- cgit v1.2.3