aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/demos/maroon/content/SoundEffect.qml2
-rw-r--r--examples/quick/scenegraph/sgengine/window.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/quick/demos/maroon/content/SoundEffect.qml b/examples/quick/demos/maroon/content/SoundEffect.qml
index 136b33aa9b..4b723170a0 100644
--- a/examples/quick/demos/maroon/content/SoundEffect.qml
+++ b/examples/quick/demos/maroon/content/SoundEffect.qml
@@ -42,7 +42,7 @@ import QtQuick 2.0
//Proxies a SoundEffect if QtMultimedia is installed
Item {
id: container
- property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.0; SoundEffect{ source: '" + container.source + "'; muted: !Qt.application.active }", container);
+ property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.0; SoundEffect{ source: '" + container.source + "'; muted: Qt.application.state != Qt.ApplicationActive }", container);
property url source: ""
onSourceChanged: if (effect != null) effect.source = source;
function play() {
diff --git a/examples/quick/scenegraph/sgengine/window.cpp b/examples/quick/scenegraph/sgengine/window.cpp
index 759bbf1fcd..a73d9bf755 100644
--- a/examples/quick/scenegraph/sgengine/window.cpp
+++ b/examples/quick/scenegraph/sgengine/window.cpp
@@ -173,7 +173,7 @@ void Window::addItems()
QSGTexture *tex = textures[i%2];
QPointF fromPos(-tex->textureSize().width(), qrand() / float(RAND_MAX) * (height() - tex->textureSize().height()));
QPointF toPos(width(), qrand() / float(RAND_MAX) * height() * 1.5 - height() * 0.25);
- m_items.append(QSharedPointer<Item>(new Item(m_sgRootNode.data(), tex, fromPos, toPos)));
+ m_items.append(QSharedPointer<Item>::create(m_sgRootNode.data(), tex, fromPos, toPos));
}
update();
}