aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/quick/window/Splash.qml6
-rw-r--r--src/qml/types/qqmllistmodel.cpp18
-rw-r--r--src/quick/doc/src/concepts/effects/topic.qdoc2
-rw-r--r--src/quick/items/qquicklistview.cpp1
-rw-r--r--src/quick/scenegraph/util/qsgtexture.cpp2
-rw-r--r--tests/auto/auto.pro5
-rw-r--r--tests/auto/installed_cmake/installed_cmake.pro4
-rw-r--r--tools/qmlscene/main.cpp23
8 files changed, 33 insertions, 28 deletions
diff --git a/examples/quick/window/Splash.qml b/examples/quick/window/Splash.qml
index c981bd2585..995e264f8b 100644
--- a/examples/quick/window/Splash.qml
+++ b/examples/quick/window/Splash.qml
@@ -44,9 +44,6 @@ import QtQuick.Window 2.1
//! [splash-properties]
Window {
id: splash
- visible: true
- width: splashImage.width
- height: splashImage.height
color: "transparent"
title: "Splash Window"
modality: Qt.ApplicationModal
@@ -58,6 +55,8 @@ Window {
x: (Screen.width - splashImage.width) / 2
y: (Screen.height - splashImage.height) / 2
//! [screen-properties]
+ width: splashImage.width
+ height: splashImage.height
Image {
id: splashImage
@@ -76,4 +75,5 @@ Window {
}
}
//! [timer]
+ Component.onCompleted: visible = true
}
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index 0cfd9c6ccb..b60248fe33 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -1854,7 +1854,7 @@ int QQmlListModel::count() const
}
/*!
- \qmlmethod QtQml2::ListModel::clear()
+ \qmlmethod ListModel::clear()
Deletes all content from the model.
@@ -1876,7 +1876,7 @@ void QQmlListModel::clear()
}
/*!
- \qmlmethod QtQml2::ListModel::remove(int index, int count = 1)
+ \qmlmethod ListModel::remove(int index, int count = 1)
Deletes the content at \a index from the model.
@@ -1910,7 +1910,7 @@ void QQmlListModel::remove(QQmlV8Function *args)
}
/*!
- \qmlmethod QtQml2::ListModel::insert(int index, jsobject dict)
+ \qmlmethod ListModel::insert(int index, jsobject dict)
Adds a new item to the list model at position \a index, with the
values in \a dict.
@@ -1971,7 +1971,7 @@ void QQmlListModel::insert(QQmlV8Function *args)
}
/*!
- \qmlmethod QtQml2::ListModel::move(int from, int to, int n)
+ \qmlmethod ListModel::move(int from, int to, int n)
Moves \a n items \a from one position \a to another.
@@ -2024,7 +2024,7 @@ void QQmlListModel::move(int from, int to, int n)
}
/*!
- \qmlmethod QtQml2::ListModel::append(jsobject dict)
+ \qmlmethod ListModel::append(jsobject dict)
Adds a new item to the end of the list model, with the
values in \a dict.
@@ -2078,7 +2078,7 @@ void QQmlListModel::append(QQmlV8Function *args)
}
/*!
- \qmlmethod object QtQml2::ListModel::get(int index)
+ \qmlmethod object ListModel::get(int index)
Returns the item at \a index in the list model. This allows the item
data to be accessed or modified from JavaScript:
@@ -2128,7 +2128,7 @@ QQmlV8Handle QQmlListModel::get(int index) const
}
/*!
- \qmlmethod QtQml2::ListModel::set(int index, jsobject dict)
+ \qmlmethod ListModel::set(int index, jsobject dict)
Changes the item at \a index in the list model with the
values in \a dict. Properties not appearing in \a dict
@@ -2183,7 +2183,7 @@ void QQmlListModel::set(int index, const QQmlV8Handle &handle)
}
/*!
- \qmlmethod QtQml2::ListModel::setProperty(int index, string property, variant value)
+ \qmlmethod ListModel::setProperty(int index, string property, variant value)
Changes the \a property of the item at \a index in the list model to \a value.
@@ -2226,7 +2226,7 @@ void QQmlListModel::setProperty(int index, const QString& property, const QVaria
}
/*!
- \qmlmethod QtQml2::ListModel::sync()
+ \qmlmethod ListModel::sync()
Writes any unsaved changes to the list model after it has been modified
from a worker script.
diff --git a/src/quick/doc/src/concepts/effects/topic.qdoc b/src/quick/doc/src/concepts/effects/topic.qdoc
index 42b0291e44..bf713c2259 100644
--- a/src/quick/doc/src/concepts/effects/topic.qdoc
+++ b/src/quick/doc/src/concepts/effects/topic.qdoc
@@ -35,7 +35,7 @@
Visually appealing user-interfaces are more engaging than lacklustre ones.
That said, the designer must bear in mind that visual effects simply provide
-a useful way to subtlely communicate to the user (for example, which visual
+a useful way to subtly communicate to the user (for example, which visual
item is active, or how focus is being transferred). Over-use of visual
effects can actually detract from the user-experience.
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index dfdd27e118..f0e39c5e5a 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -2322,6 +2322,7 @@ void QQuickListView::setSnapMode(SnapMode mode)
if (d->snapMode != mode) {
d->snapMode = mode;
emit snapModeChanged();
+ d->fixupPosition();
}
}
diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp
index 078c86b27f..f17aa59e3e 100644
--- a/src/quick/scenegraph/util/qsgtexture.cpp
+++ b/src/quick/scenegraph/util/qsgtexture.cpp
@@ -222,7 +222,7 @@ static void qt_debug_remove_texture(QSGTexture* texture)
\section1 Texture Atlasses
- Some scene graph backens use texture atlasses, grouping multiple
+ Some scene graph backends use texture atlasses, grouping multiple
small textures into one large texture. If this is the case, the
function isAtlasTexture() will return true. Atlasses are used to
aid the rendering algorithm to do better sorting which increases
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 7f9281c70f..b64fc073ba 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -6,6 +6,9 @@ SUBDIRS=\
particles \
qmltest \
qmldevtools \
- cmake
+ cmake \
+ installed_cmake
+
+installed_cmake.depends = cmake
testcocoon: SUBDIRS -= headersclean
diff --git a/tests/auto/installed_cmake/installed_cmake.pro b/tests/auto/installed_cmake/installed_cmake.pro
new file mode 100644
index 0000000000..14d0b283d6
--- /dev/null
+++ b/tests/auto/installed_cmake/installed_cmake.pro
@@ -0,0 +1,4 @@
+include(../cmake/cmake.pro)
+
+CONFIG -= ctest_testcase
+CONFIG += ctest_testcase_installed
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 8a48445d63..244e0af4ac 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -44,6 +44,8 @@
#include <QtCore/qdir.h>
#include <QtCore/qmath.h>
#include <QtCore/qdatetime.h>
+#include <QtCore/qpointer.h>
+#include <QtCore/qscopedpointer.h>
#include <QtGui/QGuiApplication>
@@ -461,7 +463,7 @@ int main(int argc, char ** argv)
// TODO: as soon as the engine construction completes, the debug service is
// listening for connections. But actually we aren't ready to debug anything.
QQmlEngine engine;
- QQmlComponent *component = new QQmlComponent(&engine);
+ QPointer<QQmlComponent> component = new QQmlComponent(&engine);
for (int i = 0; i < imports.size(); ++i)
engine.addImportPath(imports.at(i));
for (int i = 0; i < bundles.size(); ++i)
@@ -481,15 +483,14 @@ int main(int argc, char ** argv)
}
QObject *topLevel = component->create();
- QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
- QQuickView* qxView = 0;
+ QScopedPointer<QQuickWindow> window(qobject_cast<QQuickWindow *>(topLevel));
if (window) {
engine.setIncubationController(window->incubationController());
} else {
QQuickItem *contentItem = qobject_cast<QQuickItem *>(topLevel);
if (contentItem) {
- qxView = new QQuickView(&engine, NULL);
- window = qxView;
+ QQuickView* qxView = new QQuickView(&engine, NULL);
+ window.reset(qxView);
// Set window default properties; the qml can still override them
QString oname = contentItem->objectName();
window->setTitle(oname.isEmpty() ? QString::fromLatin1("qmlscene") : QString::fromLatin1("qmlscene: ") + oname);
@@ -534,14 +535,10 @@ int main(int argc, char ** argv)
#ifdef QML_RUNTIME_TESTING
RenderStatistics::printTotalStats();
#endif
- // Ready to exit. If we created qxView, it owns the component;
- // otherwise, the ownership is still right here. Nobody deletes the engine
- // (which is odd since the container constructor takes the engine pointer),
- // but it's stack-allocated anyway.
- if (qxView)
- delete qxView;
- else
- delete component;
+ // Ready to exit. Notice that the component might be owned by
+ // QQuickView if one was created. That case is tracked by
+ // QPointer, so it is safe to delete the component here.
+ delete component;
}
}