summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-29 06:00:33 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-29 06:00:33 (GMT)
commita915df4fa1217d2670348029d2d9fb709118ddc2 (patch)
treeafcd405b2a046a6d2dbce9be4b3e6559eb9dfbdc /src/declarative
parent9abd22080de9898a5edf0cb4d9973d3ce611af62 (diff)
downloadQt-a915df4fa1217d2670348029d2d9fb709118ddc2.zip
Qt-a915df4fa1217d2670348029d2d9fb709118ddc2.tar.gz
Qt-a915df4fa1217d2670348029d2d9fb709118ddc2.tar.bz2
Get rid of classComplete.
componentComplete is always what is wanted.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/extra/qmldatetimeformatter.cpp12
-rw-r--r--src/declarative/extra/qmldatetimeformatter.h2
-rw-r--r--src/declarative/extra/qmlfolderlistmodel.cpp2
-rw-r--r--src/declarative/extra/qmlfolderlistmodel.h2
-rw-r--r--src/declarative/extra/qmlnumberformatter.cpp12
-rw-r--r--src/declarative/extra/qmlnumberformatter.h2
-rw-r--r--src/declarative/extra/qmlsqlconnection.cpp7
-rw-r--r--src/declarative/extra/qmlsqlconnection.h2
-rw-r--r--src/declarative/extra/qmlsqlquery.cpp9
-rw-r--r--src/declarative/extra/qmlsqlquery.h5
-rw-r--r--src/declarative/fx/qfxitem.cpp37
-rw-r--r--src/declarative/fx/qfxitem.h2
-rw-r--r--src/declarative/fx/qfxitem_p.h3
-rw-r--r--src/declarative/qml/qmlcompiler.cpp9
-rw-r--r--src/declarative/qml/qmlinstruction.cpp3
-rw-r--r--src/declarative/qml/qmlinstruction_p.h4
-rw-r--r--src/declarative/qml/qmlparserstatus.cpp8
-rw-r--r--src/declarative/qml/qmlparserstatus.h1
-rw-r--r--src/declarative/qml/qmlvme.cpp8
-rw-r--r--src/declarative/util/qmlstategroup.cpp13
-rw-r--r--src/declarative/util/qmlstategroup.h1
21 files changed, 28 insertions, 116 deletions
diff --git a/src/declarative/extra/qmldatetimeformatter.cpp b/src/declarative/extra/qmldatetimeformatter.cpp
index 91ebce6..3542657 100644
--- a/src/declarative/extra/qmldatetimeformatter.cpp
+++ b/src/declarative/extra/qmldatetimeformatter.cpp
@@ -52,7 +52,7 @@ class QmlDateTimeFormatterPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QmlDateTimeFormatter)
public:
- QmlDateTimeFormatterPrivate() : locale(QLocale::system()), longStyle(false), classComplete(true) {}
+ QmlDateTimeFormatterPrivate() : locale(QLocale::system()), longStyle(false), componentComplete(true) {}
void updateText();
@@ -67,7 +67,7 @@ public:
QString dateFormat;
QString timeFormat;
bool longStyle;
- bool classComplete;
+ bool componentComplete;
};
/*!
@@ -316,7 +316,7 @@ void QmlDateTimeFormatter::setLongStyle(bool longStyle)
void QmlDateTimeFormatterPrivate::updateText()
{
Q_Q(QmlDateTimeFormatter);
- if (!classComplete)
+ if (!componentComplete)
return;
QString str;
@@ -355,13 +355,13 @@ void QmlDateTimeFormatterPrivate::updateText()
void QmlDateTimeFormatter::classBegin()
{
Q_D(QmlDateTimeFormatter);
- d->classComplete = false;
+ d->componentComplete = false;
}
-void QmlDateTimeFormatter::classComplete()
+void QmlDateTimeFormatter::componentComplete()
{
Q_D(QmlDateTimeFormatter);
- d->classComplete = true;
+ d->componentComplete = true;
d->updateText();
}
diff --git a/src/declarative/extra/qmldatetimeformatter.h b/src/declarative/extra/qmldatetimeformatter.h
index 71b366c..be0ae02 100644
--- a/src/declarative/extra/qmldatetimeformatter.h
+++ b/src/declarative/extra/qmldatetimeformatter.h
@@ -97,7 +97,7 @@ public:
void setLongStyle(bool);
virtual void classBegin();
- virtual void classComplete();
+ virtual void componentComplete();
Q_SIGNALS:
void textChanged();
diff --git a/src/declarative/extra/qmlfolderlistmodel.cpp b/src/declarative/extra/qmlfolderlistmodel.cpp
index e632f72..bdea03f 100644
--- a/src/declarative/extra/qmlfolderlistmodel.cpp
+++ b/src/declarative/extra/qmlfolderlistmodel.cpp
@@ -222,7 +222,7 @@ void QmlFolderListModel::setNameFilters(const QStringList &filters)
d->model.setNameFilters(d->nameFilters);
}
-void QmlFolderListModel::classComplete()
+void QmlFolderListModel::componentComplete()
{
Q_D(QmlFolderListModel);
if (!d->folderIndex.isValid())
diff --git a/src/declarative/extra/qmlfolderlistmodel.h b/src/declarative/extra/qmlfolderlistmodel.h
index 8708d9a..24a3ac6 100644
--- a/src/declarative/extra/qmlfolderlistmodel.h
+++ b/src/declarative/extra/qmlfolderlistmodel.h
@@ -80,7 +80,7 @@ public:
QStringList nameFilters() const;
void setNameFilters(const QStringList &filters);
- virtual void classComplete();
+ virtual void componentComplete();
Q_INVOKABLE bool isFolder(int index) const;
diff --git a/src/declarative/extra/qmlnumberformatter.cpp b/src/declarative/extra/qmlnumberformatter.cpp
index 1818c36..e937905 100644
--- a/src/declarative/extra/qmlnumberformatter.cpp
+++ b/src/declarative/extra/qmlnumberformatter.cpp
@@ -53,7 +53,7 @@ class QmlNumberFormatterPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QmlNumberFormatter)
public:
- QmlNumberFormatterPrivate() : locale(QLocale::system()), number(0), classComplete(true) {}
+ QmlNumberFormatterPrivate() : locale(QLocale::system()), number(0), componentComplete(true) {}
void updateText();
@@ -62,7 +62,7 @@ public:
QNumberFormat numberFormat;
QString text;
qreal number;
- bool classComplete;
+ bool componentComplete;
};
/*!
\qmlclass NumberFormatter
@@ -186,7 +186,7 @@ void QmlNumberFormatter::setFormat(const QString &format)
void QmlNumberFormatterPrivate::updateText()
{
Q_Q(QmlNumberFormatter);
- if (!classComplete)
+ if (!componentComplete)
return;
QNumberFormat tempFormat;
@@ -201,13 +201,13 @@ void QmlNumberFormatterPrivate::updateText()
void QmlNumberFormatter::classBegin()
{
Q_D(QmlNumberFormatter);
- d->classComplete = false;
+ d->componentComplete = false;
}
-void QmlNumberFormatter::classComplete()
+void QmlNumberFormatter::componentComplete()
{
Q_D(QmlNumberFormatter);
- d->classComplete = true;
+ d->componentComplete = true;
d->updateText();
}
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,NumberFormatter,QmlNumberFormatter);
diff --git a/src/declarative/extra/qmlnumberformatter.h b/src/declarative/extra/qmlnumberformatter.h
index 6924fa5..d9abee7 100644
--- a/src/declarative/extra/qmlnumberformatter.h
+++ b/src/declarative/extra/qmlnumberformatter.h
@@ -73,7 +73,7 @@ public:
void setFormat(const QString &);
virtual void classBegin();
- virtual void classComplete();
+ virtual void componentComplete();
Q_SIGNALS:
void textChanged();
diff --git a/src/declarative/extra/qmlsqlconnection.cpp b/src/declarative/extra/qmlsqlconnection.cpp
index 3384ccd..bed92ef 100644
--- a/src/declarative/extra/qmlsqlconnection.cpp
+++ b/src/declarative/extra/qmlsqlconnection.cpp
@@ -381,13 +381,6 @@ void QmlSqlConnection::setDriver(const QString &type)
}
/*!
- \reimp
-*/
-void QmlSqlConnection::classComplete()
-{
-}
-
-/*!
Returns the database object associated with this connection.
If the database is not yet open, it will open the database
passed on the settings specified for the SQL connection.
diff --git a/src/declarative/extra/qmlsqlconnection.h b/src/declarative/extra/qmlsqlconnection.h
index 88a727a..740bbc2 100644
--- a/src/declarative/extra/qmlsqlconnection.h
+++ b/src/declarative/extra/qmlsqlconnection.h
@@ -100,8 +100,6 @@ public:
QString lastError() const;
- virtual void classComplete();
-
QSqlDatabase database() const;
private:
Q_DISABLE_COPY(QmlSqlConnection)
diff --git a/src/declarative/extra/qmlsqlquery.cpp b/src/declarative/extra/qmlsqlquery.cpp
index 4894de7..fe6e220 100644
--- a/src/declarative/extra/qmlsqlquery.cpp
+++ b/src/declarative/extra/qmlsqlquery.cpp
@@ -185,13 +185,6 @@ void QmlSqlBind::setValue(const QVariant &value)
}
}
-/*!
- \reimp
-*/
-void QmlSqlBind::classComplete()
-{
-}
-
class QmlSqlQueryPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QmlSqlQuery)
@@ -510,7 +503,7 @@ QString QmlSqlQuery::lastError() const
/*!
\reimp
*/
-void QmlSqlQuery::classComplete()
+void QmlSqlQuery::componentComplete()
{
Q_D(QmlSqlQuery);
if (!d->query)
diff --git a/src/declarative/extra/qmlsqlquery.h b/src/declarative/extra/qmlsqlquery.h
index 8be758f..55e16ac 100644
--- a/src/declarative/extra/qmlsqlquery.h
+++ b/src/declarative/extra/qmlsqlquery.h
@@ -72,8 +72,6 @@ public:
void setName(const QString &name);
void setValue(const QVariant &);
- virtual void classComplete();
-
Q_SIGNALS:
void valueChanged();
@@ -111,7 +109,8 @@ public:
QString lastError() const;
- virtual void classComplete();
+ //### missing classBegin
+ virtual void componentComplete();
QmlList<QmlSqlBind *> *bindings();
const QmlList<QmlSqlBind *> *bindings() const;
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index a65b51a..1bf3140 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -499,18 +499,6 @@ QFxItem *QFxItem::parentItem() const
*/
/*!
- Returns true if all of the attributes set via QML have been set;
- otherwise returns false.
-
- \sa classComplete()
-*/
-bool QFxItem::isClassComplete() const
-{
- Q_D(const QFxItem);
- return d->_classComplete;
-}
-
-/*!
Returns true if construction of the QML component is complete; otherwise
returns false.
@@ -1729,34 +1717,17 @@ void QFxItem::newChild(const QString &type)
classBegin() is called when the item is constructed, but its
properties have not yet been set.
- \sa classComplete(), componentComplete(), isClassComplete(), isComponentComplete()
+ \sa componentComplete(), isComponentComplete()
*/
void QFxItem::classBegin()
{
Q_D(QFxItem);
- d->_classComplete = false;
d->_componentComplete = false;
if (d->_stateGroup)
d->_stateGroup->classBegin();
}
/*!
- classComplete() is called when all properties specified in QML
- have been assigned. It is sometimes desireable to delay some
- processing until all property assignments are complete.
-*/
-void QFxItem::classComplete()
-{
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::ItemComponentComplete> cc;
-#endif
- Q_D(QFxItem);
- d->_classComplete = true;
- if (d->_stateGroup)
- d->_stateGroup->classComplete();
-}
-
-/*!
componentComplete() is called when all items in the component
have been constructed. It is often desireable to delay some
processing until the component is complete an all bindings in the
@@ -1764,6 +1735,10 @@ void QFxItem::classComplete()
*/
void QFxItem::componentComplete()
{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QFxPerfTimer<QFxPerf::ItemComponentComplete> cc;
+#endif
+
Q_D(QFxItem);
d->_componentComplete = true;
if (d->_stateGroup)
@@ -1777,7 +1752,7 @@ QmlStateGroup *QFxItemPrivate::states()
Q_Q(QFxItem);
if (!_stateGroup) {
_stateGroup = new QmlStateGroup(q);
- if (!_classComplete)
+ if (!_componentComplete)
_stateGroup->classBegin();
QObject::connect(_stateGroup, SIGNAL(stateChanged(QString)),
q, SIGNAL(stateChanged(QString)));
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h
index 4837881..5252009 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/fx/qfxitem.h
@@ -208,7 +208,6 @@ public:
QmlList<QGraphicsTransform *> *transform();
- bool isClassComplete() const;
bool isComponentComplete() const;
bool keepMouseGrab() const;
@@ -276,7 +275,6 @@ protected:
virtual void mouseUngrabEvent();
virtual void classBegin();
- virtual void classComplete();
virtual void componentComplete();
virtual void parentChanged(QFxItem *, QFxItem *);
virtual void focusChanged(bool);
diff --git a/src/declarative/fx/qfxitem_p.h b/src/declarative/fx/qfxitem_p.h
index ebd77f8..c600fbf 100644
--- a/src/declarative/fx/qfxitem_p.h
+++ b/src/declarative/fx/qfxitem_p.h
@@ -77,7 +77,7 @@ public:
QFxItemPrivate()
: _anchors(0), _contents(0), qmlItem(0), _qmlcomp(0),
_baselineOffset(0),
- _classComplete(true), _componentComplete(true), _keepMouse(false),
+ _componentComplete(true), _keepMouse(false),
_anchorLines(0),
_stateGroup(0), canvas(0), origin(QFxItem::TopLeft),
options(QFxItem::NoOption),
@@ -158,7 +158,6 @@ public:
QmlNullableValue<qreal> _baselineOffset;
- bool _classComplete:1;
bool _componentComplete:1;
bool _keepMouse:1;
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 9c9a7bd..59cf15d 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -787,15 +787,6 @@ void QmlCompiler::genObject(QmlParser::Object *obj)
}
genObjectBody(obj);
-
- // Complete the the class
- if (obj->parserStatusCast != -1) {
- QmlInstruction complete;
- complete.type = QmlInstruction::CompleteObject;
- complete.complete.castValue = obj->parserStatusCast;
- complete.line = obj->location.start.line;
- output->bytecode << complete;
- }
}
void QmlCompiler::genObjectBody(QmlParser::Object *obj)
diff --git a/src/declarative/qml/qmlinstruction.cpp b/src/declarative/qml/qmlinstruction.cpp
index 761903c..9f77bc0 100644
--- a/src/declarative/qml/qmlinstruction.cpp
+++ b/src/declarative/qml/qmlinstruction.cpp
@@ -152,9 +152,6 @@ void QmlCompiledData::dump(QmlInstruction *instr, int idx)
case QmlInstruction::BeginObject:
qWarning() << idx << "\t" << line << "\t" << "BEGIN\t\t\t" << instr->begin.castValue;
break;
- case QmlInstruction::CompleteObject:
- qWarning() << idx << "\t" << line << "\t" << "COMPLETE\t\t" << instr->complete.castValue;
- break;
case QmlInstruction::StoreObjectQmlList:
qWarning() << idx << "\t" << line << "\t" << "STORE_OBJECT_QMLLIST";
break;
diff --git a/src/declarative/qml/qmlinstruction_p.h b/src/declarative/qml/qmlinstruction_p.h
index dc118b6..d4fe68c 100644
--- a/src/declarative/qml/qmlinstruction_p.h
+++ b/src/declarative/qml/qmlinstruction_p.h
@@ -129,7 +129,6 @@ public:
StoreValueSource, /* assignValueSource */
BeginObject, /* begin */
- CompleteObject, /* complete */
StoreObjectQmlList, /* NA */
StoreObjectQList, /* NA */
@@ -200,9 +199,6 @@ public:
} fetchQmlList;
struct {
int castValue;
- } complete;
- struct {
- int castValue;
} begin;
struct {
int propertyIndex;
diff --git a/src/declarative/qml/qmlparserstatus.cpp b/src/declarative/qml/qmlparserstatus.cpp
index fceac05..0d262ca 100644
--- a/src/declarative/qml/qmlparserstatus.cpp
+++ b/src/declarative/qml/qmlparserstatus.cpp
@@ -69,14 +69,6 @@ void QmlParserStatus::classBegin()
}
/*!
- Invoked after all properties have been set to their static values. At this
- point bindings are still to be evaluated.
-*/
-void QmlParserStatus::classComplete()
-{
-}
-
-/*!
Invoked after the root component that caused this instantiation has
completed construction. At this point all static values and binding values
have been assigned to the class.
diff --git a/src/declarative/qml/qmlparserstatus.h b/src/declarative/qml/qmlparserstatus.h
index 4db6d8c..f754227 100644
--- a/src/declarative/qml/qmlparserstatus.h
+++ b/src/declarative/qml/qmlparserstatus.h
@@ -57,7 +57,6 @@ public:
virtual ~QmlParserStatus();
virtual void classBegin();
- virtual void classComplete();
virtual void componentComplete();
private:
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index 1cfd5e9..ee41fe4 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -522,14 +522,6 @@ QObject *QmlVME::run(QStack<QObject *> &stack, QmlContext *ctxt, QmlCompiledData
}
break;
- case QmlInstruction::CompleteObject:
- {
- QObject *target = stack.top();
- QmlParserStatus *status = reinterpret_cast<QmlParserStatus *>(reinterpret_cast<char *>(target) + instr.complete.castValue);
- status->classComplete();
- }
- break;
-
case QmlInstruction::StoreCompiledBinding:
{
QObject *target =
diff --git a/src/declarative/util/qmlstategroup.cpp b/src/declarative/util/qmlstategroup.cpp
index 13a0023..ed9221b 100644
--- a/src/declarative/util/qmlstategroup.cpp
+++ b/src/declarative/util/qmlstategroup.cpp
@@ -56,8 +56,7 @@ class QmlStateGroupPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QmlStateGroup)
public:
QmlStateGroupPrivate(QmlStateGroup *p)
- : nullState(0), states(p), classComplete(true),
- componentComplete(true), ignoreTrans(false) {}
+ : nullState(0), states(p), componentComplete(true), ignoreTrans(false) {}
QString currentState;
QmlState *nullState;
@@ -76,7 +75,6 @@ public:
StateList states;
QmlConcreteList<QmlTransition *> transitions;
- bool classComplete;
bool componentComplete;
bool ignoreTrans;
@@ -133,16 +131,9 @@ void QmlStateGroup::setState(const QString &state)
void QmlStateGroup::classBegin()
{
Q_D(QmlStateGroup);
- d->classComplete = false;
d->componentComplete = false;
}
-void QmlStateGroup::classComplete()
-{
- Q_D(QmlStateGroup);
- d->classComplete = true;
-}
-
void QmlStateGroup::updateAutoState()
{
Q_D(QmlStateGroup);
@@ -152,7 +143,7 @@ void QmlStateGroup::updateAutoState()
void QmlStateGroupPrivate::updateAutoState()
{
Q_Q(QmlStateGroup);
- if (!classComplete)
+ if (!componentComplete)
return;
bool revert = false;
diff --git a/src/declarative/util/qmlstategroup.h b/src/declarative/util/qmlstategroup.h
index a817bd0..cf79eb4 100644
--- a/src/declarative/util/qmlstategroup.h
+++ b/src/declarative/util/qmlstategroup.h
@@ -76,7 +76,6 @@ public:
QmlState *findState(const QString &name) const;
virtual void classBegin();
- virtual void classComplete();
virtual void componentComplete();
Q_SIGNALS:
void stateChanged(const QString &);