aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-30 10:42:34 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-02-02 15:59:32 +0100
commita9a9fa0c4737017aa4fc72b467eb45645d0912f0 (patch)
tree4753218705648384e6555be0e2bf3165bfb391d9 /src/quick/items/qquickitem.cpp
parenteace041161a03a849d3896af65493b7885cecc04 (diff)
parente6d4df156e9aec62054740dc99ab8ba2855eaafc (diff)
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <shawn.rutledge@qt.io> Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index f4d11e32bd..f615e85e1b 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -87,6 +87,7 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(DBG_MOUSE_TARGET)
Q_DECLARE_LOGGING_CATEGORY(DBG_HOVER_TRACE)
+Q_DECLARE_LOGGING_CATEGORY(lcTransient)
void debugFocusTree(QQuickItem *item, QQuickItem *scope = 0, int depth = 1)
{
@@ -970,7 +971,7 @@ bool QQuickKeysAttached::isConnected(const char *signalName) const
Keys.onEscapePressed: {
console.log("escapeItem is handling escape");
- event.accepted = true;
+ // event.accepted is set to true by default for the specific key handlers
}
}
@@ -3264,11 +3265,13 @@ void QQuickItemPrivate::data_append(QQmlListProperty<QObject> *prop, QObject *o)
}
if (thisWindow) {
- if (itemWindow)
+ if (itemWindow) {
+ qCDebug(lcTransient) << thisWindow << "is transient for" << itemWindow;
thisWindow->setTransientParent(itemWindow);
- else
+ } else {
QObject::connect(item, SIGNAL(windowChanged(QQuickWindow*)),
thisWindow, SLOT(setTransientParent_helper(QQuickWindow*)));
+ }
}
o->setParent(that);
}
@@ -3667,8 +3670,9 @@ QQmlListProperty<QObject> QQuickItemPrivate::data()
\qmlproperty real QtQuick::Item::childrenRect.y
\qmlproperty real QtQuick::Item::childrenRect.width
\qmlproperty real QtQuick::Item::childrenRect.height
+ \readonly
- This property holds the collective position and size of the item's
+ This read-only property holds the collective position and size of the item's
children.
This property is useful if you need to access the collective geometry
@@ -5806,19 +5810,24 @@ bool QQuickItem::isVisible() const
return d->effectiveVisible;
}
-void QQuickItem::setVisible(bool v)
+void QQuickItemPrivate::setVisible(bool visible)
{
- Q_D(QQuickItem);
- if (v == d->explicitVisible)
+ if (visible == explicitVisible)
return;
- d->explicitVisible = v;
- if (!v)
- d->dirty(QQuickItemPrivate::Visible);
+ explicitVisible = visible;
+ if (!visible)
+ dirty(QQuickItemPrivate::Visible);
- const bool childVisibilityChanged = d->setEffectiveVisibleRecur(d->calcEffectiveVisible());
- if (childVisibilityChanged && d->parentItem)
- emit d->parentItem->visibleChildrenChanged(); // signal the parent, not this!
+ const bool childVisibilityChanged = setEffectiveVisibleRecur(calcEffectiveVisible());
+ if (childVisibilityChanged && parentItem)
+ emit parentItem->visibleChildrenChanged(); // signal the parent, not this!
+}
+
+void QQuickItem::setVisible(bool v)
+{
+ Q_D(QQuickItem);
+ d->setVisible(v);
}
/*!