summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-24 02:42:00 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-24 02:42:00 (GMT)
commit7c76abb0dc4204043bec9b6fa315f9753a7986ae (patch)
treecee303672cfd138790645e731f2d69472564d4b7 /tools
parent4066e60e859853cfe3240245ba05271e79839506 (diff)
downloadQt-7c76abb0dc4204043bec9b6fa315f9753a7986ae.zip
Qt-7c76abb0dc4204043bec9b6fa315f9753a7986ae.tar.gz
Qt-7c76abb0dc4204043bec9b6fa315f9753a7986ae.tar.bz2
Change class prefix to from QmlXXX to QDeclarativeXXX, QmlGraphicsXXX to QDeclarativeXXX.
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp2
-rw-r--r--tools/linguist/lupdate/lupdate.pro2
-rw-r--r--tools/linguist/lupdate/qdeclarative.cpp (renamed from tools/linguist/lupdate/qml.cpp)14
-rw-r--r--tools/qdoc3/atom.cpp4
-rw-r--r--tools/qdoc3/atom.h2
-rw-r--r--tools/qdoc3/codemarker.cpp12
-rw-r--r--tools/qdoc3/codemarker.h2
-rw-r--r--tools/qdoc3/cppcodemarker.cpp34
-rw-r--r--tools/qdoc3/cppcodemarker.h2
-rw-r--r--tools/qdoc3/cppcodeparser.cpp40
-rw-r--r--tools/qdoc3/doc.cpp4
-rw-r--r--tools/qdoc3/generator.cpp4
-rw-r--r--tools/qdoc3/generator.h2
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp6
-rw-r--r--tools/qdoc3/htmlgenerator.cpp80
-rw-r--r--tools/qdoc3/htmlgenerator.h14
-rw-r--r--tools/qdoc3/node.cpp42
-rw-r--r--tools/qdoc3/node.h38
-rw-r--r--tools/qdoc3/pagegenerator.cpp8
-rw-r--r--tools/qdoc3/tree.cpp4
-rw-r--r--tools/qml/content/Browser.qml (renamed from tools/qmlviewer/content/Browser.qml)0
-rw-r--r--tools/qml/content/images/folder.png (renamed from tools/qmlviewer/content/images/folder.png)bin1841 -> 1841 bytes
-rw-r--r--tools/qml/content/images/titlebar.png (renamed from tools/qmlviewer/content/images/titlebar.png)bin1436 -> 1436 bytes
-rw-r--r--tools/qml/content/images/titlebar.sci (renamed from tools/qmlviewer/content/images/titlebar.sci)0
-rw-r--r--tools/qml/content/images/up.png (renamed from tools/qmlviewer/content/images/up.png)bin662 -> 662 bytes
-rw-r--r--tools/qml/deviceorientation.cpp (renamed from tools/qmlviewer/deviceorientation.cpp)0
-rw-r--r--tools/qml/deviceorientation.h (renamed from tools/qmlviewer/deviceorientation.h)0
-rw-r--r--tools/qml/deviceorientation_maemo.cpp (renamed from tools/qmlviewer/deviceorientation_maemo.cpp)0
-rw-r--r--tools/qml/main.cpp (renamed from tools/qmlviewer/main.cpp)38
-rw-r--r--tools/qml/proxysettings.cpp (renamed from tools/qmlviewer/proxysettings.cpp)0
-rw-r--r--tools/qml/proxysettings.h (renamed from tools/qmlviewer/proxysettings.h)0
-rw-r--r--tools/qml/proxysettings.ui (renamed from tools/qmlviewer/proxysettings.ui)0
-rw-r--r--tools/qml/qdeclarativefolderlistmodel.cpp (renamed from tools/qmlviewer/qmlfolderlistmodel.cpp)84
-rw-r--r--tools/qml/qdeclarativefolderlistmodel.h (renamed from tools/qmlviewer/qmlfolderlistmodel.h)26
-rw-r--r--tools/qml/qfxtester.cpp (renamed from tools/qmlviewer/qfxtester.cpp)86
-rw-r--r--tools/qml/qfxtester.h (renamed from tools/qmlviewer/qfxtester.h)38
-rw-r--r--tools/qml/qml.pro (renamed from tools/qmlviewer/qmlviewer.pro)10
-rw-r--r--tools/qml/qmlruntime.cpp (renamed from tools/qmlviewer/qmlviewer.cpp)162
-rw-r--r--tools/qml/qmlruntime.h (renamed from tools/qmlviewer/qmlviewer.h)30
-rw-r--r--tools/qml/qmlruntime.qrc (renamed from tools/qmlviewer/qmlviewer.qrc)0
-rw-r--r--tools/qml/recopts.ui (renamed from tools/qmlviewer/recopts.ui)0
-rw-r--r--tools/tools.pro2
42 files changed, 396 insertions, 396 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 8c2a015..3b5a10a 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2067,7 +2067,7 @@ bool Configure::checkAvailability(const QString &part)
} else if (part == "WEBKIT") {
available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++");
} else if (part == "DECLARATIVE") {
- available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h");
+ available = QFile::exists(sourcePath + "/src/declarative/qml/qdeclarativecomponent.h");
} else if (part == "AUDIO_BACKEND") {
available = true;
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
diff --git a/tools/linguist/lupdate/lupdate.pro b/tools/linguist/lupdate/lupdate.pro
index 283d69f..1f88931 100644
--- a/tools/linguist/lupdate/lupdate.pro
+++ b/tools/linguist/lupdate/lupdate.pro
@@ -26,7 +26,7 @@ SOURCES += \
cpp.cpp \
java.cpp \
qscript.cpp \
- qml.cpp \
+ qdeclarative.cpp \
ui.cpp
HEADERS += \
diff --git a/tools/linguist/lupdate/qml.cpp b/tools/linguist/lupdate/qdeclarative.cpp
index cb35f47..a734e99 100644
--- a/tools/linguist/lupdate/qml.cpp
+++ b/tools/linguist/lupdate/qdeclarative.cpp
@@ -47,12 +47,12 @@
#include <QtCore/QFile>
#include <QtCore/QString>
-#include "parser/qmljsengine_p.h"
-#include "parser/qmljsparser_p.h"
-#include "parser/qmljslexer_p.h"
-#include "parser/qmljsnodepool_p.h"
-#include "parser/qmljsastvisitor_p.h"
-#include "parser/qmljsast_p.h"
+#include "parser/qdeclarativejsengine_p.h"
+#include "parser/qdeclarativejsparser_p.h"
+#include "parser/qdeclarativejslexer_p.h"
+#include "parser/qdeclarativejsnodepool_p.h"
+#include "parser/qdeclarativejsastvisitor_p.h"
+#include "parser/qdeclarativejsast_p.h"
#include <QCoreApplication>
#include <QFile>
@@ -65,7 +65,7 @@
QT_BEGIN_NAMESPACE
-using namespace QmlJS;
+using namespace QDeclarativeJS;
class FindTrCalls: protected AST::Visitor
{
diff --git a/tools/qdoc3/atom.cpp b/tools/qdoc3/atom.cpp
index 88f44ea..6920e9d 100644
--- a/tools/qdoc3/atom.cpp
+++ b/tools/qdoc3/atom.cpp
@@ -133,7 +133,7 @@ QString Atom::UPPERROMAN_ ("upperroman");
\value ParaLeft
\value ParaRight
\value Qml
- \value QmlText
+ \value QDeclarativeText
\value QuotationLeft
\value QuotationRight
\value RawString
@@ -210,7 +210,7 @@ static const struct {
{ "ParaRight", Atom::ParaRight },
#ifdef QDOC_QML
{ "Qml", Atom::Qml},
- { "QmlText", Atom::QmlText },
+ { "QDeclarativeText", Atom::QDeclarativeText },
#endif
{ "QuotationLeft", Atom::QuotationLeft },
{ "QuotationRight", Atom::QuotationRight },
diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h
index 70fbae9..d13afbc 100644
--- a/tools/qdoc3/atom.h
+++ b/tools/qdoc3/atom.h
@@ -103,7 +103,7 @@ class Atom
ParaRight,
#ifdef QDOC_QML
Qml,
- QmlText,
+ QDeclarativeText,
#endif
QuotationLeft,
QuotationRight,
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index ee93080..d890758 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -290,13 +290,13 @@ QString CodeMarker::taggedQmlNode(const Node* node)
{
QString tag;
switch (node->type()) {
- case Node::QmlProperty:
+ case Node::QDeclarativeProperty:
tag = QLatin1String("@property");
break;
- case Node::QmlSignal:
+ case Node::QDeclarativeSignal:
tag = QLatin1String("@signal");
break;
- case Node::QmlMethod:
+ case Node::QDeclarativeMethod:
tag = QLatin1String("@method");
break;
default:
@@ -369,7 +369,7 @@ void CodeMarker::insert(FastSection &fastSection,
bool inheritedMember = false;
if (!node->relates()) {
if (node->parent() != (const InnerNode*)fastSection.innerNode) {
- if (node->type() != Node::QmlProperty)
+ if (node->type() != Node::QDeclarativeProperty)
inheritedMember = true;
}
}
@@ -612,9 +612,9 @@ QString CodeMarker::macName(const Node *node, const QString &name)
#ifdef QDOC_QML
/*!
Get the list of documentation sections for the children of
- the specified QmlClassNode.
+ the specified QDeclarativeClassNode.
*/
-QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle )
+QList<Section> CodeMarker::qmlSections(const QDeclarativeClassNode* , SynopsisStyle )
{
return QList<Section>();
}
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index 1b21753..9e754a2 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -138,7 +138,7 @@ class CodeMarker
SynopsisStyle style,
Status status) = 0;
#ifdef QDOC_QML
- virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
+ virtual QList<Section> qmlSections(const QDeclarativeClassNode* qmlClassNode,
SynopsisStyle style);
#endif
virtual const Node *resolveTarget(const QString& target,
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 657cfbb..ff09bb7 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -194,8 +194,8 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node,
synopsis = "class " + name;
break;
case Node::Function:
- case Node::QmlSignal:
- case Node::QmlMethod:
+ case Node::QDeclarativeSignal:
+ case Node::QDeclarativeMethod:
func = (const FunctionNode *) node;
if (style != SeparateList && !func->returnType().isEmpty())
synopsis = typified(func->returnType()) + " ";
@@ -355,15 +355,15 @@ QString CppCodeMarker::markedUpQmlItem(const Node* node, bool summary)
QString name = taggedQmlNode(node);
if (summary) {
name = linkTag(node,name);
- } else if (node->type() == Node::QmlProperty) {
- const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(node);
+ } else if (node->type() == Node::QDeclarativeProperty) {
+ const QDeclarativePropertyNode* pn = static_cast<const QDeclarativePropertyNode*>(node);
if (pn->isAttached())
name.prepend(pn->element() + QLatin1Char('.'));
}
name = "<@name>" + name + "</@name>";
QString synopsis = name;
- if (node->type() == Node::QmlProperty) {
- const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(node);
+ if (node->type() == Node::QDeclarativeProperty) {
+ const QDeclarativePropertyNode* pn = static_cast<const QDeclarativePropertyNode*>(node);
synopsis += " : " + typified(pn->dataType());
}
@@ -1108,7 +1108,7 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
Currently, it only handles QML property groups.
*/
-QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
+QList<Section> CppCodeMarker::qmlSections(const QDeclarativeClassNode* qmlClassNode,
SynopsisStyle style)
{
QList<Section> sections;
@@ -1141,12 +1141,12 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
NodeList::ConstIterator c = qmlClassNode->childNodes().begin();
while (c != qmlClassNode->childNodes().end()) {
- if ((*c)->subType() == Node::QmlPropertyGroup) {
- const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(*c);
+ if ((*c)->subType() == Node::QDeclarativePropertyGroup) {
+ const QDeclarativePropGroupNode* qpgn = static_cast<const QDeclarativePropGroupNode*>(*c);
NodeList::ConstIterator p = qpgn->childNodes().begin();
while (p != qpgn->childNodes().end()) {
- if ((*p)->type() == Node::QmlProperty) {
- const QmlPropertyNode* pn = static_cast<const QmlPropertyNode*>(*p);
+ if ((*p)->type() == Node::QDeclarativeProperty) {
+ const QDeclarativePropertyNode* pn = static_cast<const QDeclarativePropertyNode*>(*p);
if (pn->isAttached())
insert(qmlattachedproperties,*p,style,Okay);
else
@@ -1155,14 +1155,14 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
++p;
}
}
- else if ((*c)->type() == Node::QmlSignal) {
+ else if ((*c)->type() == Node::QDeclarativeSignal) {
const FunctionNode* sn = static_cast<const FunctionNode*>(*c);
if (sn->isAttached())
insert(qmlattachedsignals,*c,style,Okay);
else
insert(qmlsignals,*c,style,Okay);
}
- else if ((*c)->type() == Node::QmlMethod) {
+ else if ((*c)->type() == Node::QDeclarativeMethod) {
const FunctionNode* mn = static_cast<const FunctionNode*>(*c);
if (mn->isAttached())
insert(qmlattachedmethods,*c,style,Okay);
@@ -1187,21 +1187,21 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
FastSection qmlattachedmethods(qmlClassNode,"Attached Method Documentation");
NodeList::ConstIterator c = qmlClassNode->childNodes().begin();
while (c != qmlClassNode->childNodes().end()) {
- if ((*c)->subType() == Node::QmlPropertyGroup) {
- const QmlPropGroupNode* pgn = static_cast<const QmlPropGroupNode*>(*c);
+ if ((*c)->subType() == Node::QDeclarativePropertyGroup) {
+ const QDeclarativePropGroupNode* pgn = static_cast<const QDeclarativePropGroupNode*>(*c);
if (pgn->isAttached())
insert(qmlattachedproperties,*c,style,Okay);
else
insert(qmlproperties,*c,style,Okay);
}
- else if ((*c)->type() == Node::QmlSignal) {
+ else if ((*c)->type() == Node::QDeclarativeSignal) {
const FunctionNode* sn = static_cast<const FunctionNode*>(*c);
if (sn->isAttached())
insert(qmlattachedsignals,*c,style,Okay);
else
insert(qmlsignals,*c,style,Okay);
}
- else if ((*c)->type() == Node::QmlMethod) {
+ else if ((*c)->type() == Node::QDeclarativeMethod) {
const FunctionNode* mn = static_cast<const FunctionNode*>(*c);
if (mn->isAttached())
insert(qmlattachedmethods,*c,style,Okay);
diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h
index 2dcf400..2f6471a 100644
--- a/tools/qdoc3/cppcodemarker.h
+++ b/tools/qdoc3/cppcodemarker.h
@@ -79,7 +79,7 @@ class CppCodeMarker : public CodeMarker
QList<Section> sections(const InnerNode *innerNode,
SynopsisStyle style,
Status status);
- QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
+ QList<Section> qmlSections(const QDeclarativeClassNode* qmlClassNode,
SynopsisStyle style);
const Node *resolveTarget(const QString& target,
const Tree *tree,
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index d9e9c3b..4d30f3a 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -728,7 +728,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (n)
classNode = static_cast<const ClassNode*>(n);
}
- return new QmlClassNode(tre->root(), names[0], classNode);
+ return new QDeclarativeClassNode(tre->root(), names[0], classNode);
}
else if (command == COMMAND_QMLBASICTYPE) {
#if 0
@@ -738,11 +738,11 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
FakeNode* pageNode = static_cast<FakeNode*>(tre->root()->findNode(parts[1], Node::Fake));
if (pageNode) {
qDebug() << "FOUND";
- return new QmlBasicTypeNode(pageNode, parts[0]);
+ return new QDeclarativeBasicTypeNode(pageNode, parts[0]);
}
}
#endif
- return new QmlBasicTypeNode(tre->root(), arg);
+ return new QDeclarativeBasicTypeNode(tre->root(), arg);
}
else if ((command == COMMAND_QMLSIGNAL) ||
(command == COMMAND_QMLMETHOD) ||
@@ -750,19 +750,19 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
(command == COMMAND_QMLATTACHEDMETHOD)) {
QString element;
QString type;
- QmlClassNode* qmlClass = 0;
+ QDeclarativeClassNode* qmlClass = 0;
if (splitQmlMethodArg(doc,arg,type,element)) {
Node* n = tre->findNode(QStringList(element),Node::Fake);
- if (n && n->subType() == Node::QmlClass) {
- qmlClass = static_cast<QmlClassNode*>(n);
+ if (n && n->subType() == Node::QDeclarativeClass) {
+ qmlClass = static_cast<QDeclarativeClassNode*>(n);
if (command == COMMAND_QMLSIGNAL)
- return makeFunctionNode(doc,arg,qmlClass,Node::QmlSignal,false,COMMAND_QMLSIGNAL);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeSignal,false,COMMAND_QMLSIGNAL);
else if (command == COMMAND_QMLATTACHEDSIGNAL)
- return makeFunctionNode(doc,arg,qmlClass,Node::QmlSignal,true,COMMAND_QMLATTACHEDSIGNAL);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeSignal,true,COMMAND_QMLATTACHEDSIGNAL);
else if (command == COMMAND_QMLMETHOD)
- return makeFunctionNode(doc,arg,qmlClass,Node::QmlMethod,false,COMMAND_QMLMETHOD);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeMethod,false,COMMAND_QMLMETHOD);
else if (command == COMMAND_QMLATTACHEDMETHOD)
- return makeFunctionNode(doc,arg,qmlClass,Node::QmlMethod,true,COMMAND_QMLATTACHEDMETHOD);
+ return makeFunctionNode(doc,arg,qmlClass,Node::QDeclarativeMethod,true,COMMAND_QMLATTACHEDMETHOD);
else
return 0; // never get here.
}
@@ -850,7 +850,7 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
const QString& command,
const QStringList& args)
{
- QmlPropGroupNode* qmlPropGroup = 0;
+ QDeclarativePropGroupNode* qmlPropGroup = 0;
if ((command == COMMAND_QMLPROPERTY) ||
(command == COMMAND_QMLATTACHEDPROPERTY)) {
QString type;
@@ -860,20 +860,20 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
QStringList::ConstIterator arg = args.begin();
if (splitQmlPropertyArg(doc,(*arg),type,element,property)) {
Node* n = tre->findNode(QStringList(element),Node::Fake);
- if (n && n->subType() == Node::QmlClass) {
- QmlClassNode* qmlClass = static_cast<QmlClassNode*>(n);
+ if (n && n->subType() == Node::QDeclarativeClass) {
+ QDeclarativeClassNode* qmlClass = static_cast<QDeclarativeClassNode*>(n);
if (qmlClass)
- qmlPropGroup = new QmlPropGroupNode(qmlClass,
+ qmlPropGroup = new QDeclarativePropGroupNode(qmlClass,
property,
attached);
}
}
if (qmlPropGroup) {
- const ClassNode *correspondingClass = static_cast<const QmlClassNode*>(qmlPropGroup->parent())->classNode();
+ const ClassNode *correspondingClass = static_cast<const QDeclarativeClassNode*>(qmlPropGroup->parent())->classNode();
PropertyNode *correspondingProperty = 0;
if (correspondingClass)
correspondingProperty = static_cast<PropertyNode*>((Node*)correspondingClass->findNode(property, Node::Property));
- QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup,property,type,attached);
+ QDeclarativePropertyNode *qmlPropNode = new QDeclarativePropertyNode(qmlPropGroup,property,type,attached);
if (correspondingProperty) {
bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*');
qmlPropNode->setWritable(writableList || correspondingProperty->isWritable());
@@ -881,7 +881,7 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
++arg;
while (arg != args.end()) {
if (splitQmlPropertyArg(doc,(*arg),type,element,property)) {
- QmlPropertyNode* qmlPropNode = new QmlPropertyNode(qmlPropGroup,
+ QDeclarativePropertyNode* qmlPropNode = new QDeclarativePropertyNode(qmlPropGroup,
property,
type,
attached);
@@ -1033,12 +1033,12 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
#ifdef QDOC_QML
else if (command == COMMAND_QMLINHERITS) {
setLink(node, Node::InheritsLink, arg);
- if (node->subType() == Node::QmlClass) {
- QmlClassNode::addInheritedBy(arg,node);
+ if (node->subType() == Node::QDeclarativeClass) {
+ QDeclarativeClassNode::addInheritedBy(arg,node);
}
}
else if (command == COMMAND_QMLDEFAULT) {
- QmlPropGroupNode* qpgn = static_cast<QmlPropGroupNode*>(node);
+ QDeclarativePropGroupNode* qpgn = static_cast<QDeclarativePropGroupNode*>(node);
qpgn->setDefault();
}
#endif
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index ad4cdde..78b5d1f 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -553,7 +553,7 @@ void DocParser::parse(const QString& source,
append(Atom::Qml, getCode(CMD_QML, marker));
break;
case CMD_QMLTEXT:
- append(Atom::QmlText);
+ append(Atom::QDeclarativeText);
break;
#endif
case CMD_CODELINE:
@@ -2842,7 +2842,7 @@ void Doc::initialize(const Config& config)
DocParser::quoting = config.getBool(CONFIG_QUOTINGINFORMATION);
#ifdef QDOC_QML
- QmlClassNode::qmlOnly = config.getBool(CONFIG_QMLONLY);
+ QDeclarativeClassNode::qmlOnly = config.getBool(CONFIG_QMLONLY);
#endif
QStringMap reverseAliasMap;
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index a7ab453..8766696 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -301,7 +301,7 @@ bool Generator::generateQmlText(const Text& text,
startText(relative, marker);
while (atom) {
- if (atom->type() != Atom::QmlText)
+ if (atom->type() != Atom::QDeclarativeText)
atom = atom->next();
else {
atom = atom->next();
@@ -520,7 +520,7 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker)
#ifdef QDOC_QML
/*!
*/
-void Generator::generateQmlInherits(const QmlClassNode* , CodeMarker* )
+void Generator::generateQmlInherits(const QDeclarativeClassNode* , CodeMarker* )
{
// stub.
}
diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h
index 50ffb0a..8e8eed8 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -101,7 +101,7 @@ class Generator
const Node *relative,
CodeMarker *marker,
const QString& qmlName);
- virtual void generateQmlInherits(const QmlClassNode* cn,
+ virtual void generateQmlInherits(const QDeclarativeClassNode* cn,
CodeMarker* marker);
#endif
virtual void generateBody(const Node *node, CodeMarker *marker);
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index 2189e02..628fd0f 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -127,7 +127,7 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList
subTypeHash["page"] = Node::Page;
subTypeHash["externalpage"] = Node::ExternalPage;
#ifdef QDOC_QML
- subTypeHash["qmlclass"] = Node::QmlClass;
+ subTypeHash["qmlclass"] = Node::QDeclarativeClass;
#endif
QSet<Node::SubType> allSubTypes = QSet<Node::SubType>::fromList(subTypeHash.values());
@@ -188,8 +188,8 @@ QStringList HelpProjectWriter::keywordDetails(const Node *node) const
} else if (node->type() == Node::Fake) {
const FakeNode *fake = static_cast<const FakeNode *>(node);
#ifdef QDOC_QML
- if (fake->subType() == Node::QmlClass) {
- details << (QmlClassNode::qmlOnly ? fake->name() : fake->fullTitle());
+ if (fake->subType() == Node::QDeclarativeClass) {
+ details << (QDeclarativeClassNode::qmlOnly ? fake->name() : fake->fullTitle());
details << "QML." + fake->name();
} else
#endif
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 0477ebb..7db5828 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -701,8 +701,8 @@ int HtmlGenerator::generateAtom(const Atom *atom,
const Node* node = n.value();
switch (node->type()) {
case Node::Fake:
- if (node->subType() == Node::QmlClass)
- sections[QmlClass].appendMember((Node*)node);
+ if (node->subType() == Node::QDeclarativeClass)
+ sections[QDeclarativeClass].appendMember((Node*)node);
break;
case Node::Namespace:
sections[Namespace].appendMember((Node*)node);
@@ -745,14 +745,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Node::Variable:
sections[Variable].appendMember((Node*)node);
break;
- case Node::QmlProperty:
- sections[QmlProperty].appendMember((Node*)node);
+ case Node::QDeclarativeProperty:
+ sections[QDeclarativeProperty].appendMember((Node*)node);
break;
- case Node::QmlSignal:
- sections[QmlSignal].appendMember((Node*)node);
+ case Node::QDeclarativeSignal:
+ sections[QDeclarativeSignal].appendMember((Node*)node);
break;
- case Node::QmlMethod:
- sections[QmlMethod].appendMember((Node*)node);
+ case Node::QDeclarativeMethod:
+ sections[QDeclarativeMethod].appendMember((Node*)node);
break;
default:
break;
@@ -789,7 +789,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<h3>" << protectEnc((*s).name) << "</h3>\n";
if (idx == Class)
generateCompactList(0, marker, ncmap.value(), QString("Q"));
- else if (idx == QmlClass)
+ else if (idx == QDeclarativeClass)
generateCompactList(0, marker, nqcmap.value(), QString("Q"));
else if (idx == MemberFunction) {
ParentMaps parentmaps;
@@ -1190,7 +1190,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< "</code></b></font>";
break;
#ifdef QDOC_QML
- case Atom::QmlText:
+ case Atom::QDeclarativeText:
case Atom::EndQmlText:
// don't do anything with these. They are just tags.
break;
@@ -1453,7 +1453,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
subTitleSize = SmallSubTitle;
htmlTitle += " (" + fake->subTitle() + ")";
}
- else if (fake->subType() == Node::QmlBasicType) {
+ else if (fake->subType() == Node::QDeclarativeBasicType) {
fullTitle = "QML Basic Type: " + fullTitle;
htmlTitle = fullTitle;
}
@@ -1527,8 +1527,8 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
}
}
#ifdef QDOC_QML
- else if (fake->subType() == Node::QmlClass) {
- const QmlClassNode* qml_cn = static_cast<const QmlClassNode*>(fake);
+ else if (fake->subType() == Node::QDeclarativeClass) {
+ const QDeclarativeClassNode* qml_cn = static_cast<const QDeclarativeClassNode*>(fake);
const ClassNode* cn = qml_cn->classNode();
generateQmlInherits(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
@@ -2342,7 +2342,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
<< linkForNode(it.value(), relative)
<< "\">";
QStringList pieces;
- if (it.value()->subType() == Node::QmlClass)
+ if (it.value()->subType() == Node::QDeclarativeClass)
pieces << it.value()->name();
else
pieces = fullName(it.value(), relative, marker).split("::");
@@ -3507,18 +3507,18 @@ QString HtmlGenerator::refForNode(const Node *node)
break;
#ifdef QDOC_QML
case Node::Fake:
- if (node->subType() != Node::QmlPropertyGroup)
+ if (node->subType() != Node::QDeclarativePropertyGroup)
break;
- case Node::QmlProperty:
+ case Node::QDeclarativeProperty:
#endif
case Node::Property:
ref = node->name() + "-prop";
break;
#ifdef QDOC_QML
- case Node::QmlSignal:
+ case Node::QDeclarativeSignal:
ref = node->name() + "-signal";
break;
- case Node::QmlMethod:
+ case Node::QDeclarativeMethod:
ref = node->name() + "-method";
break;
#endif
@@ -3555,7 +3555,7 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative)
#endif
link += fn;
- if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) {
+ if (!node->isInnerNode() || node->subType() == Node::QDeclarativePropertyGroup) {
ref = refForNode(node);
if (relative && fn == fileName(relative) && ref == refForNode(relative))
return QString();
@@ -3758,7 +3758,7 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
nsmap.value().insert(className,(*child));
ncmap.value().insert(className,(*child));
}
- else if ((*child)->subType() == Node::QmlClass) {
+ else if ((*child)->subType() == Node::QDeclarativeClass) {
QString className = (*child)->name();
if ((*child)->parent() &&
(*child)->parent()->type() == Node::Namespace &&
@@ -3865,9 +3865,9 @@ void HtmlGenerator::findAllQmlClasses(const InnerNode *node)
while (c != node->childNodes().constEnd()) {
if ((*c)->type() == Node::Fake) {
const FakeNode* fakeNode = static_cast<const FakeNode *>(*c);
- if (fakeNode->subType() == Node::QmlClass) {
- const QmlClassNode* qmlNode =
- static_cast<const QmlClassNode*>(fakeNode);
+ if (fakeNode->subType() == Node::QDeclarativeClass) {
+ const QDeclarativeClassNode* qmlNode =
+ static_cast<const QDeclarativeClassNode*>(fakeNode);
const Node* n = qmlNode->classNode();
}
qmlClasses.insert(fakeNode->name(),*c);
@@ -4203,7 +4203,7 @@ void HtmlGenerator::generateQmlSummary(const Section& section,
NodeList::ConstIterator m;
int count = section.members.size();
bool twoColumn = false;
- if (section.members.first()->type() == Node::QmlProperty) {
+ if (section.members.first()->type() == Node::QDeclarativeProperty) {
twoColumn = (count >= 5);
}
if (twoColumn)
@@ -4237,18 +4237,18 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
const InnerNode *relative,
CodeMarker *marker)
{
- const QmlPropertyNode* qpn = 0;
+ const QDeclarativePropertyNode* qpn = 0;
generateMacRef(node, marker);
out() << "<div class=\"qmlitem\">";
- if (node->subType() == Node::QmlPropertyGroup) {
- const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node);
+ if (node->subType() == Node::QDeclarativePropertyGroup) {
+ const QDeclarativePropGroupNode* qpgn = static_cast<const QDeclarativePropGroupNode*>(node);
NodeList::ConstIterator p = qpgn->childNodes().begin();
out() << "<div class=\"qmlproto\">";
out() << "<table width=\"100%\" class=\"qmlname\">";
while (p != qpgn->childNodes().end()) {
- if ((*p)->type() == Node::QmlProperty) {
- qpn = static_cast<const QmlPropertyNode*>(*p);
+ if ((*p)->type() == Node::QDeclarativeProperty) {
+ qpn = static_cast<const QDeclarativePropertyNode*>(*p);
out() << "<tr><td>";
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
if (!qpn->isWritable())
@@ -4270,7 +4270,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "</table>";
out() << "</div>";
}
- else if (node->type() == Node::QmlSignal) {
+ else if (node->type() == Node::QDeclarativeSignal) {
const FunctionNode* qsn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
@@ -4282,7 +4282,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "</table>";
out() << "</div>";
}
- else if (node->type() == Node::QmlMethod) {
+ else if (node->type() == Node::QDeclarativeMethod) {
const FunctionNode* qmn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
@@ -4307,7 +4307,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
Output the "Inherits" line for the QML element,
if there should be one.
*/
-void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
+void HtmlGenerator::generateQmlInherits(const QDeclarativeClassNode* cn,
CodeMarker* marker)
{
if (cn && !cn->links().empty()) {
@@ -4316,8 +4316,8 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
linkPair = cn->links()[Node::InheritsLink];
QStringList strList(linkPair.first);
const Node* n = myTree->findNode(strList,Node::Fake);
- if (n && n->subType() == Node::QmlClass) {
- const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
+ if (n && n->subType() == Node::QDeclarativeClass) {
+ const QDeclarativeClassNode* qcn = static_cast<const QDeclarativeClassNode*>(n);
out() << "<p style=\"text-align: center\">";
Text text;
text << "[Inherits ";
@@ -4337,12 +4337,12 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
Output the "Inherit by" list for the QML element,
if it is inherited by any other elements.
*/
-void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn,
+void HtmlGenerator::generateQmlInheritedBy(const QDeclarativeClassNode* cn,
CodeMarker* marker)
{
if (cn) {
NodeList subs;
- QmlClassNode::subclasses(cn->name(),subs);
+ QDeclarativeClassNode::subclasses(cn->name(),subs);
if (!subs.isEmpty()) {
Text text;
text << Atom::ParaLeft << "Inherited by ";
@@ -4354,13 +4354,13 @@ void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn,
}
/*!
- Output the "[Xxx instantiates the C++ class QmlGraphicsXxx]"
+ Output the "[Xxx instantiates the C++ class QDeclarativeXxx]"
line for the QML element, if there should be one.
If there is no class node, or if the class node status
is set to Node::Internal, do nothing.
*/
-void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
+void HtmlGenerator::generateQmlInstantiates(const QDeclarativeClassNode* qcn,
CodeMarker* marker)
{
const ClassNode* cn = qcn->classNode();
@@ -4384,7 +4384,7 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
}
/*!
- Output the "[QmlGraphicsXxx is instantiated by QML element Xxx]"
+ Output the "[QDeclarativeXxx is instantiated by QML element Xxx]"
line for the class, if there should be one.
If there is no QML element, or if the class node status
@@ -4395,7 +4395,7 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
{
if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) {
const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake);
- if (n && n->subType() == Node::QmlClass) {
+ if (n && n->subType() == Node::QDeclarativeClass) {
out() << "<p style=\"text-align: center\">";
Text text;
text << "[";
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 8fe0331..42c94cd 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -90,10 +90,10 @@ class HtmlGenerator : public PageGenerator
Typedef,
Property,
Variable,
- QmlClass,
- QmlProperty,
- QmlSignal,
- QmlMethod,
+ QDeclarativeClass,
+ QDeclarativeProperty,
+ QDeclarativeSignal,
+ QDeclarativeMethod,
LastSinceType
};
@@ -185,9 +185,9 @@ class HtmlGenerator : public PageGenerator
void generateDetailedQmlMember(const Node *node,
const InnerNode *relative,
CodeMarker *marker);
- void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker);
- void generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker);
- void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker);
+ void generateQmlInherits(const QDeclarativeClassNode* cn, CodeMarker* marker);
+ void generateQmlInheritedBy(const QDeclarativeClassNode* cn, CodeMarker* marker);
+ void generateQmlInstantiates(const QDeclarativeClassNode* qcn, CodeMarker* marker);
void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker);
#endif
#ifdef QDOC_NAME_ALIGNMENT
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 5357597..0ceda39 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -580,7 +580,7 @@ bool InnerNode::isSameSignature(const FunctionNode *f1, const FunctionNode *f2)
void InnerNode::addChild(Node *child)
{
children.append(child);
- if ((child->type() == Function) || (child->type() == QmlMethod)) {
+ if ((child->type() == Function) || (child->type() == QDeclarativeMethod)) {
FunctionNode *func = (FunctionNode *) child;
if (!primaryFunctionMap.contains(func->name())) {
primaryFunctionMap.insert(func->name(), func);
@@ -806,8 +806,8 @@ FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subtype)
case Group:
setPageType(ArticlePage);
break;
- case QmlClass:
- case QmlBasicType:
+ case QDeclarativeClass:
+ case QDeclarativeBasicType:
setPageType(ApiPage);
break;
case Example:
@@ -1256,20 +1256,20 @@ bool TargetNode::isInnerNode() const
}
#ifdef QDOC_QML
-bool QmlClassNode::qmlOnly = false;
-QMultiMap<QString,Node*> QmlClassNode::inheritedBy;
+bool QDeclarativeClassNode::qmlOnly = false;
+QMultiMap<QString,Node*> QDeclarativeClassNode::inheritedBy;
/*!
Constructs a Qml class node (i.e. a Fake node with the
- subtype QmlClass. The new node has the given \a parent
+ subtype QDeclarativeClass. The new node has the given \a parent
and \a name and is associated with the C++ class node
specified by \a cn which may be null if the the Qml
class node is not associated with a C++ class node.
*/
-QmlClassNode::QmlClassNode(InnerNode *parent,
+QDeclarativeClassNode::QDeclarativeClassNode(InnerNode *parent,
const QString& name,
const ClassNode* cn)
- : FakeNode(parent, name, QmlClass), cnode(cn)
+ : FakeNode(parent, name, QDeclarativeClass), cnode(cn)
{
setTitle((qmlOnly ? "" : "QML ") + name + " Element Reference");
}
@@ -1280,7 +1280,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent,
But not yet. Still testing.
*/
-QString QmlClassNode::fileBase() const
+QString QDeclarativeClassNode::fileBase() const
{
#if 0
if (Node::fileBase() == "item")
@@ -1294,7 +1294,7 @@ QString QmlClassNode::fileBase() const
Record the fact that QML class \a base is inherited by
QML class \a sub.
*/
-void QmlClassNode::addInheritedBy(const QString& base, Node* sub)
+void QDeclarativeClassNode::addInheritedBy(const QString& base, Node* sub)
{
inheritedBy.insert(base,sub);
}
@@ -1302,7 +1302,7 @@ void QmlClassNode::addInheritedBy(const QString& base, Node* sub)
/*!
Loads the list \a subs with the nodes of all the subclasses of \a base.
*/
-void QmlClassNode::subclasses(const QString& base, NodeList& subs)
+void QDeclarativeClassNode::subclasses(const QString& base, NodeList& subs)
{
subs.clear();
if (inheritedBy.contains(base))
@@ -1311,24 +1311,24 @@ void QmlClassNode::subclasses(const QString& base, NodeList& subs)
/*!
Constructs a Qml basic type node (i.e. a Fake node with
- the subtype QmlBasicType. The new node has the given
+ the subtype QDeclarativeBasicType. The new node has the given
\a parent and \a name.
*/
-QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent,
+QDeclarativeBasicTypeNode::QDeclarativeBasicTypeNode(InnerNode *parent,
const QString& name)
- : FakeNode(parent, name, QmlBasicType)
+ : FakeNode(parent, name, QDeclarativeBasicType)
{
setTitle(name);
}
/*!
Constructor for the Qml property group node. \a parent is
- always a QmlClassNode.
+ always a QDeclarativeClassNode.
*/
-QmlPropGroupNode::QmlPropGroupNode(QmlClassNode* parent,
+QDeclarativePropGroupNode::QDeclarativePropGroupNode(QDeclarativeClassNode* parent,
const QString& name,
bool attached)
- : FakeNode(parent, name, QmlPropertyGroup),
+ : FakeNode(parent, name, QDeclarativePropertyGroup),
isdefault(false),
att(attached)
{
@@ -1338,11 +1338,11 @@ QmlPropGroupNode::QmlPropGroupNode(QmlClassNode* parent,
/*!
Constructor for the QML property node.
*/
-QmlPropertyNode::QmlPropertyNode(QmlPropGroupNode *parent,
+QDeclarativePropertyNode::QDeclarativePropertyNode(QDeclarativePropGroupNode *parent,
const QString& name,
const QString& type,
bool attached)
- : LeafNode(QmlProperty, parent, name),
+ : LeafNode(QDeclarativeProperty, parent, name),
dt(type),
sto(Trool_Default),
des(Trool_Default),
@@ -1354,7 +1354,7 @@ QmlPropertyNode::QmlPropertyNode(QmlPropGroupNode *parent,
/*!
I don't know what this is.
*/
-QmlPropertyNode::Trool QmlPropertyNode::toTrool(bool boolean)
+QDeclarativePropertyNode::Trool QDeclarativePropertyNode::toTrool(bool boolean)
{
return boolean ? Trool_True : Trool_False;
}
@@ -1362,7 +1362,7 @@ QmlPropertyNode::Trool QmlPropertyNode::toTrool(bool boolean)
/*!
I don't know what this is either.
*/
-bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue)
+bool QDeclarativePropertyNode::fromTrool(Trool troolean, bool defaultValue)
{
switch (troolean) {
case Trool_True:
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 3798e4e..5300efc 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -74,9 +74,9 @@ class Node
Variable,
#ifdef QDOC_QML
Target,
- QmlProperty,
- QmlSignal,
- QmlMethod,
+ QDeclarativeProperty,
+ QDeclarativeSignal,
+ QDeclarativeMethod,
LastType
#else
Target,
@@ -95,9 +95,9 @@ class Node
Page,
#ifdef QDOC_QML
ExternalPage,
- QmlClass,
- QmlPropertyGroup,
- QmlBasicType
+ QDeclarativeClass,
+ QDeclarativePropertyGroup,
+ QDeclarativeBasicType
#else
ExternalPage
#endif
@@ -373,13 +373,13 @@ class FakeNode : public InnerNode
};
#ifdef QDOC_QML
-class QmlClassNode : public FakeNode
+class QDeclarativeClassNode : public FakeNode
{
public:
- QmlClassNode(InnerNode *parent,
+ QDeclarativeClassNode(InnerNode *parent,
const QString& name,
const ClassNode* cn);
- virtual ~QmlClassNode() { }
+ virtual ~QDeclarativeClassNode() { }
const ClassNode* classNode() const { return cnode; }
virtual QString fileBase() const;
@@ -394,21 +394,21 @@ class QmlClassNode : public FakeNode
const ClassNode* cnode;
};
-class QmlBasicTypeNode : public FakeNode
+class QDeclarativeBasicTypeNode : public FakeNode
{
public:
- QmlBasicTypeNode(InnerNode *parent,
+ QDeclarativeBasicTypeNode(InnerNode *parent,
const QString& name);
- virtual ~QmlBasicTypeNode() { }
+ virtual ~QDeclarativeBasicTypeNode() { }
};
-class QmlPropGroupNode : public FakeNode
+class QDeclarativePropGroupNode : public FakeNode
{
public:
- QmlPropGroupNode(QmlClassNode* parent,
+ QDeclarativePropGroupNode(QDeclarativeClassNode* parent,
const QString& name,
bool attached);
- virtual ~QmlPropGroupNode() { }
+ virtual ~QDeclarativePropGroupNode() { }
const QString& element() const { return parent()->name(); }
void setDefault() { isdefault = true; }
@@ -420,14 +420,14 @@ class QmlPropGroupNode : public FakeNode
bool att;
};
-class QmlPropertyNode : public LeafNode
+class QDeclarativePropertyNode : public LeafNode
{
public:
- QmlPropertyNode(QmlPropGroupNode* parent,
+ QDeclarativePropertyNode(QDeclarativePropGroupNode* parent,
const QString& name,
const QString& type,
bool attached);
- virtual ~QmlPropertyNode() { }
+ virtual ~QDeclarativePropertyNode() { }
void setDataType(const QString& dataType) { dt = dataType; }
void setStored(bool stored) { sto = toTrool(stored); }
@@ -441,7 +441,7 @@ class QmlPropertyNode : public LeafNode
bool isWritable() const { return fromTrool(wri,true); }
bool isAttached() const { return att; }
- const QString& element() const { return static_cast<QmlPropGroupNode*>(parent())->element(); }
+ const QString& element() const { return static_cast<QDeclarativePropGroupNode*>(parent())->element(); }
private:
enum Trool { Trool_True, Trool_False, Trool_Default };
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index 2cad9ed..f129d3a 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -84,7 +84,7 @@ QString PageGenerator::fileBase(const Node *node) const
else if (!node->isInnerNode())
node = node->parent();
#ifdef QDOC_QML
- if (node->subType() == Node::QmlPropertyGroup) {
+ if (node->subType() == Node::QDeclarativePropertyGroup) {
node = node->parent();
}
#endif
@@ -104,8 +104,8 @@ QString PageGenerator::fileBase(const Node *node) const
we prepend "qml-" to the file name of QML element doc
files.
*/
- if ((p->subType() == Node::QmlClass) ||
- (p->subType() == Node::QmlBasicType)) {
+ if ((p->subType() == Node::QDeclarativeClass) ||
+ (p->subType() == Node::QDeclarativeBasicType)) {
base.prepend("qml-");
}
#endif
@@ -207,7 +207,7 @@ void PageGenerator::generateInnerNode(const InnerNode *node,
if (fakeNode->subType() == Node::ExternalPage)
return;
#ifdef QDOC_QML
- if (fakeNode->subType() == Node::QmlPropertyGroup)
+ if (fakeNode->subType() == Node::QDeclarativePropertyGroup)
return;
#endif
if (fakeNode->subType() == Node::Page) {
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 6c2502d..96af8d6 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -1914,8 +1914,8 @@ QString Tree::fullDocumentLocation(const Node *node) const
}
else if (node->type() == Node::Fake) {
#ifdef QDOC_QML
- if ((node->subType() == Node::QmlClass) ||
- (node->subType() == Node::QmlBasicType))
+ if ((node->subType() == Node::QDeclarativeClass) ||
+ (node->subType() == Node::QDeclarativeBasicType))
return "qml-" + node->fileBase() + ".html";
else
#endif
diff --git a/tools/qmlviewer/content/Browser.qml b/tools/qml/content/Browser.qml
index 35120bc..35120bc 100644
--- a/tools/qmlviewer/content/Browser.qml
+++ b/tools/qml/content/Browser.qml
diff --git a/tools/qmlviewer/content/images/folder.png b/tools/qml/content/images/folder.png
index e53e2ad..e53e2ad 100644
--- a/tools/qmlviewer/content/images/folder.png
+++ b/tools/qml/content/images/folder.png
Binary files differ
diff --git a/tools/qmlviewer/content/images/titlebar.png b/tools/qml/content/images/titlebar.png
index 51c9008..51c9008 100644
--- a/tools/qmlviewer/content/images/titlebar.png
+++ b/tools/qml/content/images/titlebar.png
Binary files differ
diff --git a/tools/qmlviewer/content/images/titlebar.sci b/tools/qml/content/images/titlebar.sci
index 0418d94..0418d94 100644
--- a/tools/qmlviewer/content/images/titlebar.sci
+++ b/tools/qml/content/images/titlebar.sci
diff --git a/tools/qmlviewer/content/images/up.png b/tools/qml/content/images/up.png
index b05f802..b05f802 100644
--- a/tools/qmlviewer/content/images/up.png
+++ b/tools/qml/content/images/up.png
Binary files differ
diff --git a/tools/qmlviewer/deviceorientation.cpp b/tools/qml/deviceorientation.cpp
index e7c70d5..e7c70d5 100644
--- a/tools/qmlviewer/deviceorientation.cpp
+++ b/tools/qml/deviceorientation.cpp
diff --git a/tools/qmlviewer/deviceorientation.h b/tools/qml/deviceorientation.h
index c8125cd..c8125cd 100644
--- a/tools/qmlviewer/deviceorientation.h
+++ b/tools/qml/deviceorientation.h
diff --git a/tools/qmlviewer/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp
index fa2c6e5..fa2c6e5 100644
--- a/tools/qmlviewer/deviceorientation_maemo.cpp
+++ b/tools/qml/deviceorientation_maemo.cpp
diff --git a/tools/qmlviewer/main.cpp b/tools/qml/main.cpp
index 0f51da2..9ef02ac 100644
--- a/tools/qmlviewer/main.cpp
+++ b/tools/qml/main.cpp
@@ -39,15 +39,15 @@
**
****************************************************************************/
-#include "qml.h"
-#include "qmlviewer.h"
+#include "qdeclarative.h"
+#include "qmlruntime.h"
#include <QWidget>
#include <QDir>
#include <QApplication>
#include <QTranslator>
#include <QDebug>
#include "qfxtester.h"
-#include "qmlfolderlistmodel.h"
+#include "qdeclarativefolderlistmodel.h"
QT_USE_NAMESPACE
@@ -61,7 +61,7 @@ void myMessageOutput(QtMsgType type, const char *msg)
{
static int fd = -1;
if (fd == -1)
- fd = ::open("E:\\qmlviewer.log", O_WRONLY | O_CREAT);
+ fd = ::open("E:\\qml.log", O_WRONLY | O_CREAT);
::write(fd, msg, strlen(msg));
::write(fd, "\n", 1);
@@ -76,7 +76,7 @@ void myMessageOutput(QtMsgType type, const char *msg)
void usage()
{
- qWarning("Usage: qmlviewer [options] <filename>");
+ qWarning("Usage: qml [options] <filename>");
qWarning(" ");
qWarning(" options:");
qWarning(" -v, -version ............................. display version");
@@ -112,7 +112,7 @@ void usage()
void scriptOptsUsage()
{
- qWarning("Usage: qmlviewer -scriptopts <option>[,<option>...] ...");
+ qWarning("Usage: qml -scriptopts <option>[,<option>...] ...");
qWarning(" options:");
qWarning(" record ................................... record a new script");
qWarning(" play ..................................... playback an existing script");
@@ -152,9 +152,9 @@ int main(int argc, char ** argv)
app.setOrganizationName("Nokia");
app.setOrganizationDomain("nokia.com");
- QmlViewer::registerTypes();
- QmlGraphicsTester::registerTypes();
- QmlFolderListModel::registerTypes();
+ QDeclarativeViewer::registerTypes();
+ QDeclarativeTester::registerTypes();
+ QDeclarativeFolderListModel::registerTypes();
bool frameless = false;
bool resizeview = false;
@@ -271,30 +271,30 @@ int main(int argc, char ** argv)
if (stayOnTop)
wflags |= Qt::WindowStaysOnTopHint;
- QmlViewer viewer(0, wflags);
+ QDeclarativeViewer viewer(0, wflags);
if (!scriptopts.isEmpty()) {
QStringList options =
scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
- QmlViewer::ScriptOptions scriptOptions = 0;
+ QDeclarativeViewer::ScriptOptions scriptOptions = 0;
for (int i = 0; i < options.count(); ++i) {
const QString &option = options.at(i);
if (option == QLatin1String("help")) {
scriptOptsUsage();
} else if (option == QLatin1String("play")) {
- scriptOptions |= QmlViewer::Play;
+ scriptOptions |= QDeclarativeViewer::Play;
} else if (option == QLatin1String("record")) {
- scriptOptions |= QmlViewer::Record;
+ scriptOptions |= QDeclarativeViewer::Record;
} else if (option == QLatin1String("testimages")) {
- scriptOptions |= QmlViewer::TestImages;
+ scriptOptions |= QDeclarativeViewer::TestImages;
} else if (option == QLatin1String("testerror")) {
- scriptOptions |= QmlViewer::TestErrorProperty;
+ scriptOptions |= QDeclarativeViewer::TestErrorProperty;
} else if (option == QLatin1String("exitoncomplete")) {
- scriptOptions |= QmlViewer::ExitOnComplete;
+ scriptOptions |= QDeclarativeViewer::ExitOnComplete;
} else if (option == QLatin1String("exitonfailure")) {
- scriptOptions |= QmlViewer::ExitOnFailure;
+ scriptOptions |= QDeclarativeViewer::ExitOnFailure;
} else if (option == QLatin1String("saveonexit")) {
- scriptOptions |= QmlViewer::SaveOnExit;
+ scriptOptions |= QDeclarativeViewer::SaveOnExit;
} else {
scriptOptsUsage();
}
@@ -303,7 +303,7 @@ int main(int argc, char ** argv)
if (script.isEmpty())
usage();
- if (!(scriptOptions & QmlViewer::Record) && !(scriptOptions & QmlViewer::Play))
+ if (!(scriptOptions & QDeclarativeViewer::Record) && !(scriptOptions & QDeclarativeViewer::Play))
scriptOptsUsage();
viewer.setScriptOptions(scriptOptions);
viewer.setScript(script);
diff --git a/tools/qmlviewer/proxysettings.cpp b/tools/qml/proxysettings.cpp
index 3255e42..3255e42 100644
--- a/tools/qmlviewer/proxysettings.cpp
+++ b/tools/qml/proxysettings.cpp
diff --git a/tools/qmlviewer/proxysettings.h b/tools/qml/proxysettings.h
index 325929a..325929a 100644
--- a/tools/qmlviewer/proxysettings.h
+++ b/tools/qml/proxysettings.h
diff --git a/tools/qmlviewer/proxysettings.ui b/tools/qml/proxysettings.ui
index 84e39fe..84e39fe 100644
--- a/tools/qmlviewer/proxysettings.ui
+++ b/tools/qml/proxysettings.ui
diff --git a/tools/qmlviewer/qmlfolderlistmodel.cpp b/tools/qml/qdeclarativefolderlistmodel.cpp
index aec7756..58bf59b 100644
--- a/tools/qmlviewer/qmlfolderlistmodel.cpp
+++ b/tools/qml/qdeclarativefolderlistmodel.cpp
@@ -39,37 +39,37 @@
**
****************************************************************************/
-#include "qmlfolderlistmodel.h"
+#include "qdeclarativefolderlistmodel.h"
#include <QDirModel>
#include <QDebug>
-#include <qmlcontext.h>
+#include <qdeclarativecontext.h>
QT_BEGIN_NAMESPACE
-class QmlFolderListModelPrivate
+class QDeclarativeFolderListModelPrivate
{
public:
- QmlFolderListModelPrivate()
- : sortField(QmlFolderListModel::Name), sortReversed(false), count(0) {
+ QDeclarativeFolderListModelPrivate()
+ : sortField(QDeclarativeFolderListModel::Name), sortReversed(false), count(0) {
nameFilters << QLatin1String("*");
}
void updateSorting() {
QDir::SortFlags flags = 0;
switch(sortField) {
- case QmlFolderListModel::Unsorted:
+ case QDeclarativeFolderListModel::Unsorted:
flags |= QDir::Unsorted;
break;
- case QmlFolderListModel::Name:
+ case QDeclarativeFolderListModel::Name:
flags |= QDir::Name;
break;
- case QmlFolderListModel::Time:
+ case QDeclarativeFolderListModel::Time:
flags |= QDir::Time;
break;
- case QmlFolderListModel::Size:
+ case QDeclarativeFolderListModel::Size:
flags |= QDir::Size;
break;
- case QmlFolderListModel::Type:
+ case QDeclarativeFolderListModel::Type:
flags |= QDir::Type;
break;
}
@@ -84,7 +84,7 @@ public:
QUrl folder;
QStringList nameFilters;
QModelIndex folderIndex;
- QmlFolderListModel::SortField sortField;
+ QDeclarativeFolderListModel::SortField sortField;
bool sortReversed;
int count;
};
@@ -111,10 +111,10 @@ public:
via the \l isFolder() method.
*/
-QmlFolderListModel::QmlFolderListModel(QObject *parent)
+QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent)
: QListModelInterface(parent)
{
- d = new QmlFolderListModelPrivate;
+ d = new QDeclarativeFolderListModelPrivate;
d->model.setFilter(QDir::AllDirs | QDir::Files | QDir::Drives | QDir::NoDotAndDotDot);
connect(&d->model, SIGNAL(rowsInserted(const QModelIndex&,int,int))
, this, SLOT(inserted(const QModelIndex&,int,int)));
@@ -126,12 +126,12 @@ QmlFolderListModel::QmlFolderListModel(QObject *parent)
connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh()));
}
-QmlFolderListModel::~QmlFolderListModel()
+QDeclarativeFolderListModel::~QDeclarativeFolderListModel()
{
delete d;
}
-QHash<int,QVariant> QmlFolderListModel::data(int index, const QList<int> &roles) const
+QHash<int,QVariant> QDeclarativeFolderListModel::data(int index, const QList<int> &roles) const
{
Q_UNUSED(roles);
QHash<int,QVariant> folderData;
@@ -144,7 +144,7 @@ QHash<int,QVariant> QmlFolderListModel::data(int index, const QList<int> &roles)
return folderData;
}
-QVariant QmlFolderListModel::data(int index, int role) const
+QVariant QDeclarativeFolderListModel::data(int index, int role) const
{
QVariant rv;
QModelIndex modelIndex = d->model.index(index, 0, d->folderIndex);
@@ -158,12 +158,12 @@ QVariant QmlFolderListModel::data(int index, int role) const
return rv;
}
-int QmlFolderListModel::count() const
+int QDeclarativeFolderListModel::count() const
{
return d->count;
}
-QList<int> QmlFolderListModel::roles() const
+QList<int> QDeclarativeFolderListModel::roles() const
{
QList<int> r;
r << QDirModel::FileNameRole;
@@ -171,7 +171,7 @@ QList<int> QmlFolderListModel::roles() const
return r;
}
-QString QmlFolderListModel::toString(int role) const
+QString QDeclarativeFolderListModel::toString(int role) const
{
switch (role) {
case QDirModel::FileNameRole:
@@ -190,12 +190,12 @@ QString QmlFolderListModel::toString(int role) const
It is a URL, but must be a file: or qrc: URL (or relative to such a URL).
*/
-QUrl QmlFolderListModel::folder() const
+QUrl QDeclarativeFolderListModel::folder() const
{
return d->folder;
}
-void QmlFolderListModel::setFolder(const QUrl &folder)
+void QDeclarativeFolderListModel::setFolder(const QUrl &folder)
{
if (folder == d->folder)
return;
@@ -207,7 +207,7 @@ void QmlFolderListModel::setFolder(const QUrl &folder)
}
}
-QUrl QmlFolderListModel::parentFolder() const
+QUrl QDeclarativeFolderListModel::parentFolder() const
{
QUrl r;
QString localFile = d->folder.toLocalFile();
@@ -245,18 +245,18 @@ QUrl QmlFolderListModel::parentFolder() const
}
\endcode
*/
-QStringList QmlFolderListModel::nameFilters() const
+QStringList QDeclarativeFolderListModel::nameFilters() const
{
return d->nameFilters;
}
-void QmlFolderListModel::setNameFilters(const QStringList &filters)
+void QDeclarativeFolderListModel::setNameFilters(const QStringList &filters)
{
d->nameFilters = filters;
d->model.setNameFilters(d->nameFilters);
}
-void QmlFolderListModel::componentComplete()
+void QDeclarativeFolderListModel::componentComplete()
{
if (!d->folder.isValid() || !QDir().exists(d->folder.toLocalFile()))
setFolder(QUrl(QLatin1String("file://")+QDir::currentPath()));
@@ -265,12 +265,12 @@ void QmlFolderListModel::componentComplete()
QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection);
}
-QmlFolderListModel::SortField QmlFolderListModel::sortField() const
+QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const
{
return d->sortField;
}
-void QmlFolderListModel::setSortField(SortField field)
+void QDeclarativeFolderListModel::setSortField(SortField field)
{
if (field != d->sortField) {
d->sortField = field;
@@ -278,12 +278,12 @@ void QmlFolderListModel::setSortField(SortField field)
}
}
-bool QmlFolderListModel::sortReversed() const
+bool QDeclarativeFolderListModel::sortReversed() const
{
return d->sortReversed;
}
-void QmlFolderListModel::setSortReversed(bool rev)
+void QDeclarativeFolderListModel::setSortReversed(bool rev)
{
if (rev != d->sortReversed) {
d->sortReversed = rev;
@@ -297,7 +297,7 @@ void QmlFolderListModel::setSortReversed(bool rev)
Returns true if the entry \a index is a folder; otherwise
returns false.
*/
-bool QmlFolderListModel::isFolder(int index) const
+bool QDeclarativeFolderListModel::isFolder(int index) const
{
if (index != -1) {
QModelIndex idx = d->model.index(index, 0, d->folderIndex);
@@ -307,7 +307,7 @@ bool QmlFolderListModel::isFolder(int index) const
return false;
}
-void QmlFolderListModel::refresh()
+void QDeclarativeFolderListModel::refresh()
{
d->folderIndex = QModelIndex();
if (d->count) {
@@ -322,7 +322,7 @@ void QmlFolderListModel::refresh()
}
}
-void QmlFolderListModel::inserted(const QModelIndex &index, int start, int end)
+void QDeclarativeFolderListModel::inserted(const QModelIndex &index, int start, int end)
{
if (index == d->folderIndex) {
d->count = d->model.rowCount(d->folderIndex);
@@ -330,7 +330,7 @@ void QmlFolderListModel::inserted(const QModelIndex &index, int start, int end)
}
}
-void QmlFolderListModel::removed(const QModelIndex &index, int start, int end)
+void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, int end)
{
if (index == d->folderIndex) {
d->count = d->model.rowCount(d->folderIndex);
@@ -338,7 +338,7 @@ void QmlFolderListModel::removed(const QModelIndex &index, int start, int end)
}
}
-void QmlFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end)
+void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end)
{
qDebug() << "data changed";
if (start.parent() == d->folderIndex)
@@ -352,12 +352,12 @@ void QmlFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex
Note that the nameFilters are ignored for directories.
*/
-bool QmlFolderListModel::showDirs() const
+bool QDeclarativeFolderListModel::showDirs() const
{
return d->model.filter() & QDir::AllDirs;
}
-void QmlFolderListModel::setShowDirs(bool on)
+void QDeclarativeFolderListModel::setShowDirs(bool on)
{
if (!(d->model.filter() & QDir::AllDirs) == !on)
return;
@@ -374,12 +374,12 @@ void QmlFolderListModel::setShowDirs(bool on)
The default is false.
*/
-bool QmlFolderListModel::showDotAndDotDot() const
+bool QDeclarativeFolderListModel::showDotAndDotDot() const
{
return !(d->model.filter() & QDir::NoDotAndDotDot);
}
-void QmlFolderListModel::setShowDotAndDotDot(bool on)
+void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on)
{
if (!(d->model.filter() & QDir::NoDotAndDotDot) == on)
return;
@@ -396,12 +396,12 @@ void QmlFolderListModel::setShowDotAndDotDot(bool on)
The default is false.
*/
-bool QmlFolderListModel::showOnlyReadable() const
+bool QDeclarativeFolderListModel::showOnlyReadable() const
{
return d->model.filter() & QDir::Readable;
}
-void QmlFolderListModel::setShowOnlyReadable(bool on)
+void QDeclarativeFolderListModel::setShowOnlyReadable(bool on)
{
if (!(d->model.filter() & QDir::Readable) == !on)
return;
@@ -411,9 +411,9 @@ void QmlFolderListModel::setShowOnlyReadable(bool on)
d->model.setFilter(d->model.filter() & ~QDir::Readable);
}
-void QmlFolderListModel::registerTypes()
+void QDeclarativeFolderListModel::registerTypes()
{
- QML_REGISTER_TYPE(Qt,4,6,FolderListModel,QmlFolderListModel);
+ QML_REGISTER_TYPE(Qt,4,6,FolderListModel,QDeclarativeFolderListModel);
}
QT_END_NAMESPACE
diff --git a/tools/qmlviewer/qmlfolderlistmodel.h b/tools/qml/qdeclarativefolderlistmodel.h
index 1a1c299..c16b44c 100644
--- a/tools/qmlviewer/qmlfolderlistmodel.h
+++ b/tools/qml/qdeclarativefolderlistmodel.h
@@ -39,22 +39,22 @@
**
****************************************************************************/
-#ifndef QMLFOLDERLISTMODEL_H
-#define QMLFOLDERLISTMODEL_H
+#ifndef QDECLARATIVEFOLDERLISTMODEL_H
+#define QDECLARATIVEFOLDERLISTMODEL_H
-#include <qml.h>
+#include <qdeclarative.h>
#include "../../src/declarative/3rdparty/qlistmodelinterface_p.h"
QT_BEGIN_NAMESPACE
-class QmlContext;
+class QDeclarativeContext;
class QModelIndex;
-class QmlFolderListModelPrivate;
-class QmlFolderListModel : public QListModelInterface, public QmlParserStatus
+class QDeclarativeFolderListModelPrivate;
+class QDeclarativeFolderListModel : public QListModelInterface, public QDeclarativeParserStatus
{
Q_OBJECT
- Q_INTERFACES(QmlParserStatus)
+ Q_INTERFACES(QDeclarativeParserStatus)
Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged)
Q_PROPERTY(QUrl parentFolder READ parentFolder NOTIFY folderChanged)
@@ -66,8 +66,8 @@ class QmlFolderListModel : public QListModelInterface, public QmlParserStatus
Q_PROPERTY(bool showOnlyReadable READ showOnlyReadable WRITE setShowOnlyReadable)
public:
- QmlFolderListModel(QObject *parent = 0);
- ~QmlFolderListModel();
+ QDeclarativeFolderListModel(QObject *parent = 0);
+ ~QDeclarativeFolderListModel();
static void registerTypes();
@@ -114,12 +114,12 @@ private Q_SLOTS:
void dataChanged(const QModelIndex &start, const QModelIndex &end);
private:
- Q_DISABLE_COPY(QmlFolderListModel)
- QmlFolderListModelPrivate *d;
+ Q_DISABLE_COPY(QDeclarativeFolderListModel)
+ QDeclarativeFolderListModelPrivate *d;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QmlFolderListModel)
+QML_DECLARE_TYPE(QDeclarativeFolderListModel)
-#endif // QMLFOLDERLISTMODEL_H
+#endif // QDECLARATIVEFOLDERLISTMODEL_H
diff --git a/tools/qmlviewer/qfxtester.cpp b/tools/qml/qfxtester.cpp
index b2e4054..7344f58 100644
--- a/tools/qmlviewer/qfxtester.cpp
+++ b/tools/qml/qfxtester.cpp
@@ -42,58 +42,58 @@
#include <qfxtester.h>
#include <QDebug>
#include <QApplication>
-#include <qmlview.h>
+#include <qdeclarativeview.h>
#include <QFile>
-#include <QmlComponent>
+#include <QDeclarativeComponent>
#include <QDir>
#include <QCryptographicHash>
#include <private/qabstractanimation_p.h>
-#include <private/qmlgraphicsitem_p.h>
+#include <private/qdeclarativeitem_p.h>
QT_BEGIN_NAMESPACE
-QmlGraphicsTester::QmlGraphicsTester(const QString &script, QmlViewer::ScriptOptions opts,
- QmlView *parent)
+QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions opts,
+ QDeclarativeView *parent)
: QAbstractAnimation(parent), m_script(script), m_view(parent), filterEvents(true), options(opts),
testscript(0), hasCompleted(false), hasFailed(false)
{
parent->viewport()->installEventFilter(this);
parent->installEventFilter(this);
QUnifiedTimer::instance()->setConsistentTiming(true);
- if (options & QmlViewer::Play)
+ if (options & QDeclarativeViewer::Play)
this->run();
start();
}
-QmlGraphicsTester::~QmlGraphicsTester()
+QDeclarativeTester::~QDeclarativeTester()
{
if (!hasFailed &&
- options & QmlViewer::Record &&
- options & QmlViewer::SaveOnExit)
+ options & QDeclarativeViewer::Record &&
+ options & QDeclarativeViewer::SaveOnExit)
save();
}
-int QmlGraphicsTester::duration() const
+int QDeclarativeTester::duration() const
{
return -1;
}
-void QmlGraphicsTester::addMouseEvent(Destination dest, QMouseEvent *me)
+void QDeclarativeTester::addMouseEvent(Destination dest, QMouseEvent *me)
{
MouseEvent e(me);
e.destination = dest;
m_mouseEvents << e;
}
-void QmlGraphicsTester::addKeyEvent(Destination dest, QKeyEvent *ke)
+void QDeclarativeTester::addKeyEvent(Destination dest, QKeyEvent *ke)
{
KeyEvent e(ke);
e.destination = dest;
m_keyEvents << e;
}
-bool QmlGraphicsTester::eventFilter(QObject *o, QEvent *e)
+bool QDeclarativeTester::eventFilter(QObject *o, QEvent *e)
{
if (!filterEvents)
return false;
@@ -124,53 +124,53 @@ bool QmlGraphicsTester::eventFilter(QObject *o, QEvent *e)
return false;
}
-void QmlGraphicsTester::executefailure()
+void QDeclarativeTester::executefailure()
{
hasFailed = true;
- if (options & QmlViewer::ExitOnFailure)
+ if (options & QDeclarativeViewer::ExitOnFailure)
exit(-1);
}
-void QmlGraphicsTester::imagefailure()
+void QDeclarativeTester::imagefailure()
{
hasFailed = true;
- if (options & QmlViewer::ExitOnFailure)
+ if (options & QDeclarativeViewer::ExitOnFailure)
exit(-1);
}
-void QmlGraphicsTester::complete()
+void QDeclarativeTester::complete()
{
- if ((options & QmlViewer::TestErrorProperty) && !hasFailed) {
+ if ((options & QDeclarativeViewer::TestErrorProperty) && !hasFailed) {
QString e = m_view->rootObject()->property("error").toString();
if (!e.isEmpty()) {
qWarning() << "Test failed:" << e;
hasFailed = true;
}
}
- if (options & QmlViewer::ExitOnComplete)
+ if (options & QDeclarativeViewer::ExitOnComplete)
QApplication::exit(hasFailed?-1:0);
if (hasCompleted)
return;
hasCompleted = true;
- if (options & QmlViewer::Play)
+ if (options & QDeclarativeViewer::Play)
qWarning("Script playback complete");
}
-void QmlGraphicsTester::run()
+void QDeclarativeTester::run()
{
- QmlComponent c(m_view->engine(), m_script + QLatin1String(".qml"));
+ QDeclarativeComponent c(m_view->engine(), m_script + QLatin1String(".qml"));
- testscript = qobject_cast<QmlGraphicsVisualTest *>(c.create());
+ testscript = qobject_cast<QDeclarativeVisualTest *>(c.create());
if (testscript) testscript->setParent(this);
else { executefailure(); exit(-1); }
testscriptidx = 0;
}
-void QmlGraphicsTester::save()
+void QDeclarativeTester::save()
{
QString filename = m_script + QLatin1String(".qml");
QFileInfo filenameInfo(filename);
@@ -237,13 +237,13 @@ void QmlGraphicsTester::save()
file.close();
}
-void QmlGraphicsTester::updateCurrentTime(int msec)
+void QDeclarativeTester::updateCurrentTime(int msec)
{
- QmlGraphicsItemPrivate::setConsistentTime(msec);
+ QDeclarativeItemPrivate::setConsistentTime(msec);
QImage img(m_view->width(), m_view->height(), QImage::Format_RGB32);
- if (options & QmlViewer::TestImages) {
+ if (options & QDeclarativeViewer::TestImages) {
img.fill(qRgb(255,255,255));
QPainter p(&img);
m_view->render(&p);
@@ -251,7 +251,7 @@ void QmlGraphicsTester::updateCurrentTime(int msec)
FrameEvent fe;
fe.msec = msec;
- if (msec == 0 || !(options & QmlViewer::TestImages)) {
+ if (msec == 0 || !(options & QDeclarativeViewer::TestImages)) {
// Skip first frame, skip if not doing images
} else if (0 == (m_savedFrameEvents.count() % 60)) {
fe.image = img;
@@ -302,17 +302,17 @@ void QmlGraphicsTester::updateCurrentTime(int msec)
QObject *event = testscript->event(testscriptidx);
- if (QmlGraphicsVisualTestFrame *frame = qobject_cast<QmlGraphicsVisualTestFrame *>(event)) {
+ if (QDeclarativeVisualTestFrame *frame = qobject_cast<QDeclarativeVisualTestFrame *>(event)) {
if (frame->msec() < msec) {
- if (options & QmlViewer::TestImages && !(options & QmlViewer::Record)) {
- qWarning() << "QmlGraphicsTester: Extra frame. Seen:"
+ if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) {
+ qWarning() << "QDeclarativeTester: Extra frame. Seen:"
<< msec << "Expected:" << frame->msec();
imagefailure();
}
} else if (frame->msec() == msec) {
if (!frame->hash().isEmpty() && frame->hash().toUtf8() != fe.hash.toHex()) {
- if (options & QmlViewer::TestImages && !(options & QmlViewer::Record)) {
- qWarning() << "QmlGraphicsTester: Mismatched frame hash. Seen:"
+ if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) {
+ qWarning() << "QDeclarativeTester: Mismatched frame hash. Seen:"
<< fe.hash.toHex() << "Expected:"
<< frame->hash().toUtf8();
imagefailure();
@@ -322,17 +322,17 @@ void QmlGraphicsTester::updateCurrentTime(int msec)
break;
}
- if (options & QmlViewer::TestImages && !(options & QmlViewer::Record) && !frame->image().isEmpty()) {
+ if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record) && !frame->image().isEmpty()) {
QImage goodImage(frame->image().toLocalFile());
if (goodImage != img) {
QString reject(frame->image().toLocalFile() + ".reject.png");
- qWarning() << "QmlGraphicsTester: Image mismatch. Reject saved to:"
+ qWarning() << "QDeclarativeTester: Image mismatch. Reject saved to:"
<< reject;
img.save(reject);
imagefailure();
}
}
- } else if (QmlGraphicsVisualTestMouse *mouse = qobject_cast<QmlGraphicsVisualTestMouse *>(event)) {
+ } else if (QDeclarativeVisualTestMouse *mouse = qobject_cast<QDeclarativeVisualTestMouse *>(event)) {
QPoint pos(mouse->x(), mouse->y());
QPoint globalPos = m_view->mapToGlobal(QPoint(0, 0)) + pos;
QMouseEvent event((QEvent::Type)mouse->type(), pos, globalPos, (Qt::MouseButton)mouse->button(), (Qt::MouseButtons)mouse->buttons(), (Qt::KeyboardModifiers)mouse->modifiers());
@@ -347,7 +347,7 @@ void QmlGraphicsTester::updateCurrentTime(int msec)
me.destination = ViewPort;
}
m_savedMouseEvents.append(me);
- } else if (QmlGraphicsVisualTestKey *key = qobject_cast<QmlGraphicsVisualTestKey *>(event)) {
+ } else if (QDeclarativeVisualTestKey *key = qobject_cast<QDeclarativeVisualTestKey *>(event)) {
QKeyEvent event((QEvent::Type)key->type(), key->key(), (Qt::KeyboardModifiers)key->modifiers(), QString::fromUtf8(QByteArray::fromHex(key->text().toUtf8())), key->autorep(), key->count());
@@ -371,12 +371,12 @@ void QmlGraphicsTester::updateCurrentTime(int msec)
complete();
}
-void QmlGraphicsTester::registerTypes()
+void QDeclarativeTester::registerTypes()
{
- QML_REGISTER_TYPE(Qt.VisualTest, 4,6, VisualTest, QmlGraphicsVisualTest);
- QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Frame, QmlGraphicsVisualTestFrame);
- QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Mouse, QmlGraphicsVisualTestMouse);
- QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Key, QmlGraphicsVisualTestKey);
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, VisualTest, QDeclarativeVisualTest);
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Frame, QDeclarativeVisualTestFrame);
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Mouse, QDeclarativeVisualTestMouse);
+ QML_REGISTER_TYPE(Qt.VisualTest, 4,6, Key, QDeclarativeVisualTestKey);
}
QT_END_NAMESPACE
diff --git a/tools/qmlviewer/qfxtester.h b/tools/qml/qfxtester.h
index bae807b..3b935d8 100644
--- a/tools/qmlviewer/qfxtester.h
+++ b/tools/qml/qfxtester.h
@@ -45,17 +45,17 @@
#include <QEvent>
#include <QMouseEvent>
#include <QKeyEvent>
-#include <qmlviewer.h>
+#include <qmlruntime.h>
QT_BEGIN_NAMESPACE
-class QmlGraphicsVisualTest : public QObject
+class QDeclarativeVisualTest : public QObject
{
Q_OBJECT
Q_PROPERTY(QList<QObject *>* events READ events CONSTANT)
Q_CLASSINFO("DefaultProperty", "events")
public:
- QmlGraphicsVisualTest() {}
+ QDeclarativeVisualTest() {}
QList<QObject *> *events() { return &m_events; }
@@ -68,18 +68,18 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QmlGraphicsVisualTest)
+QML_DECLARE_TYPE(QDeclarativeVisualTest)
QT_BEGIN_NAMESPACE
-class QmlGraphicsVisualTestFrame : public QObject
+class QDeclarativeVisualTestFrame : public QObject
{
Q_OBJECT
Q_PROPERTY(int msec READ msec WRITE setMsec)
Q_PROPERTY(QString hash READ hash WRITE setHash)
Q_PROPERTY(QUrl image READ image WRITE setImage)
public:
- QmlGraphicsVisualTestFrame() : m_msec(-1) {}
+ QDeclarativeVisualTestFrame() : m_msec(-1) {}
int msec() const { return m_msec; }
void setMsec(int m) { m_msec = m; }
@@ -98,11 +98,11 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QmlGraphicsVisualTestFrame)
+QML_DECLARE_TYPE(QDeclarativeVisualTestFrame)
QT_BEGIN_NAMESPACE
-class QmlGraphicsVisualTestMouse : public QObject
+class QDeclarativeVisualTestMouse : public QObject
{
Q_OBJECT
Q_PROPERTY(int type READ type WRITE setType)
@@ -113,7 +113,7 @@ class QmlGraphicsVisualTestMouse : public QObject
Q_PROPERTY(int modifiers READ modifiers WRITE setModifiers)
Q_PROPERTY(bool sendToViewport READ sendToViewport WRITE setSendToViewport)
public:
- QmlGraphicsVisualTestMouse() : m_type(0), m_button(0), m_buttons(0), m_x(0), m_y(0), m_modifiers(0), m_viewport(false) {}
+ QDeclarativeVisualTestMouse() : m_type(0), m_button(0), m_buttons(0), m_x(0), m_y(0), m_modifiers(0), m_viewport(false) {}
int type() const { return m_type; }
void setType(int t) { m_type = t; }
@@ -147,11 +147,11 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QmlGraphicsVisualTestMouse)
+QML_DECLARE_TYPE(QDeclarativeVisualTestMouse)
QT_BEGIN_NAMESPACE
-class QmlGraphicsVisualTestKey : public QObject
+class QDeclarativeVisualTestKey : public QObject
{
Q_OBJECT
Q_PROPERTY(int type READ type WRITE setType)
@@ -162,7 +162,7 @@ class QmlGraphicsVisualTestKey : public QObject
Q_PROPERTY(int count READ count WRITE setCount)
Q_PROPERTY(bool sendToViewport READ sendToViewport WRITE setSendToViewport)
public:
- QmlGraphicsVisualTestKey() : m_type(0), m_key(0), m_modifiers(0), m_autorep(false), m_count(0), m_viewport(false) {}
+ QDeclarativeVisualTestKey() : m_type(0), m_key(0), m_modifiers(0), m_autorep(false), m_count(0), m_viewport(false) {}
int type() const { return m_type; }
void setType(int t) { m_type = t; }
@@ -196,15 +196,15 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QmlGraphicsVisualTestKey)
+QML_DECLARE_TYPE(QDeclarativeVisualTestKey)
QT_BEGIN_NAMESPACE
-class QmlGraphicsTester : public QAbstractAnimation
+class QDeclarativeTester : public QAbstractAnimation
{
public:
- QmlGraphicsTester(const QString &script, QmlViewer::ScriptOptions options, QmlView *parent);
- ~QmlGraphicsTester();
+ QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions options, QDeclarativeView *parent);
+ ~QDeclarativeTester();
static void registerTypes();
@@ -227,7 +227,7 @@ private:
enum Destination { View, ViewPort };
void addKeyEvent(Destination, QKeyEvent *);
void addMouseEvent(Destination, QMouseEvent *);
- QmlView *m_view;
+ QDeclarativeView *m_view;
struct MouseEvent {
MouseEvent(QMouseEvent *e)
@@ -270,9 +270,9 @@ private:
QList<FrameEvent> m_savedFrameEvents;
bool filterEvents;
- QmlViewer::ScriptOptions options;
+ QDeclarativeViewer::ScriptOptions options;
int testscriptidx;
- QmlGraphicsVisualTest *testscript;
+ QDeclarativeVisualTest *testscript;
bool hasCompleted;
bool hasFailed;
diff --git a/tools/qmlviewer/qmlviewer.pro b/tools/qml/qml.pro
index 2da244c..9c9c398 100644
--- a/tools/qmlviewer/qmlviewer.pro
+++ b/tools/qml/qml.pro
@@ -13,17 +13,17 @@ contains(QT_CONFIG, opengl) {
}
# Input
-HEADERS += qmlviewer.h \
+HEADERS += qmlruntime.h \
proxysettings.h \
qfxtester.h \
deviceorientation.h \
- qmlfolderlistmodel.h
+ qdeclarativefolderlistmodel.h
SOURCES += main.cpp \
- qmlviewer.cpp \
+ qmlruntime.cpp \
proxysettings.cpp \
qfxtester.cpp \
- qmlfolderlistmodel.cpp
-RESOURCES = qmlviewer.qrc
+ qdeclarativefolderlistmodel.cpp
+RESOURCES = qmlruntime.qrc
maemo5 {
SOURCES += deviceorientation_maemo.cpp
} else {
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qml/qmlruntime.cpp
index 789c960..7da3f5a 100644
--- a/tools/qmlviewer/qmlviewer.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -39,18 +39,18 @@
**
****************************************************************************/
-#include <qmlview.h>
+#include <qdeclarativeview.h>
#ifdef hz
#undef hz
#endif
#include "ui_recopts.h"
-#include "qmlviewer.h"
-#include <qmlcontext.h>
-#include <qmlengine.h>
-#include <qmlnetworkaccessmanagerfactory.h>
-#include "qml.h"
+#include "qmlruntime.h"
+#include <qdeclarativecontext.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarativenetworkaccessmanagerfactory.h>
+#include "qdeclarative.h"
#include <private/qperformancelog_p_p.h>
#include <private/qabstractanimation_p.h>
#include <QAbstractAnimation>
@@ -58,7 +58,7 @@
#if (QT_VERSION >= QT_VERSION_CHECK(4, 6, 3))
#include <private/qzipreader_p.h>
-#define QMLVIEWER_ZIP_SUPPORT
+#define QDECLARATIVEVIEWER_ZIP_SUPPORT
#endif
#include <QSettings>
@@ -69,7 +69,7 @@
#include <QNetworkDiskCache>
#include <QNetworkAccessManager>
#include <QSignalMapper>
-#include <QmlComponent>
+#include <QDeclarativeComponent>
#include <QWidget>
#include <QApplication>
#include <QDir>
@@ -348,7 +348,7 @@ private:
mutable QMutex mutex;
};
-class NetworkAccessManagerFactory : public QmlNetworkAccessManagerFactory
+class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
{
public:
NetworkAccessManagerFactory() : cookieJar(0), cacheSize(0) {}
@@ -425,7 +425,7 @@ public:
};
-QString QmlViewer::getVideoFileName()
+QString QDeclarativeViewer::getVideoFileName()
{
QString title = convertAvailable || ffmpegAvailable ? tr("Save Video File") : tr("Save PNG Frames");
QStringList types;
@@ -437,7 +437,7 @@ QString QmlViewer::getVideoFileName()
}
-QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags)
+QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
#if defined(Q_OS_SYMBIAN)
: QMainWindow(parent, flags)
#else
@@ -473,14 +473,14 @@ QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags)
recdlg->warning->hide();
}
- canvas = new QmlView(this);
+ canvas = new QDeclarativeView(this);
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
- canvas->setResizeMode((!skin || !scaleSkin) ? QmlView::SizeRootObjectToView : QmlView::SizeViewToRootObject);
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
canvas->setFocus();
QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize)));
- QObject::connect(canvas, SIGNAL(statusChanged(QmlView::Status)), this, SLOT(statusChanged()));
+ QObject::connect(canvas, SIGNAL(statusChanged(QDeclarativeView::Status)), this, SLOT(statusChanged()));
QObject::connect(canvas->engine(), SIGNAL(quit()), QCoreApplication::instance (), SLOT(quit()));
if (!(flags & Qt::FramelessWindowHint)) {
@@ -512,13 +512,13 @@ QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags)
recordTimer.setRepeating(true);
}
-QmlViewer::~QmlViewer()
+QDeclarativeViewer::~QDeclarativeViewer()
{
canvas->engine()->setNetworkAccessManagerFactory(0);
delete namFactory;
}
-QMenuBar *QmlViewer::menuBar() const
+QMenuBar *QDeclarativeViewer::menuBar() const
{
#if !defined(Q_OS_SYMBIAN)
if (!mb)
@@ -530,7 +530,7 @@ QMenuBar *QmlViewer::menuBar() const
return mb;
}
-void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
+void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
{
QObject *parent = flatmenu ? (QObject*)flatmenu : (QObject*)menu;
@@ -684,7 +684,7 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
}
}
-void QmlViewer::showProxySettings()
+void QDeclarativeViewer::showProxySettings()
{
ProxySettings settingsDlg (this);
@@ -693,29 +693,29 @@ void QmlViewer::showProxySettings()
settingsDlg.exec();
}
-void QmlViewer::proxySettingsChanged()
+void QDeclarativeViewer::proxySettingsChanged()
{
reload ();
}
-void QmlViewer::setPortrait()
+void QDeclarativeViewer::setPortrait()
{
DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait);
portraitOrientation->setChecked(true);
}
-void QmlViewer::setLandscape()
+void QDeclarativeViewer::setLandscape()
{
DeviceOrientation::instance()->setOrientation(DeviceOrientation::Landscape);
landscapeOrientation->setChecked(true);
}
-void QmlViewer::toggleOrientation()
+void QDeclarativeViewer::toggleOrientation()
{
DeviceOrientation::instance()->setOrientation(DeviceOrientation::instance()->orientation()==DeviceOrientation::Portrait?DeviceOrientation::Landscape:DeviceOrientation::Portrait);
}
-void QmlViewer::toggleFullScreen()
+void QDeclarativeViewer::toggleFullScreen()
{
if (isFullScreen())
showMaximized();
@@ -723,25 +723,25 @@ void QmlViewer::toggleFullScreen()
showFullScreen();
}
-void QmlViewer::setScaleSkin()
+void QDeclarativeViewer::setScaleSkin()
{
if (scaleSkin)
return;
scaleSkin = true;
- canvas->setResizeMode((!skin || !scaleSkin) ? QmlView::SizeRootObjectToView : QmlView::SizeViewToRootObject);
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
if (skin) {
canvas->setFixedSize(canvas->sizeHint());
skin->setScreenSize(canvas->sizeHint());
}
}
-void QmlViewer::setScaleView()
+void QDeclarativeViewer::setScaleView()
{
if (!scaleSkin)
return;
scaleSkin = false;
if (skin) {
- canvas->setResizeMode((!skin || !scaleSkin) ? QmlView::SizeRootObjectToView : QmlView::SizeViewToRootObject);
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
canvas->setMinimumSize(QSize(0,0));
canvas->setMaximumSize(QSize(16777215,16777215));
canvas->resize(skin->standardScreenSize());
@@ -750,7 +750,7 @@ void QmlViewer::setScaleView()
}
-void QmlViewer::takeSnapShot()
+void QDeclarativeViewer::takeSnapShot()
{
static int snapshotcount = 1;
QString snapFileName = QString(QLatin1String("snapshot%1.png")).arg(snapshotcount);
@@ -759,14 +759,14 @@ void QmlViewer::takeSnapShot()
++snapshotcount;
}
-void QmlViewer::pickRecordingFile()
+void QDeclarativeViewer::pickRecordingFile()
{
QString fileName = getVideoFileName();
if (!fileName.isEmpty())
recdlg->file->setText(fileName);
}
-void QmlViewer::chooseRecordingOptions()
+void QDeclarativeViewer::chooseRecordingOptions()
{
// File
recdlg->file->setText(record_file);
@@ -825,7 +825,7 @@ void QmlViewer::chooseRecordingOptions()
}
}
-void QmlViewer::toggleRecordingWithSelection()
+void QDeclarativeViewer::toggleRecordingWithSelection()
{
if (!recordTimer.isRunning()) {
if (record_file.isEmpty()) {
@@ -840,7 +840,7 @@ void QmlViewer::toggleRecordingWithSelection()
toggleRecording();
}
-void QmlViewer::toggleRecording()
+void QDeclarativeViewer::toggleRecording()
{
if (record_file.isEmpty()) {
toggleRecordingWithSelection();
@@ -851,24 +851,24 @@ void QmlViewer::toggleRecording()
setRecording(recording);
}
-void QmlViewer::setSlowMode(bool enable)
+void QDeclarativeViewer::setSlowMode(bool enable)
{
QUnifiedTimer::instance()->setSlowModeEnabled(enable);
}
-void QmlViewer::addLibraryPath(const QString& lib)
+void QDeclarativeViewer::addLibraryPath(const QString& lib)
{
canvas->engine()->addImportPath(lib);
}
-void QmlViewer::reload()
+void QDeclarativeViewer::reload()
{
openQml(currentFileOrUrl);
}
-void QmlViewer::open(const QString& doc)
+void QDeclarativeViewer::open(const QString& doc)
{
-#ifdef QMLVIEWER_ZIP_SUPPORT
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
if (doc.endsWith(".wgt",Qt::CaseInsensitive)
|| doc.endsWith(".wgz",Qt::CaseInsensitive)
|| doc.endsWith(".zip",Qt::CaseInsensitive))
@@ -878,10 +878,10 @@ void QmlViewer::open(const QString& doc)
openQml(doc);
}
-void QmlViewer::openWgt(const QString& doc)
+void QDeclarativeViewer::openWgt(const QString& doc)
{
-#ifdef QMLVIEWER_ZIP_SUPPORT
- // XXX This functionality could be migrated to QmlView once refined
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
+ // XXX This functionality could be migrated to QDeclarativeView once refined
QUrl url(doc);
if (url.isRelative())
@@ -894,7 +894,7 @@ void QmlViewer::openWgt(const QString& doc)
#endif
}
-#ifdef QMLVIEWER_ZIP_SUPPORT
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
static void removeRecursive(const QString& dirname)
{
QDir dir(dirname);
@@ -908,9 +908,9 @@ static void removeRecursive(const QString& dirname)
}
#endif
-void QmlViewer::unpackWgt()
+void QDeclarativeViewer::unpackWgt()
{
-#ifdef QMLVIEWER_ZIP_SUPPORT
+#ifdef QDECLARATIVEVIEWER_ZIP_SUPPORT
QByteArray all = wgtreply->readAll();
QBuffer buf(&all);
buf.open(QIODevice::ReadOnly);
@@ -921,7 +921,7 @@ void QmlViewer::unpackWgt()
qDebug() << "zip:" << info.filePath;
}
*/
- wgtdir = QDir::tempPath()+QDir::separator()+QLatin1String("qmlviewer-wgt");
+ wgtdir = QDir::tempPath()+QDir::separator()+QLatin1String("qml-wgt");
removeRecursive(wgtdir);
QDir().mkpath(wgtdir);
zip.extractAll(wgtdir);
@@ -967,7 +967,7 @@ void QmlViewer::unpackWgt()
#endif
}
-void QmlViewer::openFile()
+void QDeclarativeViewer::openFile()
{
QString cur = canvas->source().toLocalFile();
if (useQmlFileBrowser) {
@@ -981,21 +981,21 @@ void QmlViewer::openFile()
}
}
-void QmlViewer::statusChanged()
+void QDeclarativeViewer::statusChanged()
{
- if (canvas->status() == QmlView::Error && tester)
+ if (canvas->status() == QDeclarativeView::Error && tester)
tester->executefailure();
- if (canvas->status() == QmlView::Ready)
+ if (canvas->status() == QDeclarativeView::Ready)
resize(sizeHint());
}
-void QmlViewer::launch(const QString& file_or_url)
+void QDeclarativeViewer::launch(const QString& file_or_url)
{
QMetaObject::invokeMethod(this, "openQml", Qt::QueuedConnection, Q_ARG(QString, file_or_url));
}
-void QmlViewer::openQml(const QString& file_or_url)
+void QDeclarativeViewer::openQml(const QString& file_or_url)
{
currentFileOrUrl = file_or_url;
@@ -1008,11 +1008,11 @@ void QmlViewer::openQml(const QString& file_or_url)
setWindowTitle(tr("%1 - Qt Declarative UI Viewer").arg(file_or_url));
if (!m_script.isEmpty())
- tester = new QmlGraphicsTester(m_script, m_scriptOptions, canvas);
+ tester = new QDeclarativeTester(m_script, m_scriptOptions, canvas);
delete canvas->rootObject();
canvas->engine()->clearComponentCache();
- QmlContext *ctxt = canvas->rootContext();
+ QDeclarativeContext *ctxt = canvas->rootContext();
ctxt->setContextProperty("qmlViewer", this);
#ifdef Q_OS_SYMBIAN
ctxt->setContextProperty("qmlViewerFolder", "E:\\"); // Documents on your S60 phone
@@ -1025,7 +1025,7 @@ void QmlViewer::openQml(const QString& file_or_url)
QFileInfo fi(fileName);
if (fi.exists()) {
if (fi.suffix().toLower() != QLatin1String("qml")) {
- qWarning() << "qmlviewer cannot open non-QML file" << fileName;
+ qWarning() << "qml cannot open non-QML file" << fileName;
return;
}
@@ -1036,13 +1036,13 @@ void QmlViewer::openQml(const QString& file_or_url)
QFile f(dir.filePath(qml));
f.open(QIODevice::ReadOnly);
QByteArray data = f.readAll();
- QmlComponent comp(canvas->engine());
+ QDeclarativeComponent comp(canvas->engine());
comp.setData(data, QUrl());
QObject *dummyData = comp.create();
if(comp.isError()) {
- QList<QmlError> errors = comp.errors();
- foreach (const QmlError &error, errors) {
+ QList<QDeclarativeError> errors = comp.errors();
+ foreach (const QDeclarativeError &error, errors) {
qWarning() << error;
}
if (tester) tester->executefailure();
@@ -1056,7 +1056,7 @@ void QmlViewer::openQml(const QString& file_or_url)
}
}
} else {
- qWarning() << "qmlviewer cannot find file:" << fileName;
+ qWarning() << "qml cannot find file:" << fileName;
return;
}
}
@@ -1088,14 +1088,14 @@ void QmlViewer::openQml(const QString& file_or_url)
#endif
}
-void QmlViewer::startNetwork()
+void QDeclarativeViewer::startNetwork()
{
#if defined(SYMBIAN_NETWORK_INIT)
qt_SetDefaultIap();
#endif
}
-QStringList QmlViewer::builtinSkins() const
+QStringList QDeclarativeViewer::builtinSkins() const
{
QDir dir(":/skins/","*.skin");
const QFileInfoList l = dir.entryInfoList();
@@ -1106,7 +1106,7 @@ QStringList QmlViewer::builtinSkins() const
return r;
}
-void QmlViewer::setSkin(const QString& skinDirOrName)
+void QDeclarativeViewer::setSkin(const QString& skinDirOrName)
{
QString skinDirectory = skinDirOrName;
@@ -1128,7 +1128,7 @@ void QmlViewer::setSkin(const QString& skinDirOrName)
skin->deleteLater();
}
- canvas->setResizeMode((!skin || !scaleSkin) ? QmlView::SizeRootObjectToView : QmlView::SizeViewToRootObject);
+ canvas->setResizeMode((!skin || !scaleSkin) ? QDeclarativeView::SizeRootObjectToView : QDeclarativeView::SizeViewToRootObject);
DeviceSkinParameters parameters;
if (!skinDirectory.isEmpty() && parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) {
@@ -1168,7 +1168,7 @@ void QmlViewer::setSkin(const QString& skinDirOrName)
canvas->show();
}
-void QmlViewer::setAutoRecord(int from, int to)
+void QDeclarativeViewer::setAutoRecord(int from, int to)
{
if (from==0) from=1; // ensure resized
record_autotime = to-from;
@@ -1176,22 +1176,22 @@ void QmlViewer::setAutoRecord(int from, int to)
autoStartTimer.setRunning(true);
}
-void QmlViewer::setRecordArgs(const QStringList& a)
+void QDeclarativeViewer::setRecordArgs(const QStringList& a)
{
record_args = a;
}
-void QmlViewer::setRecordFile(const QString& f)
+void QDeclarativeViewer::setRecordFile(const QString& f)
{
record_file = f;
}
-void QmlViewer::setRecordRate(int fps)
+void QDeclarativeViewer::setRecordRate(int fps)
{
record_rate = fps;
}
-void QmlViewer::sceneResized(QSize size)
+void QDeclarativeViewer::sceneResized(QSize size)
{
if (size.width() > 0 && size.height() > 0) {
if (skin && scaleSkin)
@@ -1199,7 +1199,7 @@ void QmlViewer::sceneResized(QSize size)
}
}
-void QmlViewer::keyPressEvent(QKeyEvent *event)
+void QDeclarativeViewer::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_0 && devicemode)
exit(0);
@@ -1240,7 +1240,7 @@ void QmlViewer::keyPressEvent(QKeyEvent *event)
QWidget::keyPressEvent(event);
}
-void QmlViewer::senseImageMagick()
+void QDeclarativeViewer::senseImageMagick()
{
QProcess proc;
proc.start("convert", QStringList() << "-h");
@@ -1249,7 +1249,7 @@ void QmlViewer::senseImageMagick()
convertAvailable = help.contains("ImageMagick");
}
-void QmlViewer::senseFfmpeg()
+void QDeclarativeViewer::senseFfmpeg()
{
QProcess proc;
proc.start("ffmpeg", QStringList() << "-h");
@@ -1271,7 +1271,7 @@ void QmlViewer::senseFfmpeg()
connect(recdlg->ffmpegHelp,SIGNAL(clicked()), ffmpegHelpWindow, SLOT(show()));
}
-void QmlViewer::setRecording(bool on)
+void QDeclarativeViewer::setRecording(bool on)
{
if (on == recordTimer.isRunning())
return;
@@ -1396,24 +1396,24 @@ void QmlViewer::setRecording(bool on)
qDebug() << "Recording: " << (recordTimer.isRunning()?"ON":"OFF");
}
-void QmlViewer::ffmpegFinished(int code)
+void QDeclarativeViewer::ffmpegFinished(int code)
{
qDebug() << "ffmpeg returned" << code << frame_stream->readAllStandardError();
}
-void QmlViewer::autoStartRecording()
+void QDeclarativeViewer::autoStartRecording()
{
setRecording(true);
autoStopTimer.setInterval(record_autotime);
autoStopTimer.setRunning(true);
}
-void QmlViewer::autoStopRecording()
+void QDeclarativeViewer::autoStopRecording()
{
setRecording(false);
}
-void QmlViewer::recordFrame()
+void QDeclarativeViewer::recordFrame()
{
canvas->QWidget::render(&frame);
if (frame_stream) {
@@ -1429,17 +1429,17 @@ void QmlViewer::recordFrame()
}
}
-void QmlViewer::setDeviceKeys(bool on)
+void QDeclarativeViewer::setDeviceKeys(bool on)
{
devicemode = on;
}
-void QmlViewer::setNetworkCacheSize(int size)
+void QDeclarativeViewer::setNetworkCacheSize(int size)
{
namFactory->setCacheSize(size);
}
-void QmlViewer::setUseGL(bool useGL)
+void QDeclarativeViewer::setUseGL(bool useGL)
{
#ifdef GL_SUPPORTED
if (useGL) {
@@ -1453,16 +1453,16 @@ void QmlViewer::setUseGL(bool useGL)
#endif
}
-void QmlViewer::setUseNativeFileBrowser(bool use)
+void QDeclarativeViewer::setUseNativeFileBrowser(bool use)
{
useQmlFileBrowser = !use;
}
-void QmlViewer::registerTypes()
+void QDeclarativeViewer::registerTypes()
{
- QML_REGISTER_TYPE(QmlViewer, 1, 0, Screen, Screen);
+ QML_REGISTER_TYPE(QDeclarativeViewer, 1, 0, Screen, Screen);
}
QT_END_NAMESPACE
-#include "qmlviewer.moc"
+#include "qmlruntime.moc"
diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qml/qmlruntime.h
index ac7b9a0..01777bd 100644
--- a/tools/qmlviewer/qmlviewer.h
+++ b/tools/qml/qmlruntime.h
@@ -39,28 +39,28 @@
**
****************************************************************************/
-#ifndef QMLVIEWER_H
-#define QMLVIEWER_H
+#ifndef QDECLARATIVEVIEWER_H
+#define QDECLARATIVEVIEWER_H
#include <QMainWindow>
#include <QMenuBar>
-#include <private/qmltimer_p.h>
+#include <private/qdeclarativetimer_p.h>
#include <QTime>
#include <QList>
QT_BEGIN_NAMESPACE
-class QmlView;
+class QDeclarativeView;
class PreviewDeviceSkin;
-class QmlGraphicsTestEngine;
+class QDeclarativeTestEngine;
class QProcess;
class RecordingDialog;
-class QmlGraphicsTester;
+class QDeclarativeTester;
class QNetworkReply;
class QNetworkCookieJar;
class NetworkAccessManagerFactory;
-class QmlViewer
+class QDeclarativeViewer
#if defined(Q_OS_SYMBIAN)
: public QMainWindow
#else
@@ -69,8 +69,8 @@ class QmlViewer
{
Q_OBJECT
public:
- QmlViewer(QWidget *parent=0, Qt::WindowFlags flags=0);
- ~QmlViewer();
+ QDeclarativeViewer(QWidget *parent=0, Qt::WindowFlags flags=0);
+ ~QDeclarativeViewer();
static void registerTypes();
@@ -146,15 +146,15 @@ private:
PreviewDeviceSkin *skin;
QSize skinscreensize;
- QmlView *canvas;
+ QDeclarativeView *canvas;
QString currentFileOrUrl;
- QmlTimer recordTimer;
+ QDeclarativeTimer recordTimer;
QString frame_fmt;
QImage frame;
QList<QImage*> frames;
QProcess* frame_stream;
- QmlTimer autoStartTimer;
- QmlTimer autoStopTimer;
+ QDeclarativeTimer autoStartTimer;
+ QDeclarativeTimer autoStopTimer;
QString record_dither;
QString record_file;
QSize record_outsize;
@@ -179,7 +179,7 @@ private:
QString m_script;
ScriptOptions m_scriptOptions;
- QmlGraphicsTester *tester;
+ QDeclarativeTester *tester;
QNetworkReply *wgtreply;
QString wgtdir;
@@ -188,7 +188,7 @@ private:
bool useQmlFileBrowser;
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(QmlViewer::ScriptOptions)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeViewer::ScriptOptions)
QT_END_NAMESPACE
diff --git a/tools/qmlviewer/qmlviewer.qrc b/tools/qml/qmlruntime.qrc
index 3a9e608..3a9e608 100644
--- a/tools/qmlviewer/qmlviewer.qrc
+++ b/tools/qml/qmlruntime.qrc
diff --git a/tools/qmlviewer/recopts.ui b/tools/qml/recopts.ui
index ce2da30..ce2da30 100644
--- a/tools/qmlviewer/recopts.ui
+++ b/tools/qml/recopts.ui
diff --git a/tools/tools.pro b/tools/tools.pro
index d5569b6..3ed07b1 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -26,7 +26,7 @@ mac {
embedded:SUBDIRS += kmap2qmap
-contains(QT_CONFIG, declarative):SUBDIRS += qmlviewer
+contains(QT_CONFIG, declarative):SUBDIRS += qml
contains(QT_CONFIG, dbus):SUBDIRS += qdbus
!wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns xmlpatternsvalidator
embedded: SUBDIRS += makeqpf