aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmlconnections.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-03-06 16:55:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-07 15:33:19 +0100
commit99efe4309379482fce5c231885883e359bf85290 (patch)
treedbb9333a547fa1939bd63bd64136611e9fe82968 /src/qml/types/qqmlconnections.cpp
parent9fc17c08e5635cf112c6194e6c24af2a9c7caf00 (diff)
Remove old compiler and VME
This removes the bulk of the code. A few smaller cleanups remain, to be done in smaller changes as they move code around. Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData, which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not do anything and the class is gone now :) Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/types/qqmlconnections.cpp')
-rw-r--r--src/qml/types/qqmlconnections.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/qml/types/qqmlconnections.cpp b/src/qml/types/qqmlconnections.cpp
index 70f859ffe2..122056e653 100644
--- a/src/qml/types/qqmlconnections.cpp
+++ b/src/qml/types/qqmlconnections.cpp
@@ -203,54 +203,6 @@ void QQmlConnections::setIgnoreUnknownSignals(bool ignore)
d->ignoreUnknownSignals = ignore;
}
-
-
-QByteArray
-QQmlConnectionsParser::compile(const QList<QQmlCustomParserProperty> &props)
-{
- QByteArray rv;
- QDataStream ds(&rv, QIODevice::WriteOnly);
-
- for(int ii = 0; ii < props.count(); ++ii)
- {
- QString propName = props.at(ii).name();
- int propLine = props.at(ii).location().line;
- int propColumn = props.at(ii).location().column;
-
- if (!propName.startsWith(QLatin1String("on")) || !propName.at(2).isUpper()) {
- error(props.at(ii), QQmlConnections::tr("Cannot assign to non-existent property \"%1\"").arg(propName));
- return QByteArray();
- }
-
- QList<QVariant> values = props.at(ii).assignedValues();
-
- for (int i = 0; i < values.count(); ++i) {
- const QVariant &value = values.at(i);
-
- if (value.userType() == qMetaTypeId<QQmlCustomParserNode>()) {
- error(props.at(ii), QQmlConnections::tr("Connections: nested objects not allowed"));
- return QByteArray();
- } else if (value.userType() == qMetaTypeId<QQmlCustomParserProperty>()) {
- error(props.at(ii), QQmlConnections::tr("Connections: syntax error"));
- return QByteArray();
- } else {
- QQmlScript::Variant v = qvariant_cast<QQmlScript::Variant>(value);
- if (v.isScript()) {
- ds << propName;
- ds << v.asScript();
- ds << propLine;
- ds << propColumn;
- } else {
- error(props.at(ii), QQmlConnections::tr("Connections: script expected"));
- return QByteArray();
- }
- }
- }
- }
-
- return rv;
-}
-
QByteArray QQmlConnectionsParser::compile(const QV4::CompiledData::QmlUnit *qmlUnit, int objectIndex, const QList<const QV4::CompiledData::Binding *> &props)
{
Q_UNUSED(objectIndex)