From kde-core-devel Sun Mar 23 20:02:58 2008 From: Anders Lund Date: Sun, 23 Mar 2008 20:02:58 +0000 To: kde-core-devel Subject: [PATCH] KDirOperator: associate action collection with parent rather Message-Id: <200803232102.58261.anders () alweb ! dk> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=120630261302951 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_ydr5HpoBcZlZAnM" --Boundary-00=_ydr5HpoBcZlZAnM Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Here is another patch for KDirOperator. If setting the shortcutContext to Qt::WidgetWithChildrenShortcut should make sense, the actioncollection shouldn't be associated with the toplevel window. This patch means that the shortctus from kdiroperator does not conflict with the host app (such as kate), and the widgetn needs to be focused to be navigated. With this patch, I do not need to manipulate the shortcuts in kdiroperator from kates file browser. Thank your to Albert Astals Cid for pointing it out. -- Anders www: http://www.alweb.dk jabber: anderslund@jabber.dk --Boundary-00=_ydr5HpoBcZlZAnM Content-Type: text/x-diff; charset="iso-8859-15"; name="kdiroperator-associateonlyparent.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdiroperator-associateonlyparent.patch" Index: kdiroperator.cpp =================================================================== --- kdiroperator.cpp (revision 789171) +++ kdiroperator.cpp (working copy) @@ -1653,7 +1653,7 @@ void KDirOperator::setupActions() // an interface to add a custom action collection. #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) - d->actionCollection->addAssociatedWidget(topLevelWidget()); + d->actionCollection->addAssociatedWidget(parentWidget()); foreach (QAction* action, d->actionCollection->actions()) action->setShortcutContext(Qt::WidgetWithChildrenShortcut); #endif --Boundary-00=_ydr5HpoBcZlZAnM--