aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/particles/qquickcustomparticle.cpp5
-rw-r--r--src/particles/qquickimageparticle.cpp5
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.cpp5
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.h1
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickview.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp4
-rw-r--r--src/qml/doc/src/modules/identifiedmodules.qdoc4
-rw-r--r--src/qml/doc/src/syntax/imports.qdoc6
-rw-r--r--src/qml/qml/qqmlcomponent.cpp7
-rw-r--r--src/qml/qml/qqmlengine.cpp8
-rw-r--r--src/qml/qml/qqmlimport.cpp6
-rw-r--r--src/qml/qml/qqmlmetatype.cpp4
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp5
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h1
-rw-r--r--src/qml/qml/v8/qv8engine_p.h2
-rw-r--r--src/qmltest/quicktest.cpp4
-rw-r--r--src/quick/doc/src/appdevguide/porting.qdoc2
-rw-r--r--src/quick/doc/src/appdevguide/qtquicktest.qdoc3
-rw-r--r--src/quick/items/qquickflickable.cpp19
-rw-r--r--src/quick/items/qquickflickable_p_p.h2
-rw-r--r--src/quick/items/qquickitem.h2
-rw-r--r--src/quick/items/qquicktextinput.cpp3
-rw-r--r--src/quick/items/qquickthreadedwindowmanager.cpp12
-rw-r--r--src/quick/items/qquickthreadedwindowmanager_p.h1
-rw-r--r--src/quick/items/qquickview.cpp25
-rw-r--r--src/quick/items/qquickview.h2
-rw-r--r--src/quick/items/qquickwindow.cpp46
-rw-r--r--src/quick/items/qquickwindowmanager.cpp7
-rw-r--r--src/quick/util/qquickapplication.cpp7
-rw-r--r--src/quick/util/qquickapplication_p.h2
30 files changed, 149 insertions, 53 deletions
diff --git a/src/particles/qquickcustomparticle.cpp b/src/particles/qquickcustomparticle.cpp
index 83eb8c0853..80e2118bde 100644
--- a/src/particles/qquickcustomparticle.cpp
+++ b/src/particles/qquickcustomparticle.cpp
@@ -60,7 +60,12 @@ static const char qt_particles_template_vertex_code[] =
" highp float size = qt_ParticleData.z;\n"
" highp float endSize = qt_ParticleData.w;\n"
" highp float t = (qt_Timestamp - qt_ParticleData.x) / qt_ParticleData.y;\n"
+#if !defined(Q_OS_BLACKBERRY)
" highp float currentSize = mix(size, endSize, t * t);\n"
+#else
+ " highp float mixWorkaround = (endSize - size) * t * t;\n"
+ " highp float currentSize = mixWorkaround + size;\n"
+#endif
" if (t < 0. || t > 1.)\n"
" currentSize = 0.;\n"
" highp vec2 pos = qt_ParticlePos\n"
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp
index 4f8c5a091c..1ba9192273 100644
--- a/src/particles/qquickimageparticle.cpp
+++ b/src/particles/qquickimageparticle.cpp
@@ -127,7 +127,12 @@ static const char vertexShaderCode[] =
"#elif defined(DEFORM)\n"
" fTex = vPosTex.zw;\n"
"#endif\n"
+#if !defined(Q_OS_BLACKBERRY)
" highp float currentSize = mix(vData.z, vData.w, t * t);\n"
+#else
+ " highp float mixWorkaround = (vData.w - vData.z) * t * t;\n"
+ " highp float currentSize = mixWorkaround + vData.z;\n"
+#endif
" lowp float fade = 1.;\n"
" highp float fadeIn = min(t * 10., 1.);\n"
" highp float fadeOut = 1. - clamp((t - 0.75) * 4.,0., 1.);\n"
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
index 4c226e829b..2d41379940 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
@@ -268,6 +268,11 @@ QVariant QAccessibleQuickItemValueInterface::minimumValue() const
return item()->property("minimumValue");
}
+QVariant QAccessibleQuickItemValueInterface::minimumStepSize() const
+{
+ return item()->property("stepSize");
+}
+
/*!
\internal
Shared between QAccessibleQuickItem and QAccessibleQuickView
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.h b/src/plugins/accessible/quick/qaccessiblequickitem.h
index ae863e3faa..0d31749ee0 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.h
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.h
@@ -91,6 +91,7 @@ public:
void setCurrentValue(const QVariant &value);
QVariant maximumValue() const;
QVariant minimumValue() const;
+ QVariant minimumStepSize() const;
};
#endif // QT_NO_ACCESSIBILITY
diff --git a/src/plugins/accessible/quick/qaccessiblequickview.cpp b/src/plugins/accessible/quick/qaccessiblequickview.cpp
index 764db834d2..0106a3d68b 100644
--- a/src/plugins/accessible/quick/qaccessiblequickview.cpp
+++ b/src/plugins/accessible/quick/qaccessiblequickview.cpp
@@ -107,7 +107,7 @@ QString QAccessibleQuickView::text(QAccessible::Text text) const
#else
Q_UNUSED(text)
#endif
- return view()->windowTitle();
+ return view()->title();
}
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
index 4f6ee51c5d..12550168f0 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
@@ -171,13 +171,13 @@ QWindow *getMasterWindow(QWindow *w)
Qt::WindowFlags QQuickViewInspector::windowFlags() const
{
- return getMasterWindow(m_view)->windowFlags();
+ return getMasterWindow(m_view)->flags();
}
void QQuickViewInspector::setWindowFlags(Qt::WindowFlags flags)
{
QWindow *w = getMasterWindow(m_view);
- w->setWindowFlags(flags);
+ w->setFlags(flags);
// make flags are applied
w->setVisible(false);
w->setVisible(true);
diff --git a/src/qml/doc/src/modules/identifiedmodules.qdoc b/src/qml/doc/src/modules/identifiedmodules.qdoc
index 87d4c42d6d..4972e038d7 100644
--- a/src/qml/doc/src/modules/identifiedmodules.qdoc
+++ b/src/qml/doc/src/modules/identifiedmodules.qdoc
@@ -175,13 +175,13 @@ An identified module has several restrictions upon it:
\endlist
For example, if an identified module is installed into
-\c{$QML_IMPORT_PATH/ExampleModule}, the module identifier directive must be:
+\c{$QML2_IMPORT_PATH/ExampleModule}, the module identifier directive must be:
\code
module ExampleModule
\endcode
If the strict module is installed into
-\c{$QML_IMPORT_PATH/com/example/CustomUi}, the module identifier directive
+\c{$QML2_IMPORT_PATH/com/example/CustomUi}, the module identifier directive
must be:
\code
module com.example.CustomUi
diff --git a/src/qml/doc/src/syntax/imports.qdoc b/src/qml/doc/src/syntax/imports.qdoc
index e449f3b61a..db934f39a6 100644
--- a/src/qml/doc/src/syntax/imports.qdoc
+++ b/src/qml/doc/src/syntax/imports.qdoc
@@ -289,12 +289,12 @@ default locations to be searched by the engine. By default, this list contains:
\list
\li The directory of the current file
-\li The location specified by QLibraryInfo::ImportsPath
-\li Paths specified by the \c QML_IMPORT_PATH environment variable
+\li The location specified by QLibraryInfo::Qml2ImportsPath
+\li Paths specified by the \c QML2_IMPORT_PATH environment variable
\endlist
Additional import paths can be added through QQmlEngine::addImportPath() or the
-\c QML_IMPORT_PATH environment variable. When running the
+\c QML2_IMPORT_PATH environment variable. When running the
\l{Prototyping with qmlscene}{qmlscene} tool, you can also use the \c -I option
to add an import path.
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 679e54c122..bc9669c987 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -783,7 +783,7 @@ QObject *QQmlComponent::create(QQmlContext *context)
}
/*!
- This method provides more advanced control over component instance creation.
+ This method provides advanced control over component instance creation.
In general, programmers should use QQmlComponent::create() to create a
component.
@@ -932,11 +932,12 @@ void QQmlComponentPrivate::complete(QQmlEnginePrivate *enginePriv, ConstructionS
}
/*!
- This method provides more advanced control over component instance creation.
+ This method provides advanced control over component instance creation.
In general, programmers should use QQmlComponent::create() to create a
component.
- Complete a component creation begin with QQmlComponent::beginCreate().
+ This function completes the component creation begun with QQmlComponent::beginCreate()
+ and must be called afterwards.
\sa beginCreate()
*/
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index b4962a6b1d..f0bf6e4e20 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1670,8 +1670,8 @@ void QQmlEngine::addImportPath(const QString& path)
type version mapping and possibly QML extensions plugins.
By default, the list contains the directory of the application executable,
- paths specified in the \c QML_IMPORT_PATH environment variable,
- and the builtin \c ImportsPath from QLibraryInfo.
+ paths specified in the \c QML2_IMPORT_PATH environment variable,
+ and the builtin \c Qml2ImportsPath from QLibraryInfo.
\sa addImportPath(), setImportPathList()
*/
@@ -1686,8 +1686,8 @@ QStringList QQmlEngine::importPathList() const
installed modules in a URL-based directory structure.
By default, the list contains the directory of the application executable,
- paths specified in the \c QML_IMPORT_PATH environment variable,
- and the builtin \c ImportsPath from QLibraryInfo.
+ paths specified in the \c QML2_IMPORT_PATH environment variable,
+ and the builtin \c Qml2ImportsPath from QLibraryInfo.
\sa importPathList(), addImportPath()
*/
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index 0b07705cec..7a2f4eaf34 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -1320,13 +1320,13 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
{
filePluginPath << QLatin1String(".");
- // Search order is applicationDirPath(), $QML_IMPORT_PATH, QLibraryInfo::ImportsPath
+ // Search order is applicationDirPath(), $QML2_IMPORT_PATH, QLibraryInfo::Qml2ImportsPath
- QString installImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath);
+ QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
addImportPath(installImportsPath);
// env import paths
- QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
+ QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
if (!envImportPath.isEmpty()) {
#if defined(Q_OS_WIN)
QLatin1Char pathSep(';');
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 1fdc1b95f1..595f9e8de0 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -139,6 +139,10 @@ QQmlMetaTypeData::~QQmlMetaTypeData()
{
for (int i = 0; i < types.count(); ++i)
delete types.at(i);
+
+ TypeModules::const_iterator i = uriToModule.constBegin();
+ for (; i != uriToModule.constEnd(); ++i)
+ delete *i;
}
class QQmlTypePrivate
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index c1c4a6c03d..8b023855ab 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -549,6 +549,11 @@ QQmlPropertyCache *QQmlPropertyCache::parent() const
return _parent;
}
+void QQmlPropertyCache::setParent(QQmlPropertyCache *newParent)
+{
+ _parent = newParent;
+}
+
// Returns the first C++ type's QMetaObject - that is, the first QMetaObject not created by
// QML
const QMetaObject *QQmlPropertyCache::firstCppMetaObject() const
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 14be99045f..2804f66dbe 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -294,6 +294,7 @@ public:
QString defaultPropertyName() const;
QQmlPropertyData *defaultProperty() const;
QQmlPropertyCache *parent() const;
+ void setParent(QQmlPropertyCache *newParent);
inline QQmlPropertyData *overrideData(QQmlPropertyData *) const;
inline bool isAllowedInRevision(QQmlPropertyData *) const;
diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h
index 1c107bd9bf..8320a89706 100644
--- a/src/qml/qml/v8/qv8engine_p.h
+++ b/src/qml/qml/v8/qv8engine_p.h
@@ -86,7 +86,7 @@
namespace v8 {
// Needed for V8ObjectSet
-inline uint qHash(const v8::Handle<v8::Object> &object, uint seed)
+inline uint qHash(const v8::Handle<v8::Object> &object, uint seed = 0)
{
return (object->GetIdentityHash() ^ seed);
}
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index d622ac9497..614dde3f6c 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -269,7 +269,7 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD
// Scan through all of the "tst_*.qml" files and run each of them
// in turn with a QQuickView.
QQuickView *view = new QQuickView;
- view->setWindowFlags(Qt::Window | Qt::WindowSystemMenuHint
+ view->setFlags(Qt::Window | Qt::WindowSystemMenuHint
| Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint
| Qt::WindowCloseButtonHint);
QTestRootObject rootobj;
@@ -288,7 +288,7 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD
continue;
view->setObjectName(fi.baseName());
- view->setWindowTitle(view->objectName());
+ view->setTitle(view->objectName());
rootobj.setHasTestCase(false);
rootobj.setWindowShown(false);
rootobj.hasQuit = false;
diff --git a/src/quick/doc/src/appdevguide/porting.qdoc b/src/quick/doc/src/appdevguide/porting.qdoc
index 3ac13cd255..6bb2a75074 100644
--- a/src/quick/doc/src/appdevguide/porting.qdoc
+++ b/src/quick/doc/src/appdevguide/porting.qdoc
@@ -190,7 +190,7 @@ new applications.)
\section3 QDeclarativeItem and QDeclarativeView
When porting to QQuickItem, note that QDeclarativeItem inherited from QGraphicsItem; in contrast,
-QQuickItem inherits directly from QObject, and any QGraphicsItem-specific functionality is longer
+QQuickItem inherits directly from QObject, and any QGraphicsItem-specific functionality is no longer
available. In particular, QQuickItem does not have a \c paint() method for performing custom
rendering through the QPainter API. Instead, in Qt 5, custom rendering should be performed through
the new \c QSG* classes to take full advantage of the scene graph. See the \l {Qt Quick Scene Graph}
diff --git a/src/quick/doc/src/appdevguide/qtquicktest.qdoc b/src/quick/doc/src/appdevguide/qtquicktest.qdoc
index 4db6f4ba58..c577a90be1 100644
--- a/src/quick/doc/src/appdevguide/qtquicktest.qdoc
+++ b/src/quick/doc/src/appdevguide/qtquicktest.qdoc
@@ -95,9 +95,6 @@
tst_example -input /mnt/SDCard/qmltests
\endcode
- See \c{tests/qmlauto} in the source tree for an example of creating a
- test harness that uses the \c{QUICK_TEST_SOURCE_DIR} macro.
-
If your test case needs QML imports, then you can add them as
\c{-import} options to the the test program command-line by adding
the following line to your .pro file:
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index a15f77d3ce..a0bd1fab8e 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -974,10 +974,10 @@ void QQuickFlickablePrivate::handleMousePressEvent(QMouseEvent *event)
hData.reset();
vData.reset();
- hData.dragMinBound = q->minXExtent();
- vData.dragMinBound = q->minYExtent();
- hData.dragMaxBound = q->maxXExtent();
- vData.dragMaxBound = q->maxYExtent();
+ hData.dragMinBound = q->minXExtent() - hData.startMargin;
+ vData.dragMinBound = q->minYExtent() - vData.startMargin;
+ hData.dragMaxBound = q->maxXExtent() + hData.endMargin;
+ vData.dragMaxBound = q->maxYExtent() + vData.endMargin;
fixupMode = Normal;
lastPos = QPointF();
pressPos = event->localPos();
@@ -1021,8 +1021,11 @@ void QQuickFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event)
if (!vMoved)
vData.dragStartOffset = dy;
qreal newY = dy + vData.pressPos - vData.dragStartOffset;
- const qreal minY = vData.dragMinBound;
- const qreal maxY = vData.dragMaxBound;
+ // Recalculate bounds in case margins have changed, but use the content
+ // size estimate taken at the start of the drag in case the drag causes
+ // the estimate to be altered
+ const qreal minY = vData.dragMinBound + vData.startMargin;
+ const qreal maxY = vData.dragMaxBound - vData.endMargin;
if (newY > minY)
newY = minY + (newY - minY) / 2;
if (newY < maxY && maxY - minY <= 0)
@@ -1055,8 +1058,8 @@ void QQuickFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event)
if (!hMoved)
hData.dragStartOffset = dx;
qreal newX = dx + hData.pressPos - hData.dragStartOffset;
- const qreal minX = hData.dragMinBound;
- const qreal maxX = hData.dragMaxBound;
+ const qreal minX = hData.dragMinBound + hData.startMargin;
+ const qreal maxX = hData.dragMaxBound - hData.endMargin;
if (newX > minX)
newX = minX + (newX - minX) / 2;
if (newX < maxX && maxX - minX <= 0)
diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h
index ab5f03f34d..ac1ecdb3cb 100644
--- a/src/quick/items/qquickflickable_p_p.h
+++ b/src/quick/items/qquickflickable_p_p.h
@@ -104,7 +104,7 @@ public:
, viewSize(-1), startMargin(0), endMargin(0)
, origin(0)
, transitionTo(0)
- , continuousFlickVelocity(0), vTime(0)
+ , continuousFlickVelocity(0), velocityTime(), vTime(0)
, smoothVelocity(fp), atEnd(false), atBeginning(true)
, transitionToSet(false)
, fixingUp(false), inOvershoot(false), moving(false), flicking(false)
diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h
index fa6aa62907..af79a08b1c 100644
--- a/src/quick/items/qquickitem.h
+++ b/src/quick/items/qquickitem.h
@@ -139,7 +139,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus
Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
- Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // XXX todo - notify?
+ Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // deprecated - see QTBUG-26423
Q_PROPERTY(QQmlListProperty<QQuickTransform> transform READ transform DESIGNABLE false FINAL)
Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 22551c9d4c..88e6d750eb 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -2698,6 +2698,9 @@ void QQuickTextInputPrivate::updateLayout()
option.setTextDirection(layoutDirection());
option.setWrapMode(QTextOption::WrapMode(wrapMode));
option.setAlignment(Qt::Alignment(q->effectiveHAlign()));
+ if (!qmlDisableDistanceField())
+ option.setUseDesignMetrics(renderType != QQuickTextInput::NativeRendering);
+
m_textLayout.setTextOption(option);
m_textLayout.setFont(font);
diff --git a/src/quick/items/qquickthreadedwindowmanager.cpp b/src/quick/items/qquickthreadedwindowmanager.cpp
index fac4fb034f..4c38686298 100644
--- a/src/quick/items/qquickthreadedwindowmanager.cpp
+++ b/src/quick/items/qquickthreadedwindowmanager.cpp
@@ -184,6 +184,7 @@ void QQuickRenderThreadSingleContextWindowManager::handleAddedWindow(QQuickWindo
data->sizeWasChanged = false;
data->windowSize = window->size();
data->isVisible = window->isVisible();
+ data->isRenderable = QQuickWindowPrivate::get(window)->isRenderable();
m_rendered_windows[window] = data;
isExternalUpdatePending = true;
@@ -397,7 +398,9 @@ void QQuickRenderThreadSingleContextWindowManager::run()
WindowData *windowData = it.value();
QQuickWindowPrivate *windowPrivate = QQuickWindowPrivate::get(window);
- if (windowPrivate->isRenderable()) {
+ windowData->isRenderable = windowPrivate->isRenderable();
+
+ if (windowData->isRenderable) {
gl->makeCurrent(window);
if (windowData->viewportSize != windowData->windowSize) {
@@ -410,10 +413,6 @@ void QQuickRenderThreadSingleContextWindowManager::run()
}
windowPrivate->syncSceneGraph();
- } else {
- qWarning().nospace()
- << "Non-renderable window " << window
- << " (" << window->geometry() << ").";
}
}
inSync = false;
@@ -435,6 +434,9 @@ void QQuickRenderThreadSingleContextWindowManager::run()
WindowData *windowData = it.value();
QQuickWindowPrivate *windowPrivate = QQuickWindowPrivate::get(window);
+ if (!windowData->isRenderable)
+ continue;
+
#ifdef THREAD_DEBUG
printf(" RenderThread: Rendering window %p\n", window);
#endif
diff --git a/src/quick/items/qquickthreadedwindowmanager_p.h b/src/quick/items/qquickthreadedwindowmanager_p.h
index 9e28d87eef..b71620f933 100644
--- a/src/quick/items/qquickthreadedwindowmanager_p.h
+++ b/src/quick/items/qquickthreadedwindowmanager_p.h
@@ -159,6 +159,7 @@ private:
uint sizeWasChanged : 1;
uint isVisible : 1;
+ uint isRenderable : 1;
};
QHash<QQuickWindow *, WindowData *> m_rendered_windows;
diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp
index 7182e74c0c..befba37515 100644
--- a/src/quick/items/qquickview.cpp
+++ b/src/quick/items/qquickview.cpp
@@ -236,6 +236,31 @@ void QQuickView::setSource(const QUrl& url)
}
/*!
+ \internal
+
+ Set the source \a url, \a component and content \a item (root of the QML object hierarchy) directly.
+ */
+void QQuickView::setContent(const QUrl& url, QQmlComponent *component, QObject* item)
+{
+ Q_D(QQuickView);
+ d->source = url;
+ d->component = component;
+
+ if (d->component && d->component->isError()) {
+ QList<QQmlError> errorList = d->component->errors();
+ foreach (const QQmlError &error, errorList) {
+ QMessageLogger(error.url().toString().toLatin1().constData(), error.line(), 0).warning()
+ << error;
+ }
+ emit statusChanged(status());
+ return;
+ }
+
+ d->setRootObject(item);
+ emit statusChanged(status());
+}
+
+/*!
Returns the source URL, if set.
\sa setSource()
diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h
index 756890e7ec..4a885bc993 100644
--- a/src/quick/items/qquickview.h
+++ b/src/quick/items/qquickview.h
@@ -54,6 +54,7 @@ class QQmlEngine;
class QQmlContext;
class QQmlError;
class QQuickItem;
+class QQmlComponent;
class QQuickViewPrivate;
class Q_QUICK_EXPORT QQuickView : public QQuickWindow
@@ -90,6 +91,7 @@ public:
public Q_SLOTS:
void setSource(const QUrl&);
+ void setContent(const QUrl& url, QQmlComponent *component, QObject *item);
Q_SIGNALS:
void statusChanged(QQuickView::Status);
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index f03a2c9a64..4ea31a0d6f 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1093,14 +1093,6 @@ QQuickItem *QQuickWindow::mouseGrabberItem() const
}
-/*!
- \qmlproperty color QtQuick.Window2::Window::color
-
- The background color for the window.
-
- Setting this property is more efficient than using a separate Rectangle.
-*/
-
bool QQuickWindowPrivate::clearHover()
{
Q_Q(QQuickWindow);
@@ -2004,7 +1996,11 @@ bool QQuickWindowPrivate::isRenderable() const
{
if (geometry.width() <= 0 || geometry.height() <= 0)
return false;
- return visible || (renderWithoutShowing && platformWindow);
+ // Change to be applied after the visibility property is integrated in qtbase:
+// return visibility != QWindow::Hidden || (renderWithoutShowing && platformWindow);
+ // Temporary version which is implementation-agnostic but slightly less efficient:
+ const QQuickWindow *q = q_func();
+ return q->isVisible() || (renderWithoutShowing && platformWindow);
}
/*!
@@ -2474,7 +2470,7 @@ QOpenGLContext *QQuickWindow::openglContext() const
void QQuickWindow::setRenderTarget(QOpenGLFramebufferObject *fbo)
{
Q_D(QQuickWindow);
- if (d->context && d->context && QThread::currentThread() != d->context->thread()) {
+ if (d->context && QThread::currentThread() != d->context->thread()) {
qWarning("QQuickWindow::setRenderThread: Cannot set render target from outside the rendering thread");
return;
}
@@ -2506,7 +2502,7 @@ void QQuickWindow::setRenderTarget(QOpenGLFramebufferObject *fbo)
void QQuickWindow::setRenderTarget(uint fboId, const QSize &size)
{
Q_D(QQuickWindow);
- if (d->context && d->context && QThread::currentThread() != d->context->thread()) {
+ if (d->context && QThread::currentThread() != d->context->thread()) {
qWarning("QQuickWindow::setRenderThread: Cannot set render target from outside the rendering thread");
return;
}
@@ -2759,6 +2755,14 @@ QSGTexture *QQuickWindow::createTextureFromId(uint id, const QSize &size, Create
}
/*!
+ \qmlproperty color QtQuick.Window2::Window::color
+
+ The background color for the window.
+
+ Setting this property is more efficient than using a separate Rectangle.
+*/
+
+/*!
\property QQuickWindow::color
\brief The color used to clear the OpenGL context.
@@ -2776,6 +2780,7 @@ void QQuickWindow::setColor(const QColor &color)
d->clearColor = color;
emit colorChanged(color);
+ d->dirtyItem(contentItem());
}
QColor QQuickWindow::color() const
@@ -2783,7 +2788,26 @@ QColor QQuickWindow::color() const
return d_func()->clearColor;
}
+/*!
+ \qmlproperty string QtQuick.Window2::Window::title
+
+ The window's title in the windowing system.
+ The window title might appear in the title area of the window decorations,
+ depending on the windowing system and the window flags. It might also
+ be used by the windowing system to identify the window in other contexts,
+ such as in the task switcher.
+ */
+
+/*!
+ \qmlproperty string QtQuick.Window2::Window::modality
+
+ The modality of the window.
+
+ A modal window prevents other windows from receiving input events.
+ Possible values are Qt.NonModal (the default), Qt.WindowModal,
+ and Qt.ApplicationModal.
+ */
#include "moc_qquickwindow.cpp"
diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp
index 50887e8e99..5da904ace2 100644
--- a/src/quick/items/qquickwindowmanager.cpp
+++ b/src/quick/items/qquickwindowmanager.cpp
@@ -131,8 +131,11 @@ QQuickWindowManager *QQuickWindowManager::instance()
s_instance = QSGContext::createWindowManager();
bool bufferQueuing = QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::BufferQueueingOpenGL);
- bool fancy = bufferQueuing
- && QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL);
+#ifdef Q_OS_WIN
+ bool fancy = false; // QTBUG-28037
+#else
+ bool fancy = QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL);
+#endif
if (qmlNoThreadedRenderer())
fancy = false;
else if (qmlForceThreadedRenderer())
diff --git a/src/quick/util/qquickapplication.cpp b/src/quick/util/qquickapplication.cpp
index 27ee2f0be1..962fb52d05 100644
--- a/src/quick/util/qquickapplication.cpp
+++ b/src/quick/util/qquickapplication.cpp
@@ -42,6 +42,8 @@
#include "qquickapplication_p.h"
#include <private/qobject_p.h>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
#include <QtGui/QGuiApplication>
#include <QtCore/QDebug>
@@ -91,6 +93,11 @@ Qt::LayoutDirection QQuickApplication::layoutDirection() const
return d->direction;
}
+bool QQuickApplication::supportsMultipleWindows() const
+{
+ return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows);
+}
+
bool QQuickApplication::eventFilter(QObject *, QEvent *event)
{
Q_D(QQuickApplication);
diff --git a/src/quick/util/qquickapplication_p.h b/src/quick/util/qquickapplication_p.h
index 5cf31efe5c..5519f22243 100644
--- a/src/quick/util/qquickapplication_p.h
+++ b/src/quick/util/qquickapplication_p.h
@@ -57,12 +57,14 @@ class Q_AUTOTEST_EXPORT QQuickApplication : public QObject
Q_OBJECT
Q_PROPERTY(bool active READ active NOTIFY activeChanged)
Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged)
+ Q_PROPERTY(bool supportsMultipleWindows READ supportsMultipleWindows CONSTANT)
public:
explicit QQuickApplication(QObject *parent = 0);
virtual ~QQuickApplication();
bool active() const;
Qt::LayoutDirection layoutDirection() const;
+ bool supportsMultipleWindows() const;
Q_SIGNALS:
void activeChanged();