From b0de855379a9242d74353dfd66677d4b1b5dbcec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20H=C3=B6ltt=C3=A4?= Date: Wed, 13 Mar 2019 13:09:48 +0100 Subject: Little fixes and cleanup, TODOs Explained some TODOs a bit better. Fixed mismatching tab titles in demo app. Removed unused predefined CursorNavigationCommands. --- plugin/cursornavigation.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'plugin/cursornavigation.cpp') diff --git a/plugin/cursornavigation.cpp b/plugin/cursornavigation.cpp index 00a1af0..e2b5856 100644 --- a/plugin/cursornavigation.cpp +++ b/plugin/cursornavigation.cpp @@ -134,9 +134,6 @@ CursorNavigationAttached *CursorNavigation::qmlAttachedProperties(QObject *objec QQuickItem *item = static_cast(object); - // TODO: what if an object, with an already attached object, gets reparented (say, in another window?) - // with or without a focus system. - qWarning() << "Created a new CN attachment"; return new CursorNavigationAttached(item); } @@ -227,6 +224,14 @@ void CursorNavigation::registerItem(CursorNavigationAttached* item) m_rootItem->m_children.append(item); item->m_parentNavigable=m_rootItem; } + + /* TODO reparenting from window to another kind of works, but reparenting + * within a window not so well. problems arise when reaprenting items + * contained in an item that is also navigable. for this to work, we would + * need to detect all parent changes, including items non navigable parents + * and grandparents, and reorganize the internal tree when needed. + * For now, consider reparenting as not recommended + */ } void CursorNavigation::unregisterItem(CursorNavigationAttached* item) @@ -238,7 +243,6 @@ void CursorNavigation::unregisterItem(CursorNavigationAttached* item) if (item->m_parentNavigable) item->m_parentNavigable->m_children.removeOne(item); - //TODO if the item that is being unregistered has children, they should be reassigned to the item's parent } CursorNavigationAttached *CursorNavigation::defaultItem() -- cgit v1.2.3