Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Idaaeba880a175166437e2a7266716c776c4483c6
This commit is contained in:
commit
58400a9011
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -2322,6 +2322,7 @@ void QQuickListView::setSnapMode(SnapMode mode)
|
|||
if (d->snapMode != mode) {
|
||||
d->snapMode = mode;
|
||||
emit snapModeChanged();
|
||||
d->fixupPosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ SUBDIRS=\
|
|||
particles \
|
||||
qmltest \
|
||||
qmldevtools \
|
||||
cmake
|
||||
cmake \
|
||||
installed_cmake
|
||||
|
||||
installed_cmake.depends = cmake
|
||||
|
||||
testcocoon: SUBDIRS -= headersclean
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
include(../cmake/cmake.pro)
|
||||
|
||||
CONFIG -= ctest_testcase
|
||||
CONFIG += ctest_testcase_installed
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue