summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-04-14 06:01:14 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-04-14 06:01:14 (GMT)
commitfb1c371b643e44890c1eada5aba893d62d814e5a (patch)
tree52b0e68687c40826aad37b7a920a7338b82228d0 /src
parent6f613c3771a93f74462c6cb7ad105f258a112a4f (diff)
parent2bacca7ed7fc2d2cd5c3bfdd2b6b93a840d84341 (diff)
downloadQt-fb1c371b643e44890c1eada5aba893d62d814e5a.zip
Qt-fb1c371b643e44890c1eada5aba893d62d814e5a.tar.gz
Qt-fb1c371b643e44890c1eada5aba893d62d814e5a.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp4
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp6
-rw-r--r--src/declarative/qml/qdeclarativecontext.h1
-rw-r--r--src/declarative/util/qdeclarativesmoothedfollow.cpp2
-rw-r--r--src/declarative/util/qdeclarativeview.cpp8
-rw-r--r--src/imports/multimedia/qdeclarativeaudio.cpp2
-rw-r--r--src/imports/multimedia/qdeclarativevideo.cpp2
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp2
-rw-r--r--src/multimedia/effects/qsoundeffect.cpp2
9 files changed, 20 insertions, 9 deletions
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 0c824fc..bbce8a6 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -285,10 +285,8 @@ void QDeclarativeCompiledBindingsPrivate::run(Binding *binding, QDeclarativeProp
return;
QDeclarativeContextData *context = q->QDeclarativeAbstractExpression::context();
- if (!context) {
- qWarning("QDeclarativeCompiledBindings: Attempted to evaluate an expression in an invalid context");
+ if (!context)
return;
- }
if (!context->engine)
return;
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index e180374..d319e8f 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -320,6 +320,9 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, QObject
Create a QDeclarativeComponent from the given \a url and give it the
specified \a parent and \a engine.
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
+
\sa loadUrl()
*/
QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QUrl &url, QObject *parent)
@@ -409,6 +412,9 @@ QDeclarativeContext *QDeclarativeComponent::creationContext() const
/*!
Load the QDeclarativeComponent from the provided \a url.
+
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
*/
void QDeclarativeComponent::loadUrl(const QUrl &url)
{
diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h
index a349628..11b4771 100644
--- a/src/declarative/qml/qdeclarativecontext.h
+++ b/src/declarative/qml/qdeclarativecontext.h
@@ -46,6 +46,7 @@
#include <QtCore/qobject.h>
#include <QtScript/qscriptvalue.h>
#include <QtCore/qmetatype.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/util/qdeclarativesmoothedfollow.cpp b/src/declarative/util/qdeclarativesmoothedfollow.cpp
index 63c9618..9f155fc 100644
--- a/src/declarative/util/qdeclarativesmoothedfollow.cpp
+++ b/src/declarative/util/qdeclarativesmoothedfollow.cpp
@@ -86,7 +86,7 @@ public:
The follow example shows one rectangle tracking the position of another.
\code
-import Qt 4.6
+import Qt 4.7
Rectangle {
width: 800; height: 600; color: "blue"
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 22a7873..c0425ef 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -204,7 +204,7 @@ void QDeclarativeViewPrivate::execute()
QDeclarativeView *view = new QDeclarativeView(this);
vbox->addWidget(view);
- QUrl url(fileName);
+ QUrl url = QUrl::fromLocalFile(fileName);
view->setSource(url);
view->show();
\endcode
@@ -279,11 +279,17 @@ QDeclarativeView::~QDeclarativeView()
\brief The URL of the source of the QML component.
Changing this property causes the QML component to be reloaded.
+
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
*/
/*!
Sets the source to the \a url, loads the QML component and instantiates it.
+ Ensure that the URL provided is full and correct, in particular, use
+ \l QUrl::fromLocalFile() when loading a file from the local filesystem.
+
Calling this methods multiple times with the same url will result
in the QML being reloaded.
*/
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp
index 8d2dc61..82d5d89 100644
--- a/src/imports/multimedia/qdeclarativeaudio.cpp
+++ b/src/imports/multimedia/qdeclarativeaudio.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
This element is part of the \bold{Qt.multimedia 4.7} module.
\qml
- import Qt 4.6
+ import Qt 4.7
import Qt.multimedia 4.7
Audio { source: "audio/song.mp3" }
diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp
index bf112be..c6ae272 100644
--- a/src/imports/multimedia/qdeclarativevideo.cpp
+++ b/src/imports/multimedia/qdeclarativevideo.cpp
@@ -76,7 +76,7 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
This element is part of the \bold{Qt.multimedia 4.7} module.
\qml
- import Qt 4.6
+ import Qt 4.7
import Qt.multimedia 4.7
Video { source: "video/movie.mpg" }
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index ad6a512..d17a8a1 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -644,7 +644,7 @@ void QDeclarativeParticlesPrivate::updateOpacity(QDeclarativeParticle &p, int ag
snow, the lower one has particles expelled up like a fountain.
\qml
-import Qt 4.6
+import Qt 4.7
import Qt.labs.particles 1.0
Rectangle {
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp
index 8a38103..d34e532 100644
--- a/src/multimedia/effects/qsoundeffect.cpp
+++ b/src/multimedia/effects/qsoundeffect.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
The following example plays a wav file on mouse click.
\qml
- import Qt 4.6
+ import Qt 4.7
import Qt.multimedia 4.7
Item {