summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-18 06:51:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-18 06:51:00 (GMT)
commita762bb1ead644e00290b2f4c023e96f5ef765d43 (patch)
treeef5cc23be286d2c6e771a04c64c32ca612dfea79 /src/corelib
parent6dcdab8d9ee66f420a525400d873cfccf78c7003 (diff)
parentfee38b5c766b0285ebd3283df0d1b29a978da316 (diff)
downloadQt-a762bb1ead644e00290b2f4c023e96f5ef765d43.zip
Qt-a762bb1ead644e00290b2f4c023e96f5ef765d43.tar.gz
Qt-a762bb1ead644e00290b2f4c023e96f5ef765d43.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (147 commits) Add missing semicolons. moc was confused and positionViewAtIndex not invokable. Use the correct base URL in resolveUri Remove timing sensitivity. Optimize id checking. Fix examples after 47fb07c9fdf47584ae55f3412102bbeef5576b04. Don't use QScriptValueIterator to iterate over arrays. Skip test, to be fixed. Only release the binding once we're finished with its memory Make it harder to accidentally delete a binding Adjust test now that redundant contexts are not create due Block modifications to internal QDeclarativeContexts Don't destroy cookie jar until while someone may be using it. Fix tests after 47fb07c9fdf47584ae55f3412102bbeef5576b04. Another fix to find Improve implicit "." import Fix auto test Fix type lookup with url Fix default values on Textinput Add an implicit import "." to types loaded from a local url Fix crash ...
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qresource.cpp8
-rw-r--r--src/corelib/kernel/qobject.cpp2
-rw-r--r--src/corelib/kernel/qobject_p.h1
3 files changed, 9 insertions, 2 deletions
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 6d33c8b..8e76e9e 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -1411,8 +1411,12 @@ QString QResourceFileEngine::fileName(FileName file) const
} else if(file == PathName || file == AbsolutePathName) {
const QString path = (file == AbsolutePathName) ? d->resource.absoluteFilePath() : d->resource.fileName();
const int slash = path.lastIndexOf(QLatin1Char('/'));
- if (slash != -1)
- return path.left(slash);
+ if (slash == -1)
+ return QLatin1String(":");
+ else if (slash <= 1)
+ return QLatin1String(":/");
+ return path.left(slash);
+
} else if(file == CanonicalName || file == CanonicalPathName) {
const QString absoluteFilePath = d->resource.absoluteFilePath();
if(file == CanonicalPathName) {
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 389e6e7..68f34ca 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -2033,6 +2033,8 @@ void QObjectPrivate::setParent_helper(QObject *o)
}
}
}
+ if (!wasDeleted && declarativeData)
+ declarativeData->parentChanged(q, o);
}
/*!
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index cc5bf97..20e3da1 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -90,6 +90,7 @@ class Q_CORE_EXPORT QDeclarativeData
public:
virtual ~QDeclarativeData();
virtual void destroyed(QObject *) = 0;
+ virtual void parentChanged(QObject *, QObject *) = 0;
};
class Q_CORE_EXPORT QObjectPrivate : public QObjectData