aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 2a439bde98..c2915c840b 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -537,6 +537,10 @@ The following functions are also on the Qt object.
\li This is the application name set on the QCoreApplication instance. This property can be written
to in order to set the application name.
\row
+ \li \c application.displayName (since Qt 5.9)
+ \li This is the application display name set on the QGuiApplication instance. This property can be written
+ to in order to set the application display name.
+ \row
\li \c application.version
\li This is the application version set on the QCoreApplication instance. This property can be written
to in order to set the application version.
@@ -554,6 +558,18 @@ The following functions are also on the Qt object.
\li This read-only property can be used to determine whether or not the
platform supports multiple windows. Some embedded platforms do not support
multiple windows, for example.
+
+ \row
+ \li \c application.screens
+ \li An array containing the descriptions of all connected screens. The
+ elements of the array are objects with the same properties as the
+ \l{Screen} attached object. In practice the array corresponds to the screen
+ list returned by QGuiApplication::screens(). In addition to examining
+ properties like name, width, height, etc., the array elements can also be
+ assigned to the targetScreen property of Window items, thus serving as an
+ alternative to the C++ side's QWindow::setScreen(). This property has been
+ added in Qt 5.9.
+
\endtable
The object also has one signal, aboutToQuit(), which is the same as \l QCoreApplication::aboutToQuit().
@@ -570,6 +586,8 @@ The following functions are also on the Qt object.
\li application.layoutDirection
\li application.font
\endlist
+
+ \sa Screen, Window, Window.targetScreen
*/
/*!
@@ -1006,8 +1024,8 @@ QQmlEngine::~QQmlEngine()
// we do this here and not in the private dtor since otherwise a crash can
// occur (if we are the QObject parent of the QObject singleton instance)
// XXX TODO: performance -- store list of singleton types separately?
- QList<QQmlType*> singletonTypes = QQmlMetaType::qmlSingletonTypes();
- foreach (QQmlType *currType, singletonTypes)
+ const QList<QQmlType*> singletonTypes = QQmlMetaType::qmlSingletonTypes();
+ for (QQmlType *currType : singletonTypes)
currType->singletonInstanceInfo()->destroy(this);
delete d->rootContext;